Jump to content

Immediate Disconnect On Dedicated Server


DaveKerk

Recommended Posts

Hi all, went through the process of setting up a dedicated server inside of a VM on a Ubuntu 20.04 server. When I try to connect to the server from my Windows 10 computer on the local network, I get a Network Timeout error immediately when connecting. The server log output gives me this message:

2023-02-09T05:13:30 949.389 INF NET: LiteNetLib: Connect from: 192.168.1.1:61241
2023-02-09T05:13:30 949.390 INF Started thread NCS_Reader_0_0
2023-02-09T05:13:30 949.391 INF Started thread NCS_Writer_0_0
2023-02-09T05:13:30 949.391 INF Started thread NCS_Reader_0_1
2023-02-09T05:13:30 949.392 INF [NET] PlayerConnected EntityID=-1, PltfmId='Local_<none>', CrossId='<unknown/none>', OwnerID='<unknown/none>', PlayerName=''
2023-02-09T05:13:30 949.392 INF Started thread NCS_Writer_0_1
2023-02-09T05:13:35 954.495 INF NET: LiteNetLib: Client disconnect from: 192.168.1.1:61241 (Timeout)
2023-02-09T05:13:35 954.495 INF [NET] PlayerDisconnected EntityID=-1, PltfmId='Local_<none>', CrossId='<unknown/none>', OwnerID='<unknown/none>', PlayerName=''
2023-02-09T05:13:35 954.495 INF Player disconnected: EntityID=-1, PltfmId='Local_<none>', CrossId='<unknown/none>', OwnerID='<unknown/none>', PlayerName=''
2023-02-09T05:13:35 954.495 INF Exited thread NCS_Writer_0_0
2023-02-09T05:13:35 954.496 INF Exited thread NCS_Reader_0_0
2023-02-09T05:13:35 954.496 INF Exited thread NCS_Reader_0_1
2023-02-09T05:13:35 954.496 INF Exited thread NCS_Writer_0_1

Here is the server output log in this entirety: https://pastebin.com/fHwFW9yi

 

I have tried disabling LiteNetLib and SteamNetworking in every variation. This is a brand new server without any mods. I'm pretty sure I have the port forward setup correctly as it does at least try to connect. I'm using the Connect Via IP option in Join Game and using my public IP found on https://www.whatsmyip.org/ and port 26900, which is what is set in my config file.

 

Any help would be awesome, thanks!

Link to comment
Share on other sites

I don't know your knowledge on server setup so I'll start with simplicity. Personally, I would leave litenetlib active as it allows better connectivity with lower latency. You have both disabled so I would enable litenetlib. You have assigned the server port as 26900 which is the default. Using this port means that you need to forward the following ports on your router:  TCP 26900 and UDP 26900-26903. If those ports are correctly forwarded, your server should show up on the server browser list and you should be able to join your server. You also mentioned that you determined your external IP address via whatsmyip, you can verify that by looking at your server info in the server browser. My overall suspicion is that there is a problem with the port forwarding for whatever reason. Some routers are notorious for not doing this task correctly so I would google your router model and port forwarding and see what others have said. Lastly, there are certain ISPs that do not allow customers to forward ports on their equipment so that you need to call them and have them forward the ports.

Link to comment
Share on other sites

2 minutes ago, Star69 said:

I don't know your knowledge on server setup so I'll start with simplicity. Personally, I would leave litenetlib active as it allows better connectivity with lower latency. You have both disabled so I would enable litenetlib. You have assigned the server port as 26900 which is the default. Using this port means that you need to forward the following ports on your router:  TCP 26900 and UDP 26900-26903. If those ports are correctly forwarded, your server should show up on the server browser list and you should be able to join your server. You also mentioned that you determined your external IP address via whatsmyip, you can verify that by looking at your server info in the server browser. My overall suspicion is that there is a problem with the port forwarding for whatever reason. Some routers are notorious for not doing this task correctly so I would google your router model and port forwarding and see what others have said. Lastly, there are certain ISPs that do not allow customers to forward ports on their equipment so that you need to call them and have them forward the ports.

I have since reactivated LiteNetLib, I still have SteamNetworking disabled. I have verified that my port forwarding works as someone in a different house was able to connect to the port and I saw the traffic using a port sniffer. For some reason I still do not see the server listed.

My friend who was helping also informed me I should be using my local IP when on the same network, so I tried that and now I get "Server is still initializing, please try again in a minute." The server has been up and running overnight and all day. It should be more than done. The server log output tells me this when I connect using my local IP:

 

2023-02-10T00:56:10 20679.026 INF NET: LiteNetLib: Connect from: 192.168.1.156:51679
2023-02-10T00:56:10 20679.027 INF Started thread NCS_Reader_0_0
2023-02-10T00:56:10 20679.027 INF Started thread NCS_Writer_0_0
2023-02-10T00:56:10 20679.028 INF Started thread NCS_Reader_0_1
2023-02-10T00:56:10 20679.028 INF Started thread NCS_Writer_0_1
2023-02-10T00:56:10 20679.028 INF [NET] PlayerConnected EntityID=-1, PltfmId='Local_<none>', CrossId='<unknown/none>', OwnerID='<unknown/none>', PlayerName=''
2023-02-10T00:56:10 20679.071 INF NPPL.Read
2023-02-10T00:56:10 20679.114 INF PlayerLogin: DaveKerk/Alpha 20.6
2023-02-10T00:56:10 20679.114 INF Client IP: 192.168.1.156
2023-02-10T00:56:10 20679.114 INF [Auth] PlayerName authorization successful: EntityID=-1, PltfmId='Steam_76561198046209397', CrossId='EOS_00029a6184f74d1c9b20c9b8cf09aea1', OwnerID='<unknown/none>', PlayerName='DaveKerk'
2023-02-10T00:56:10 20679.114 INF [Auth] ServerState authorization failed: EntityID=-1, PltfmId='Steam_76561198046209397', CrossId='EOS_00029a6184f74d1c9b20c9b8cf09aea1', OwnerID='<unknown/none>', PlayerName='DaveKerk'
2023-02-10T00:56:10 20679.114 INF Kicking player (Server is still initializing): EntityID=-1, PltfmId='Steam_76561198046209397', CrossId='EOS_00029a6184f74d1c9b20c9b8cf09aea1', OwnerID='<unknown/none>', PlayerName='DaveKerk'
2023-02-10T00:56:10 20679.164 INF NET: LiteNetLib: Client disconnect from: 192.168.1.156:51679 (RemoteConnectionClose)
2023-02-10T00:56:10 20679.164 INF [NET] PlayerDisconnected EntityID=-1, PltfmId='Steam_76561198046209397', CrossId='EOS_00029a6184f74d1c9b20c9b8cf09aea1', OwnerID='<unknown/none>', PlayerName='DaveKerk'
2023-02-10T00:56:10 20679.164 INF Player disconnected: EntityID=-1, PltfmId='Steam_76561198046209397', CrossId='EOS_00029a6184f74d1c9b20c9b8cf09aea1', OwnerID='<unknown/none>', PlayerName='DaveKerk'
2023-02-10T00:56:10 20679.165 INF Exited thread NCS_Reader_0_0
2023-02-10T00:56:10 20679.165 INF Exited thread NCS_Writer_0_1
2023-02-10T00:56:10 20679.165 INF Exited thread NCS_Writer_0_0
2023-02-10T00:56:10 20679.166 INF Exited thread NCS_Reader_0_1
2023-02-10T00:56:10 20679.213 ERR [EOS] Failed unregistering player in session: NotFound
2023-02-10T00:56:11 20679.615 ERR DisconnectClient: Player EOS_00029a6184f74d1c9b20c9b8cf09aea1 not found

 

Link to comment
Share on other sites

So I'm not sure what may have happened, but I went ahead and erased pretty much everything in the saves folder and regenerated a new world. Kept a closer eye on the log and eventually saw something along the lines of "Server listed on Steam" or whatever. And this time it worked!! I may have been a bit impatient before and tried to connect when it wasn't fully done and corrupted something.

Link to comment
Share on other sites

As pointed out by Beelzybub on the Discord server, I had my config file set incorrectly when I initially made my server I had my world gen size set incorrectly, it was supposed to be multiples of 1024 and I made a mistake, was supposed to be 8192 instead. I had made my VM a little more powerful and increased this 12288 so it was just a very lucky coincidence on my second world generation.

<property name="WorldGenSize"    value="8196"/>

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...