Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client can't connect to 1.8 spigot Server #67

Closed
lyze237 opened this issue Mar 2, 2015 · 13 comments
Closed

Client can't connect to 1.8 spigot Server #67

lyze237 opened this issue Mar 2, 2015 · 13 comments

Comments

@lyze237
Copy link

lyze237 commented Mar 2, 2015

pi@raspberrypi ~/mc $ mono MinecraftClient.exe MinecraftClient.ini
Console Client for MC 1.4.6 to 1.8.1 - v1.8.0 - By ORelio & Contributors
Connecting to Minecraft.net...
Success. (session ID: [...])
Using Minecraft version 1.8.0 (protocol v47)
Failed to connect to this IP.
[BOT] Waiting 5 seconds (3 attempts left)...
Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object

Where the ip is correct and pingable.

pi@raspberrypi ~/mc $ ping <ip>
PING <ip> (<ip>) 56(84) bytes of data.
64 bytes from <ip>: icmp_req=1 ttl=54 time=41.5 ms
64 bytes from <ip>: icmp_req=2 ttl=54 time=38.4 ms
64 bytes from <ip>: icmp_req=3 ttl=54 time=38.2 ms
64 bytes from <ip>: icmp_req=4 ttl=54 time=46.9 ms

Where this is the config file:

login=<username>
password=<password>
serverip=<ip>:4464

Perhapse it can't connect to Servers with a custom port number

Note i'm using the Spigot Version: CraftBukkit version git-Spigot-952179b-f98775c (MC: 1.8) (Implementing API version 1.8-R0.1-SNAPSHOT)

@ORelio
Copy link
Member

ORelio commented Mar 2, 2015

Hello,
Thanks for your report.
Please provide the stack trace (lines below NullReferenceException) :)

@lyze237
Copy link
Author

lyze237 commented Mar 2, 2015

Here ya go ;)

Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object
  at MinecraftClient.McTcpClient.Disconnect () [0x00000] in <filename unknown>:0 
  at MinecraftClient.Program.<Restart>b__4 () [0x00000] in <filename unknown>:0 
  at System.Threading.Thread.StartInternal () [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
  at MinecraftClient.McTcpClient.Disconnect () [0x00000] in <filename unknown>:0 
  at MinecraftClient.Program.<Restart>b__4 () [0x00000] in <filename unknown>:0 
  at System.Threading.Thread.StartInternal () [0x00000] in <filename unknown>:0 

Using a Raspberry Pi + Mono from the repo. (Raspdebian)

@ORelio
Copy link
Member

ORelio commented Mar 2, 2015

Thanks for your report, the crash has been fixed!

Regarding the issue with this particular server: Even if ping is working this does not means that a Minecraft server is running on the server on port 25565. Or 4464 in your case. The app actually properly handles the ip:port syntax so I dont't know why it can't even etablish a connection.

As you are running the app on a raspberry pi I guess you haven't tried on the Minecraft game itself, but could you try connecting on a computer where you are sure you can connect to the server?

@lyze237
Copy link
Author

lyze237 commented Mar 2, 2015

No the Server is online and i'm connected to it via the original mc client.

@ORelio
Copy link
Member

ORelio commented Mar 2, 2015

I mean, can you try connecting using Minecraft Console Client, on a computer where you can access the server using the main Minecraft Game.

@lyze237
Copy link
Author

lyze237 commented Mar 2, 2015

i have also tried it. arch linux + mono from repo. same error

@ORelio
Copy link
Member

ORelio commented Mar 2, 2015

I think the issue is on a lower level because it means that when in my code i use the function to connect using TCP to "the given server", it fails whereas a server should be reachable: this is outside the client's code. For investigation purposes, could you provide the server address? I suspect a DNS record issue while resolving "the sever address" (eg my.server.com) to "the server IP" (eg 123.123.123.123).

@lyze237
Copy link
Author

lyze237 commented Mar 2, 2015

mc.lyze.at or zap.lyze.at:4464 or 134.255.231.125:4464
i have tried all three and none worked.

@ORelio
Copy link
Member

ORelio commented Mar 2, 2015

mc.lyze.at -> cannot resolve (get a SOA dns record, "Unknown Host" from Minecraft)
zap.lyze.at -> can resolve (get a A dns record, but "Connection Refused" from Minecraft)
Anyway the DNS record for zap.lyze.at seems normal. But I cannot connect with the Minecraft game.

@lyze237
Copy link
Author

lyze237 commented Mar 2, 2015

Well thats weird.
I can normally connect to mc.lyze.at, zap.lyze.at:4464 and 134.255.231.125:4464

http://i.imgur.com/w7X1HhG.png | http://i.imgur.com/742FPKK.png
The pi is in the same network as the computer i took screenshots from.

And also mc.lyze.at is a redirect to zap.lyze.at:4464
zap.lyze.at is a a record to 134.255.231.125

And you can't resolve mc.lyze.at because its a direct redirect to the port number. so when you write zap.lyze.at:4464 to make e.g. a ping it should also give you a cannot resolve as you see here:

[lyze@GaHoole ~]$ tracepath zap.lyze.at
 1?: [LOCALHOST]                                         pmtu 1500
 1:  dummy.liwest.at                                       0.759ms 
 1:  dummy.liwest.at                                       0.744ms 
 2:  172.18.224.1                                          9.767ms 
 3:  212.33.34.1                                          55.557ms 
 4:  de-cix-10G.liwest.at                                 23.186ms 
 5:  decix.optimate-server.de                             24.336ms asymm  6 
 6:  109.230.212.130                                      21.140ms asymm  7 
 7:  134.255.231.125                                      22.418ms reached
     Resume: pmtu 1500 hops 7 back 58 

[lyze@GaHoole ~]$ tracepath mc.lyze.at
gethostbyname: Unknown host

[lyze@GaHoole ~]$ tracepath zap.lyze.at:4464
gethostbyname: Unknown host

@ORelio
Copy link
Member

ORelio commented Mar 2, 2015

Don't know why, but the addresses are now working except mc.lyze.at:

2015-03-03_00 25 01

And when trying zap.lyze.at:4464 the client can properly connect:

reachable

Not tried to actually login but it seems to work, no "Failed to connect" issue 😕
I'm using the current source code from Indev branch but it should work the same way with MCC v1.8.0

@lyze237
Copy link
Author

lyze237 commented Mar 3, 2015

Ok thanks. Currently connecting works with zap.lyze.at:4464.

It works normally when i start it myself via
mono MinecraftClient.exe MinecraftClient.ini BasicIO.

However when i try to start it as a cronjob at every Systemreboot the Client connects and disconnects after a second or two.

Thats the cronjob entry:
# m h dom mon dow commandß
@reboot sudo mono /home/pi/mc/MinecraftClient.exe /home/pi/mc/MinecraftClient.ini BasicIO > /home/pi/mc/log.txt

Thats the log file:
pi@raspberrypi ~ $ cat mc/log.txt
Console Client for MC 1.4.6 to 1.8.1 - v1.8.0 - By ORelio & Contributors
Connecting to Minecraft.net...
Success. (session ID: )
�8Using Minecraft version 1.8.0 (protocol v47)
�8[BOT] File not found: kickmessages.txt
�8Translations file loaded.
Version is supported.
Logging in...
�8Crypto keys & hash generated.
Checking Session...
Server was successfully joined.
Type '/quit' to leave the server.
�e�elyze237Test joined the game�r
Welcome, lyze237Test! Ya can see the statistics at �rhttp://statistics.lyze.at/�r
�6�6Welcome, �r�f�f[�r�2�2Bird�r�f�f] lyze_bot_1�r�6�6!�r
�6�6Type �r�c�c/help�r�6�6 for a list of commands.�r
�6�6Type �r�c�c/list�r�6�6 to see who else is online.�r
�6�6Players online:�r�c�c 2 �r�6�6- World time:�r�c�c 12:20 PM�r
�6�6You have no new mail.�r

@ORelio
Copy link
Member

ORelio commented Mar 4, 2015

Not sure why it does not work properly as a job, there is no particular reason why it would not work as a job but would work when manually launched. However, mono's implementation of AES crypto is incomplete so the current workaround to get the app working on mono will lose connection if no interaction is made (no message sent or received during a certain amount of time, ~30 secs). See thread post no 955 for detailed info. The app will properly work with the regular .NET framework, which is getting open source and should eventually be ported to linux in the future, resolving the issue.

@ORelio ORelio closed this as completed in e491603 Mar 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants