lloesche / valheim-server-docker

Valheim dedicated gameserver with automatic update, World backup, BepInEx and ValheimPlus mod support
https://hub.docker.com/r/lloesche/valheim-server
Apache License 2.0
1.92k stars 269 forks source link

Crossplay not working with latest patch #504

Open pkonecki opened 1 year ago

pkonecki commented 1 year ago

Crossplay uses Playfab which has dependencies that aren't in the dockerfile. Apparenty these are: libpulse-dev libatomic1 libc6 2.29+ (from the valheim discord server #dedicated-server-help channel) which would mean the dockerfile would need to be based on the debian bullseye. I have not tested building the image yet so I can't vouch for the recommendations.

away168 commented 1 year ago

I tried using pre and post hooks to run apt-get update && apt-get install -y libpulse-dev libatomic1 libc6 but it caused the server to crash.

cadteam95 commented 1 year ago

I tried using pre and post hooks to run apt-get update && apt-get install -y libpulse-dev libatomic1 libc6 but it caused the server to crash.

Great !!! it works well.. Thanks

away168 commented 1 year ago

@cadteam95 which pre/post hook did you use? I couldn't get it to work, so curious what you might have done differently

shad-lp commented 1 year ago

Right now, on server side I've disabled V+, I also let -STEAMCMD_ARGS=-beta default_old as it points on version 0.211.7. When I install the dependencies listed previously, my server crashes.

I can't spend more time now on it now but I'll check if any future update makes things move on.

cadteam95 commented 1 year ago

@cadteam95 which pre/post hook did you use? I couldn't get it to work, so curious what you might have done differently

sorry this git crash too. but https://github.com/Nimdy/Dedicated_Valheim_Server_Script (it has same problem!) is success thanks

shad-lp commented 1 year ago

@away168 Found a temporary solution.

With this I can connect again to my server. It will probably not work again when default_old will point to 0.211.8.

lloesche commented 1 year ago

We just merged #508 which should solve this issue. At the same time this upgrade the base image from Debian 10 to Debian 11. Last time we tried this, it caused #401 because the newer libc of Debian 11 had issues with older host Kernels, predominantly found in NAS systems. It's been a while since then, so we'll have to see if the issue has been solved in Debian 10. If not we'll create a separate :nas tag that stays on Debian 10 but won't have the crossplay support.

shad-lp commented 1 year ago

I can confirm that I can now start the server with -crossplay enabled. Yet, the version is still 0.211.7, so I have to stick on the "default_old" branch on Steam.

DrWarpMan commented 1 year ago

Crossplay works fine, but how do we fix / get rid of this debug message? It is probably related to this problem: https://github.com/lloesche/valheim-server-docker/pull/508#issuecomment-1264689317 image

lloesche commented 1 year ago

Crossplay works fine, but how do we fix / get rid of this debug message?

Interesting, when I start my server locally I will eventually see

Oct  7 12:17:43 /supervisord: valheim-server DEBUG - [183] - Waiting for server to listen on UDP port 2456
...
...
Oct  7 12:17:48 /supervisord: valheim-server DEBUG - [183] - Server is now listening on UDP port 2456

in the log. Is that not the case in your environment?

What are your settings? I'll try to replicate the issue.

DrWarpMan commented 1 year ago

It waits forever for the 2456 UDP port.

docker-compose:

services:
  valheim:
    image: ghcr.io/lloesche/valheim-server
    cap_add:
      - sys_nice
    volumes:
      - ./config:/config
      - ./data:/opt/valheim
    ports:
      - "2456-2457:2456-2457/udp"
    env_file:
      - ./valheim.env
    restart: always
    stop_grace_period: 2m

valheim.env:

SERVER_PUBLIC=true
SERVER_ARGS=-crossplay
PUID=1000
PGID=1000

UPDATE_CRON=""
RESTART_CRON=""
mmis1000 commented 1 year ago

It waits forever for the 2456 UDP port.

docker-compose:

services:
  valheim:
    image: ghcr.io/lloesche/valheim-server
    cap_add:
      - sys_nice
    volumes:
      - ./config:/config
      - ./data:/opt/valheim
    ports:
      - "2456-2457:2456-2457/udp"
    env_file:
      - ./valheim.env
    restart: always
    stop_grace_period: 2m

valheim.env:

SERVER_PUBLIC=true
SERVER_ARGS=-crossplay
PUID=1000
PGID=1000

UPDATE_CRON=""
RESTART_CRON=""

I think it is a false positive. You can still connect to it even it said that.

But I didn't figure out. If it did not open the port 2456, how did I actually connected to it, did the playfab do a UDP hole punching by itself?

Also the steam a2s port always report 0 players for some reason and cause the server to restart every 15 minutes.

DrWarpMan commented 1 year ago

Yes, the server works fine.

And that is why I disabled the auto restart thingy.

away168 commented 1 year ago

with Crossplay enabled, don't you need a join code to connect to the server?

also is this any way related? libparty load library error.

Oct  7 15:51:46 /supervisord: valheim-server Fallback handler could not load library /opt/valheim/server/valheim_server_Data/Mono/libparty
Oct  7 15:51:46 /supervisord: valheim-server Fallback handler could not load library /opt/valheim/server/valheim_server_Data/Mono/libparty.so
Oct  7 15:51:46 /supervisord: valheim-server Fallback handler could not load library /opt/valheim/server/valheim_server_Data/Mono/party
Oct  7 15:51:46 /supervisord: valheim-server Fallback handler could not load library /opt/valheim/server/valheim_server_Data/Mono/libparty
Oct  7 15:51:46 /supervisord: valheim-server Fallback handler could not load library /opt/valheim/server/valheim_server_Data/Mono/libparty.so
Oct  7 15:51:46 /supervisord: valheim-server Fallback handler could not load library /opt/valheim/server/valheim_server_Data/Mono/libparty
Oct  7 15:51:46 /supervisord: valheim-server Fallback handler could not load library /opt/valheim/server/valheim_server_Data/Mono/libparty
Oct  7 15:51:46 /supervisord: valheim-server Fallback handler could not load library /opt/valheim/server/valheim_server_Data/Mono/libparty.so
Oct  7 15:51:46 /supervisord: valheim-server Fallback handler could not load library /opt/valheim/server/valheim_server_Data/Mono/party
Oct  7 15:51:46 /supervisord: valheim-server Fallback handler could not load library /opt/valheim/server/valheim_server_Data/Mono/libparty
Oct  7 15:51:46 /supervisord: valheim-server Fallback handler could not load library /opt/valheim/server/valheim_server_Data/Mono/libparty.so
Oct  7 15:51:46 /supervisord: valheim-server Fallback handler could not load library /opt/valheim/server/valheim_server_Data/Mono/libparty
Oct  7 15:51:46 /supervisord: valheim-server DllNotFoundException: party
Oct  7 15:51:46 /supervisord: valheim-server   at (wrapper managed-to-native) PartyCSharpSDK.Interop.PFPInterop.PartyInitialize(byte[],PartyCSharpSDK.Interop.PARTY_HANDLE&)
Oct  7 15:51:46 /supervisord: valheim-server   at PartyCSharpSDK.SDK.PartyInitialize (System.String titleId, PartyCSharpSDK.PARTY_HANDLE& handle) [0x00006] in <4d5b8d2a94a347d09410b73b7f7ad47f>:0
Oct  7 15:51:46 /supervisord: valheim-server   at PlayFab.Party.PlayFabMultiplayerManager.InitializeImpl () [0x000be] in <4d5b8d2a94a347d09410b73b7f7ad47f>:0
Oct  7 15:51:46 /supervisord: valheim-server   at PlayFab.Party.PlayFabMultiplayerManager._Initialize () [0x0000a] in <4d5b8d2a94a347d09410b73b7f7ad47f>:0
Oct  7 15:51:46 /supervisord: valheim-server   at PlayFab.Party.PlayFabMultiplayerManager.Start () [0x00000] in <4d5b8d2a94a347d09410b73b7f7ad47f>:0

also my log contains server reconnect/disconnect messages:

Oct  7 16:08:55 /supervisord: valheim-server 10/07/2022 16:08:55: PlayFab reconnect server 'TheWays'
Oct  7 16:08:55 /supervisord: valheim-server 10/07/2022 16:08:55: Server 'TheWays' begin PlayFab create and join network for server
Oct  7 16:08:59 /supervisord: valheim-server DEBUG - [134] - Waiting for server to listen on UDP port 2456
Oct  7 16:09:04 /supervisord: valheim-server DEBUG - [134] - Waiting for server to listen on UDP port 2456
Oct  7 16:09:09 /supervisord: valheim-server DEBUG - [134] - Waiting for server to listen on UDP port 2456
Oct  7 16:09:14 /supervisord: valheim-server DEBUG - [134] - Waiting for server to listen on UDP port 2456
Oct  7 16:09:19 /supervisord: valheim-server DEBUG - [134] - Waiting for server to listen on UDP port 2456
Oct  7 16:09:19 /supervisord: valheim-server 10/07/2022 16:09:19: PlayFab disconnect server 'TheWays' from network
DrWarpMan commented 1 year ago

@away168 Are you actually using the updated docker image? I did not join by code, I added the server to favorites, through community server list (where I searched for it's name) and connected through the menu.

away168 commented 1 year ago

@DrWarpMan you were correct. I mistakenly thought docker would auto download the latest image (like k8s), but after I manually pulled the latest docker image, it started working! 🙇‍♂️ -- And now I just get the same "Waiting for server ..." spam in my logs.

sidenote: instead of searching the public community server - I used the join code from the logs.

Nimdy commented 1 year ago

I tried using pre and post hooks to run apt-get update && apt-get install -y libpulse-dev libatomic1 libc6 but it caused the server to crash.

Great !!! it works well.. Thanks

It works now

Kiaos commented 1 year ago

Anyone know why i get supervisord: valheim-server DEBUG - [150] - Waiting for server to listen on UDP port 2456

Concretv commented 1 year ago

We just merged #508 which should solve this issue. At the same time this upgrade the base image from Debian 10 to Debian 11. Last time we tried this, it caused #401 because the newer libc of Debian 11 had issues with older host Kernels, predominantly found in NAS systems. It's been a while since then, so we'll have to see if the issue has been solved in Debian 10. If not we'll create a separate :nas tag that stays on Debian 10 but won't have the crossplay support.

Hi ! Thank you very much for your work. I can confirm that latest image leads to Synology issues (server hangs and needs to be hard reset) Tested on a Synology DS720+ and latest Synology update (DSM 7.1.1).

Regards.

mdreier commented 1 year ago

The installation/update was also hanging on my Ubuntu 19.10 server. An upgrade to 22.04 LTS fixed it.

an-englishman commented 1 year ago

I can also confirm that the latest image leads to Synology issues (server hangs and needs to be hard reset). Tested on a Synology DS3617xs and the latest Synology update (DSM 7.1.1-42962 Update 2).

Concretv commented 1 year ago

I can also confirm that the latest image leads to Synology issues (server hangs and needs to be hard reset). Tested on a Synology DS3617xs and the latest Synology update (DSM 7.1.1-42962 Update 2).

You need to use the newly added "lloesche/valheim-server:debian10" branch for Synology Nas. It works with both latest DSM update and latest Valheim updates.

IslandJohn commented 1 year ago

Is this still the case for Synology? On my DS920+ "latest" runs, but I can't connect. Will the debian10 pinning mean no crossplay?

alandwiprasetyo commented 1 year ago

image

I got message like this, icant connect server and i try to grep log "Game server connected" is not found. how to handle this situation?

valheim.env

`` SERVER_NAME=mloko valheim WORLD_NAME=mloko valheim SERVER_PASS=xxxxxxx SERVER_PUBLIC=true SERVER_ARGS=-crossplay PUID=1000 PGID=1000

UPDATE_CRON="" RESTART_CRON="" ``

cat docker-compose.yaml

version: "3" services: valheim: image: ghcr.io/lloesche/valheim-server cap_add: