jhead / phantom

Use your own Minecraft server with your Xbox or PS4 and play with friends!
MIT License
613 stars 76 forks source link

MacOS server offline with a capacity of 0 #102

Open TheoBains opened 4 years ago

TheoBains commented 4 years ago

When i start the program it all works fine but then it says its opened a connection and has received a LAN ping but follows up after getting a new connection from client with WRN read upd xxx.xxx.xx.xxx:random number->xxx.xxx.x.xx:191132: recvfrom: connection refused The server shows up on my device but it says it is offline and has a capacity of 0 players. I assume I'm doing something stupid so any help would be appreciated.

joshuaxlino commented 4 years ago

I do not use MacOS but i would recommend trying old versions of phantom to see if this is a computer or bug for phantom.

franco-ibanez commented 4 years ago

Additional information from debug, for the same problem:

←[90m3:31PM←[0m ←[33mDBG←[0m Received Unconnected Pong from server: [28 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 0 254 254 254 254 253 253 253 253 18 52 86 120 0 60 77 67 80 69 59 112 104 97 110 116 111 109 32 194 167 99 83 101 114 118 101 114 32 111 102 102 108 105 110 101 59 51 57 48 59 49 46 49 52 46 54 48 59 48 59 48 59 59 59 67 114 101 97 116 105 118 101 59 49 59] ←[90m3:31PM←[0m ←[33mDBG←[0m Unconnected Pong: &{[0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0] [0 255 255 0 254 254 254 254 253 253 253 253 18 52 86 120] {MCPE phantom §cServer offline 390 1.14.60 0 0 5357192011458857833 Creative 1 }} ←[90m3:31PM←[0m ←[32mINF←[0m Sent server offline pong to client: 192.168.0.194:55422 ←[90m3:31PM←[0m ←[31mWRN←[0m Error while processing client data: write udp 192.168.0.14:51711->192.168.0.106:19132: wsasend: An invalid argument was supplied. ←[90m3:31PM←[0m ←[32mINF←[0m Received LAN ping from client: 192.168.0.194:55422 ←[90m3:31PM←[0m ←[33mDBG←[0m Received Unconnected Pong from server: [28 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 0 254 254 254 254 253 253 253 253 18 52 86 120 0 60 77 67 80 69 59 112 104 97 110 116 111 109 32 194 167 99 83 101 114 118 101 114 32 111 102 102 108 105 110 101 59 51 57 48 59 49 46 49 52 46 54 48 59 48 59 48 59 59 59 67 114 101 97 116 105 118 101 59 49 59]

srstark01 commented 3 years ago

Have there been any updates on this? I am having the exact same issue with server running on Debian stretch.

Also worth noting that I have no firewall in place that would cause the blocked port. Additionally, it would seem that the Minecraft server doesn't even listen on UDP. I am configured for port 25565 and here are all my listening ports...

host:~$ sudo ss -lntu Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port udp UNCONN 0 0 [fe80::5054:ff:feff:d1c0]%kvm:546 [::]: tcp LISTEN 0 128 0.0.0.0:22 0.0.0.0: tcp LISTEN 0 128 [::]:22 [::]: tcp LISTEN 0 128 :25565 : host:~$

Lastly, I have tried every phantom release and the issue seems to persist across all. I had this working not long ago, but before the current bedrock release (1.16.4). So perhaps Majong previously included UDP, but have removed it. Regardless, does anyone have any ideas or can we possibly get a version that doesn't use UDP?

srstark01 commented 3 years ago

Nevermind.... Got my server up and running...

And since @jhead doesn't seem bothered enough to even respond to a 6month+ old thread, for anyone else experiencing the same issue, here is the link to a better solution... No Phantom necessary...

https://github.com/TheRemote/MinecraftBedrockServer

Apparently, the current vanilla install that is the result of most of the build guides I've seen only uses a single TCP port (25565 by default), which created the problem with phantom. This script allows you to have a server up and running in about 3 minutes, it executes, updates, and backs up automatically... And again... No phantom necessary....

jhead commented 3 years ago

@teeman33 sorry about the delay! I noticed that your log shows port 191132 which isn't a valid port number. The default is usually port 19132. Please make sure that port exactly matches your Bedrock server's port. The "connection refused" error would indicate that phantom is unable to reach your server on the IP and port provided.


Additionally, it would seem that the Minecraft server doesn't even listen on UDP. I am configured for port 25565 and here are all my listening ports...

@srstark01 Minecraft Java Edition uses TCP and listens on port 25565 by default. The Bedrock (Mobile, Console, Win10) server, which phantom is specifically designed for, uses UDP and listens on port 19132 by default. Additionally, there's no need for phantom if you already have your Bedrock server running locally on your LAN -- this tool is aimed at users who have a server running remotely, i.e. on a VM or running on their friend's computer. Apologies if any of that was unclear.

TheoBains commented 3 years ago

@srstark01 Thanks so much mate, at this point I'd just given up and left it alone. I appreciate the help.

jhead commented 3 years ago

@franco-ibanez late reply but what OS are/were you running phantom on here?

wsasend: An invalid argument was supplied.

This line seems to imply that raw sockets aren't supported on this version of Windows, but it looks like you might be running a fairly old version? But I'm not super familiar with Windows APIs, so it's hard to tell.

I've only tested phantom on recent versions of Windows 10.