jsknnr / enshrouded-server

Run Enshrouded dedicated server in a container
MIT License
185 stars 23 forks source link

Connecting to local network server #29

Closed bugbountyguy closed 8 months ago

bugbountyguy commented 8 months ago

Hi,

I've been running into various little problems with this setup and am not quite sure what is going on.

I've got a local network server I'm trying to setup like I've done for many other games. I started with custom port numbers, but when issues came up, I decided to try the default ports... It seems I still have the exact same issues.

What I'm running into is the following scenario: I've got a local network ip address for the server I'm setting up (let's just say 192.168.1.15 for this example). The firewall rules on the server have been approved for local network traffic to connect to both of the ports used by enshrouded. Using the default ports, I can favorite the game's server fine in steam as it sees the server. So if I put 192.168.1.15:15637 in steam favorites, it shows the latency + 0/16 players connected. When clicking connect, I put in the password, and click join.

From here, it goes to the game's main menu... it didn't connect. so then I click 'start' and I see my server at the very top of the list when clicking to join servers. I click join on it, and paste the password in again.

From here, I can see clearly on my server the firewall accepting the incoming traffic to 15637. However, 15636 never comes in... ever. I even used wireshark on my computer to see and it never even attempts to reach that port on my server, only 15637. With that being said, it sits on a loading screen indefinitely, doing absolutely nothing - it's just stuck.

Has anyone had any luck getting a local network connection to work on this game? I see these in my logs:

[online] Session accepted with peer ( id [my steam id] ).
[online] Added Peer #0.
[online] Client '[my steam id]' authenticated by steam

But nothing happens after that - it just deadends from there until I kill the game by clicking 'stop' in the steam client (no disconnect shows either).

note: This is just problem 1 of 2 I have, the 2nd is related to 'custom ports', but I want to at least see if I can get a 'normal' connection working first before I tackle that problem next. :)

bugbountyguy commented 8 months ago

edit: Okay I'm stupid, I thought I did a search here, but I guess I was in a different github repo. network_mode: host got it to work, which doesn't make sense to me. The firewall rules were 100% there to allow it to connect, so it sounds like something else might be need configured?

That being said, custom ports still don't work. Putting in a port, say 10000, for the query port still makes the application 'listen' on 15637. The game port never gets listened to at all, so I'm not sure I understand what that's even for, to be honest.

So yeah, problem 2 of 2: Why don't custom ports work? :thinking:

eschack commented 8 months ago

So yeah, problem 2 of 2: Why don't custom ports work? 🤔

When I was troubleshooting my issues, I noticed that the numeric settings values (gameport, queryport and slotCount) where doublequoted in enshrouded_server.json inside the container.

If that is still the case, it would most likely be the reason your custom port is being ignored, as the server is being fed a string where it expects a number.

cp-fabian-pittroff commented 8 months ago

I had the same issue. @jsknnr just update the jq command to this jq --argjson g "$GAME_PORT" .... That removes the unwanted quotation on the ports and slot environments.

jsknnr commented 8 months ago

Nice find. I will make the change.

jsknnr commented 8 months ago

This has been fixed in image v2.0.2

bugbountyguy commented 8 months ago

Hey everyone, thanks a ton for the help with that. Finally got my server up and running on my custom port forward! Hoping to see someone figure out the solution to the 'network: host' problem, but in the meantime it should work this way. I really appreciate all the support, and thanks for trying to get that fix in place quickly @jsknnr !