jhead / phantom

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

I can only run one instance of Phantom windows 10 #43

Open Succorso opened 4 years ago

Succorso commented 4 years ago

I want to host 3 servers for my kids. All three servers have different port setting but run on the same machine with the same ip.

First Server: Default settings and is shown in LAN No phantom used

Second Server: Phantom works without problems Server is shown in LAN

Third Server: Phantom gives theses error:

Starting up with remote server IP: 192.168.178.46:19140
INFO: 2019/12/21 10:49:20 proxy.go:84: Binding ping server to: 0.0.0.0:19132
Failed to start server: listen udp 0.0.0.0:19132: bind: An attempt was made to access a socket in a way forbidden by its access permissions.

It seems like I can only use one instance of phantom at a time.

jhead commented 4 years ago

Hey @Succorso, thanks for the report. Are you using the latest version of phantom? I wasn't able to reproduce this with phantom v0.2.1 on Windows 10.

Succorso commented 4 years ago

Hi, it was the latest Windows & phantom version when this problem occured, 15 days ago. But the computer is broken now, so I cannot test it anymore. I was using sophos endpoint protection, maybe it was blocked somehow?

jhead commented 4 years ago

hm, that could probably do it. I would suggest that you try adding the phantom executable file as an exception to any anti-virus/security software. I would also try running Command Prompt as an administrator (i.e. by right clicking on the start menu icon).

Kvaone commented 4 years ago

This sounds like the problem I have.

Running 3 servers on Windows 10. 1 IP address, 3 different ports. I can connect to the servers from another Windows 10 computer and from Android devices by adding the server and not using the Phantom proxy, so I know they are working properly that way. The reason for using Phantom is so that the various Xboxes in the house can connect to the different servers.

I can only run 1 instance of Phantom. Running a second pops this error:

INFO: 2020/02/02 19:03:49 proxy.go:75: Binding ping server to: 0.0.0.0:19132 INFO: 2020/02/02 19:03:49 clientmap.go:66: Starting idle connection handler Failed to start server: listen udp 0.0.0.0:19132: bind: An attempt was made to access a socket in a way forbidden by its access permissions.

Using the -bind switch doesn't helps as it's the udp 0.0.0.0:19132 that it fails on. Server 1 uses port 19134, 2 is 19136 and 3 is 19138.

Server is Windows 10 Pro 1909 Phantom is 0.3.1

PS: Doesn't matter is I use an Administrator command prompt or a normal one. Also disabled Windows Firewall in Defender, still can't get past that error.

jhead commented 4 years ago

Hey @Kvaone, do you have any other anti-virus / security software running? Could you try the latest version of phantom?

Kvaone commented 4 years ago

No other installed AV or Security software. I will download 0.4.0 and give it a try to see if that fixes it, then report back.

Kvaone commented 4 years ago

1) 4 LAN servers showing on my Xbox, all can be connected to and played.

2) 4 LAN servers showing on my Win 10 Pro 1909 laptop, all can be connected to and played.

3)

4 LAN servers showing on my Android 9.x phone, all can be connected to and played.

Version 0.4.0 of Phantom has fixed my issues thank you, Jhead.

Additional information that may help out:

To have 2 servers available on the LAN with version 0.3.1, one was set up and running on port 19132 to always show and phantom was used to show a second, whichever was needed.

Version 0.4.0 would not run at all with a server using port 19132. The server could not be started after Phantom either. Moving the 19132 server to a different port, allows for 4 instances of Phantom (64 bit) to run and show all 4 servers.

Phantom was run with all defaults, just the -server switch. Phantom is running with a user command prompt initiated by windows key+R Dedicated Minecraft box runs 4 Bedrock servers and 4 instances of Phantom. Dedicated Minecraft box runs Windows 10 Pro 1909 and Phantom is 0.4.0 with Windows Security and its built in firewall active.

Once again, 0.4.0 has fixed my issues, thank you.

Kvaone commented 4 years ago

I had to update the Bedrock Server software to 1.14.60.5 for clients to connect and the issue is back:

12:40PM INF Binding ping server to port 19132 12:40PM INF Starting idle connection handler Failed to start server: listen udp4 :19132: bind: An attempt was made to access a socket in a way forbidden by its access permissions.

Server software downloaded from Mojang is 1.14.60.5 Server OS is Win10 Pro 1909 Phantom is 0,4.0

EDIT: Elevated command prompt doesn't change error and firewall is setup to allow server and phantom.

Epsicle commented 4 years ago

@Kvaone I had the same issue recently. For me, the issue was my server was listening on 19132 even though the .properties file for the bedrock server was told to specifically use another port, it defaulted a secondary port to 19132.

What fixed this for me was to do the following.

  1. Start up a server that is specified to not use 19132.
  2. Start up another server that is specified to not use 19132.
  3. See if one of those servers is listening to 19132 like an idiot, instead of doing what the properties file said to do, then stop that server.
  4. Start phantom, connect to the active server.
  5. Start the other server, phantom is now listening to 19132 so the bedrock server shouldn't be able to use that port.
  6. start another instance of phantom and connect it to the other server.

Hopefully that helps.

Kvaone commented 4 years ago

@Epsicle Thanks Epsicle. That worked. I'm not sure why I didn't look at the Bedrock server screen to notice it wasn't directly a Phantom issue.