Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This server is full or unavailable | enshrouded-server [online] Session failed for peer #0 with error 4. #125

Open
1 task done
jzt308 opened this issue Dec 23, 2024 · 4 comments
Labels
bug 🐞 Something isn't working

Comments

@jzt308
Copy link

jzt308 commented Dec 23, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Used image version

1.4.1

Used docker compose file or docker command

services:
  enshrouded:
    image: mornedhels/enshrouded-server:1.4.1
    container_name: enshrouded
    restart: unless-stopped
    security_opt:
      - no-new-privileges:true
    stop_grace_period: 90s
    volumes:
      - ./volumes/data:/opt/enshrouded
    ports:
      - 15637:15637/udp
    environment:
      - SERVER_NAME=Enshrouded
      - SERVER_IP=0.0.0.0
      - SERVER_SLOT_COUNT=6
      - SERVER_SLOTS=6
      - UPDATE_CRON=*/30 * * * *
      - BACKUP_CRON=* */6 * * *
      - BACKUP_MAX_COUNT=5
      - SERVER_ROLE_1_NAME=Admin
      - SERVER_ROLE_1_PASSWORD=SOMEPASS
      - SERVER_ROLE_1_CAN_KICK_BAN=true
      - SERVER_ROLE_1_CAN_ACCESS_INVENTORIES=true
      - SERVER_ROLE_1_CAN_EDIT_BASE=true
      - SERVER_ROLE_1_CAN_EXTEND_BASE=true
      - SERVER_ROLE_1_RESERVED_SLOTS=1
      - SERVER_ROLE_2_NAME=Friend
      - SERVER_ROLE_2_PASSWORD=SOMEOTHERPASS
      - SERVER_ROLE_2_CAN_KICK_BAN=false
      - SERVER_ROLE_2_CAN_ACCESS_INVENTORIES=true
      - SERVER_ROLE_2_CAN_EDIT_BASE=true
      - SERVER_ROLE_2_CAN_EXTEND_BASE=true
      - SERVER_ROLE_2_RESERVED_SLOTS=3
      - SERVER_ROLE_3_NAME=Guest
      - SERVER_ROLE_3_PASSWORD=THEBESTOTHERPASS
      - SERVER_ROLE_3_CAN_KICK_BAN=false
      - SERVER_ROLE_3_CAN_ACCESS_INVENTORIES=false
      - SERVER_ROLE_3_CAN_EDIT_BASE=false
      - SERVER_ROLE_3_CAN_EXTEND_BASE=false
      - SERVER_ROLE_3_RESERVED_SLOTS=0
    logging:
      driver: loki
      options:
        loki-url: "https://LOKIENDPOINT/loki/api/v1/push"
        loki-external-labels: job=dockerlogs

What you expected to see, versus what you actually saw

I added my server to my steam servers and am able to see it in game as my favorite.
afbeelding

I also am able to connect and get prompted for a password of the option to access without password (The Guest Role).
afbeelding

On the client I get a loading screen
afbeelding

And after a little while:
afbeelding

I would expect to be loaded into the game and connect to the server but this is not the case.

This is on all combinations: so new character/old character; no password; friend password; admin password it doesn't matter. The result is always the same.
The server logs are added below.

I searched on the internet and found several postings (mainly steam) describing the same error and tried some solutions. Using a new character, binding the server to the host machine (docker) or changing the server_ip var inside the compose file either to the actual server ip of the localhost (127.0.0.1) address non worked.

Also I double checked the docker and host logs and my firewall to see if connections are being blocked (not the case as far as I can see). Only some warnings (rsyslogd: warning: ~ action is deprecated, consider using the 'stop' statement instead [v8.2312.0 try https://www.rsyslog.com/e/2307) unrelated to my issue.

Just FYI I also run valheim and satisfactory servers (and redm) on this machine without any issues.

Logs from the container

enshrouded  | 2024-12-23 21:17:44.398 supervisord: enshrouded-server ---------------------------------------
enshrouded  | 2024-12-23 21:17:47.372 supervisord: enshrouded-server [online] Session accepted with peer ( id 76561198141176845 ).
enshrouded  | 2024-12-23 21:17:47.372 supervisord: enshrouded-server [online] Added Peer #0.
enshrouded  | 2024-12-23 21:17:50.120 supervisord: enshrouded-server STEAMPS3 - AsyncTCPSocket created
enshrouded  | 2024-12-23 21:18:02.344 supervisord: enshrouded-server [online] Session failed for peer #0 with error 4.
enshrouded  | 2024-12-23 21:18:02.345 supervisord: enshrouded-server STEAMPS3 - AsncTCPSocket destroyed
enshrouded  | 2024-12-23 21:18:02.346 supervisord: enshrouded-server [online] Removed Peer #0.
enshrouded  | 2024-12-23 21:18:14.404 supervisord: enshrouded-server -------------- Session ----------------
@jzt308 jzt308 added the bug 🐞 Something isn't working label Dec 23, 2024
@cp-fabian-pittroff
Copy link
Member

Hey there, this seems to be a problem with the enshrouded server itself not the container. I read somewhere, that this is a network related issue. You could try using docker host networking and test if that helps.

Also if you have a firewall with outgoing rules, could you try to disable them and allow incomming established tcp connections?

@jzt308
Copy link
Author

jzt308 commented Dec 24, 2024

Can confirm when using the following docker-compose (and disable the hosts firewall) it works

services:
enshrouded:
image: mornedhels/enshrouded-server:latest
container_name: enshrouded
restart: unless-stopped
security_opt:
- no-new-privileges:true
stop_grace_period: 90s
volumes:
- ./volumes/data:/opt/enshrouded
network_mode: host
environment:
- SERVER_NAME=Enshrouded-Metapod
- SERVER_IP=0.0.0.0
- SERVER_SLOT_COUNT=6
- SERVER_SLOTS=6
- UPDATE_CRON=/30 * * * *
- BACKUP_CRON=
*/6 * * *
- BACKUP_MAX_COUNT=5
- SERVER_ROLE_1_NAME=Admin
- SERVER_ROLE_1_PASSWORD=PASS
- SERVER_ROLE_1_CAN_KICK_BAN=true
- SERVER_ROLE_1_CAN_ACCESS_INVENTORIES=true
- SERVER_ROLE_1_CAN_EDIT_BASE=true
- SERVER_ROLE_1_CAN_EXTEND_BASE=true
- SERVER_ROLE_1_RESERVED_SLOTS=1
- SERVER_ROLE_2_NAME=Friend
- SERVER_ROLE_2_PASSWORD=PASSTWO
- SERVER_ROLE_2_CAN_KICK_BAN=false
- SERVER_ROLE_2_CAN_ACCESS_INVENTORIES=true
- SERVER_ROLE_2_CAN_EDIT_BASE=true
- SERVER_ROLE_2_CAN_EXTEND_BASE=true
- SERVER_ROLE_2_RESERVED_SLOTS=3
- SERVER_ROLE_3_NAME=Guest
- SERVER_ROLE_3_PASSWORD=PASSTHREE
- SERVER_ROLE_3_CAN_KICK_BAN=false
- SERVER_ROLE_3_CAN_ACCESS_INVENTORIES=false
- SERVER_ROLE_3_CAN_EDIT_BASE=false
- SERVER_ROLE_3_CAN_EXTEND_BASE=false
- SERVER_ROLE_3_RESERVED_SLOTS=0
logging:
driver: loki
options:
loki-url: "https://COOL/loki/api/v1/push"
loki-external-labels: job=dockerlogs

Seems strange though as all other containers (the mentioned on this server, but on all my server combined I guess 20+ containers) with no issues when using docker networking and passing ports.
Any idea what might be the root cause?

@jzt308
Copy link
Author

jzt308 commented Dec 24, 2024

Ok just checked with my firewall logging on. Apparently the game connects to the exposed UDP port. Then the gameserver and client work out what UDP port will be used to connect to the play session.

So in my 2 quick tests my client used UDP 33823 and in a different session 35375 (to the same server).
So the cause is only the control UDP port is exposed and the port it tries to open for the game isn't exposed on the dockerhost resulting in the connection error (the server is unresponsive triggering the game behavior I showed in the printscreen.

By using host networking the server can use any (UDP) port and so it works.
It would be nice to know what UDP range it uses so you can expose this from the container/dockerhost and exposing the entire container would not be necessary.

@cp-fabian-pittroff
Copy link
Member

I'm not sure why enshrouded opens other random ports and there is no option to customize them. The spooky part, I have several machines and all run without network_mode: host and are working without a problem. So not sure why your setup needs the host network.

And I'm not sure why enshrouded would start a TCP connection (AsyncTCPSocket created). Maybe this is a fallback mechanic, if the random UDP Port doesn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants