jammsen / docker-sons-of-the-forest-dedicated-server

Docker container to easily provision and manage Sons of the Forest Dedicated Server with Wine
https://hub.docker.com/r/jammsen/sons-of-the-forest-dedicated-server
134 stars 19 forks source link

I have a problem with ports #6

Closed MrFireDevil closed 1 year ago

MrFireDevil commented 1 year ago

Log: [Self-Tests] [Networking] Some ports are closed or already in use and the game server will not be accessible. You may need to setup port forwarding and open them in your firewall, or change port numbers if they are used by some other software. Alternatively, consider using the LanOnly configuration if you didn't intend to make your server public. Please fix and restart.

Configuration:

version: '3.9'
services:
  server:
    container_name: sons-of-the-forest-dedicated-server
    image: jammsen/sons-of-the-forest-dedicated-server:latest
    restart: always
    ports:
      - 8766:8766/udp
      - 27016:27016/udp
      - 9700:9700/udp
    volumes:
      - sons_data:/steamcmd
      - sons_data:/sonsoftheforest
      - sons_data:/winedata
    tty: true
    stdin_open: true
volumes:
  sons_data:

Server:

image

image

csdnak commented 1 year ago

你和我的问题看起来相似,论坛里也有很多人都存在: [Self-Tests] [Networking] Failed to get public ip from Steam. [Self-Tests] Please restart the server.”Can you help me see why this error occurred? The server has internet access 就像问题所述的那样,无法通过自我检测导致服务器不会启动且要求你重启服务器!

csdnak commented 1 year ago

我将 dedicatedserver.cfg文件选项改为 "LanOnly": true 服务器则可以正常运行 ....

jammsen commented 1 year ago

你和我的问题看起来相似,论坛里也有很多人都存在: [Self-Tests] [Networking] Failed to get public ip from Steam. [Self-Tests] Please restart the server.”Can you help me see why this error occurred? The server has internet access 就像问题所述的那样,无法通过自我检测导致服务器不会启动且要求你重启服务器!

Please dont hijack other issues, make your own, or else its way harder to help you. Thanks.

Update: Oh sorry, i cant read chinese, i didnt had the context right at that time, all good you just tried to help, sorry for my miss-step.

jammsen commented 1 year ago

Hello @MrFireDevil Thanks for posting an issue, but your title says only port problem, but no "sentence about the problem" or context is given, that makes it REALLY hard to help you out here, its like fishing in the pitch black dark outside. While i like that you posted some hardware-specs, your compose-file and some screenshots, thats not enough sadly.

5 things i see:

  1. Please extend more on the logs and the "port-part" of the logs, before and after the "result" you have only posted here.
  2. Server HW, how much RAM is in "use" how many vCPUs do you use for the game-server and how many MHz/GHz has the processor?
  3. Your server will need the ability to firstly lookup "its" public-ip and you need to configure ports on your WAN-side to let ports 8766, 27016 & 9700 on udp go through to the server and be accessible, or else the self-test will not pass and the game-server refuses to start, thats normal behavior.
  4. Do you want to use "online-mode" or "lan-mode"?
  5. Your compose-file says you use a named volume "sons_data" for all 3 mounts-points, thats a BIG BIG No-No. I had a reason to split that for "TheForest" and "SonsOfTheForest" images, because it causes big-problems while running that, especially "winedata". If you want your server to run good, split that up in 3 directories or 3 named volumes. (I would always recommend "directories" if you ask me for my opinion.)
MrFireDevil commented 1 year ago

Hello @jammsen 👋🏻

Thank you very much for the very quick reply. You are right, giving only this log excerpt was not smart.

  1. here is my last log: https://just-paste.it/07tay2E16t I have not had any other problems so far, except the one with the ports.

  2. the server is running 2 things, once a Minecraft Modded server and then the Sons of the Forest server is supposed to run over it. I have 10 dedicated cores, how many are allocated to the Docker container I don't know unfortunately. Here is a Htop snippet: image

  3. as far as I can tell, this shouldn't be a problem. Through Docker, the ports are also published to the outside world, and should work as it does for other services as well.

  4. I want to use the online mode, because on the server people want to play.

  5. will take into account, did not think it would cause problems, since I actually paid attention to the paths that it should not cause problems. Don't know Docker perfectly either though, thanks for your information. I will adjust that:

version: '3.9'
services:
  server:
    container_name: sons-of-the-forest-dedicated-server
    image: jammsen/sons-of-the-forest-dedicated-server:latest
    restart: always
    ports:
      - 8766:8766/udp
      - 27016:27016/udp
      - 9700:9700/udp
    volumes:
      - sons_steam:/steamcmd
      - sons_game:/sonsoftheforest
      - sons_wine:/winedata
    tty: true
    stdin_open: true
volumes:
  sons_game:
  sons_steam:
  sons_wine:
jacoknapp commented 1 year ago

Ultimately, i have a similar problem. If i do lan only mode, everything works fine, and you can find the steam server etc using the game server registration. Ports forwarded correctly, etc. Reading through the discussion on the community page the internal port checker appears to not work very well. This causes issues with different network layouts and ISPs causing the server to not come up, even if the server is actually working. Hopefully the dev will release a patch to change the to have port check as a warning, and strengthen the port checker in the future.

MrFireDevil commented 1 year ago

@jacoknapp First of all, thank you for the information. I have added my server via Steam and of course changed my server to OnlyLan and restarted it, but when I try to connect to it, the following error message appears:

image

And in the game my server is also not displayed. Where should I be able to find my server in the game? So what do I have to specify as a source?

Dedicated, Peer-to-Peer, Only Lan?

jammsen commented 1 year ago

Hello @jammsen 👋🏻

Thank you very much for the very quick reply. You are right, giving only this log excerpt was not smart.

No worries!

  1. here is my last log: https://just-paste.it/07tay2E16t I have not had any other problems so far, except the one with the ports.

That log looks very good to me, the game-server is even able to determine your WAN-IP, i can see it in the log, but the reverse-lookup to your ports isn given, it looks like your ports are either closed or you use a shared IP or a ISP Firewall over maybe your Software-Router/FW combo.

  1. the server is running 2 things, once a Minecraft Modded server and then the Sons of the Forest server is supposed to run over it. I have 10 dedicated cores, how many are allocated to the Docker container I don't know unfortunately. Here is a Htop snippet: image

That should be plenty!

  1. as far as I can tell, this shouldn't be a problem. Through Docker, the ports are also published to the outside world, and should work as it does for other services as well.

Well without knowing or seeing your setup in a stream, i can only say its having port problems, everything else looks go to me.

  1. I want to use the online mode, because on the server people want to play.

Gotcha understand that

  1. will take into account, did not think it would cause problems, since I actually paid attention to the paths that it should not cause problems. Don't know Docker perfectly either though, thanks for your information. I will adjust that:

Just trying to help you up so you dont have 1 error after the other and dont know how to fix them 😄

jammsen commented 1 year ago

@jacoknapp ... Hopefully the dev will release a patch to change the to have port check as a warning, and strengthen the port checker in the future.

I dont wanna be that guy, but im really happy with this solution. Its way better then to old one, on TheForest you had connection problems to give advice to and no idea why and what is happening because they were no checks in place. This time i feel like they tried to make sure the server only starts and get running if all "must-haves" are solved. Sorry but i dont like chasing ghosts all the time and that helps me out to not do that. But also keep in mind i supported my TheForest image since 2019 a lot and it had almost 110k downloads.

csdnak commented 1 year ago

@MrFireDevil My current situation is the same as yours. If you have found a solution, please let me know quickly. Thank you very much!

jammsen commented 1 year ago

You guys have PFSENSE or OpenSense? https://steamcommunity.com/app/1326470/discussions/0/3808404524164518482/?ctp=6#c3808404963060221979

MrFireDevil commented 1 year ago

I haven't installed anything else, only UFW, but that doesn't cause any problems because it works great with all the other services.

jammsen commented 1 year ago

But doesnt UFW disable all ports on default? Are they open on the system?

MrFireDevil commented 1 year ago

I'm currently taking advice from a few others who may be familiar with it. But as soon as I have a solution or it might solve itself, I'll let you know

jammsen commented 1 year ago

Yeah sorry, without a stream or handson, im not much of help. At least in this type of network support, which is way over the support of source-code or the docker-image.

jacoknapp commented 1 year ago

Yeah, ultimately these are wall work arounds for something that is an issue in the dedicated server itself. Not an issue of the container, and will have to be resolved by a future dedicated server update.

MrFireDevil commented 1 year ago

@jammsen Nevertheless, I thank you very much for the quick help and hope that the problem will be solved very soon and above all that you make a Docker image available so quickly is great.

And regarding the question about UFW, yes all ports are closed, but UFW also only works with IP Tables and Docker and opens the ports automatically. At least as far as I know and have been told.

jacoknapp commented 1 year ago

@jammsen -- Looks like they updated the dedicated server to add a flag to ignore the network check. I don't think anything really has to be updated on your side, but in case it does figured i would let you know. Also you can close out this issue. Side note, how does updating the server work, does it automatically update or do i have to nuke the files every time/ is there a way to periodically update it

csdnak commented 1 year ago

@jammsen -- Looks like they updated the dedicated server to add a flag to ignore the network check. I don't think anything really has to be updated on your side, but in case it does figured i would let you know. Also you can close out this issue. Side note, how does updating the server work, does it automatically update or do i have to nuke the files every time/ is there a way to periodically update it

Thank you very much for your notification. I will quickly try and provide feedback on the results!

csdnak commented 1 year ago

@jammsen -- Looks like they updated the dedicated server to add a flag to ignore the network check. I don't think anything really has to be updated on your side, but in case it does figured i would let you know. Also you can close out this issue. Side note, how does updating the server work, does it automatically update or do i have to nuke the files every time/ is there a way to periodically update it

Thank you very much for your notification. I will quickly try and provide feedback on the results!

"SkipNetworkAccessibilityTest": true, Updating the server and adding this configuration effectively bypassed network monitoring

jammsen commented 1 year ago

Yeah i just seeing this: https://steamcommunity.com/app/1326470/discussions/0/3808404524164518482/?tscn=1687899453#c3808404963065217777

Add this to your config and that should to the trick AFTER updating your server.

@jacoknapp - Looks like they updated the dedicated server to add a flag to ignore the network check. ..... Side note, how does updating the server work, does it automatically update or do i have to nuke the files every time/ is there a way to periodically update it

6-7 hours ago i was still sleeping, would be 6am here in Germany 😄 but yeah i was working on that this morning, look at #8 - you have to pull the new image and setup your docker-compose file like in the new readme.

Hope everyone is now happy and have fun gaming and let me know if something doesnt work!

jammsen commented 1 year ago

@MrFireDevil If the problem is solved, feel free to close the ticket please.

MrFireDevil commented 1 year ago

Thanks for the info, I'll close the ticket now. I wish you all a lot of fun playing as well ❤️