zhliau / fika-headless-docker

Docker image to run SPT + Fika client headless, to provide a packaged dedicated client for raid hosting
Other
20 stars 7 forks source link

fika dedicated client not starting properly #21

Open unai-ndz opened 1 week ago

unai-ndz commented 1 week ago

I'm getting this when starting fika-headless:

Nov 18 14:38:06 server1 eft-fika[1389439]: a5235d2bfbadae60faee3f2c816bd9515960d1dc6a760d11a6c3686f6e6ce2c1
Nov 18 14:38:06 server1 eft-fika[1389501]: Running Xvfb in background for modsync
Nov 18 14:38:06 server1 eft-fika[1389501]: Starting Xvfb in background
Nov 18 14:38:06 server1 eft-fika[1389501]: Starting client. Xvfb running PID is 3
Nov 18 14:38:06 server1 eft-fika[1389501]: Using wine executable /wine-ge/lutris-GE-Proton8-26-x86_64/bin/wine
Nov 18 14:38:06 server1 eft-fika[1389501]: 3
Nov 18 14:38:06 server1 eft-fika[1389501]: wineserver: using server-side synchronization.
Nov 18 14:38:06 server1 eft-fika[1381644]: wine: RLIMIT_NICE is <= 20, unable to use setpriority safely
Nov 18 14:43:07 server1 eft-fika[1381644]: Mono path[0] = 'Z:/opt/tarkov/EscapeFromTarkov_Data/Managed'
Nov 18 14:43:07 server1 eft-fika[1381644]: Mono config path = 'Z:/opt/tarkov/MonoBleedingEdge/etc'
Nov 18 14:43:07 server1 eft-fika[1381644]: Fallback handler could not load library Z:/opt/tarkov/EscapeFromTarkov_Data/Mono/lib/usr/lib/libSystem.dylib
Nov 18 14:43:07 server1 eft-fika[1381644]: Fallback handler could not load library Z:/opt/tarkov/EscapeFromTarkov_Data/Mono/lib/usr/lib/libSystem.dylib.dll
Nov 18 14:43:07 server1 eft-fika[1381644]: Fallback handler could not load library Z:/opt/tarkov/EscapeFromTarkov_Data/Mono/lib/usr/lib/libSystem.dylib
Nov 18 14:43:07 server1 eft-fika[1381644]: Fallback handler could not load library Z:/opt/tarkov/EscapeFromTarkov_Data/Mono/libc.so.6
Nov 18 14:43:07 server1 eft-fika[1381644]: Fallback handler could not load library Z:/opt/tarkov/EscapeFromTarkov_Data/Mono/libc.so.6.dll
Nov 18 14:43:07 server1 eft-fika[1381644]: Fallback handler could not load library Z:/opt/tarkov/EscapeFromTarkov_Data/Mono/libc.so.6
Nov 18 14:43:07 server1 eft-fika[1381644]: Fallback handler could not load library Z:/opt/tarkov/EscapeFromTarkov_Data/Mono/data-0000000065B0F100.dll

fika podman quadlet

[Container]
ContainerName=eft-fika
Image=ghcr.io/zhliau/fika-headless-docker:master
Pod=eft.pod
AddCapability=SYS_ADMIN
#PUID=2000 PGID=2000
Environment=AUTO_UPDATE=true TZ=Europe/Madrid
Environment=PROFILE_ID=673373430004126ccbe1e502 SERVER_URL=192.168.1.10 SERVER_PORT=6969
Environment=USE_MODSYNC=true ENABLE_LOG_PURGE=true AUTO_RESTART_ON_RAID_END=true FSYNC=true INSTALL_OTHER_MODS=true
# Environment=DISABLE_NODYNAMICAI=true # Can help if server fps drop below 30
Volume=/etc/machine-id:/etc/machine-id:ro
Volume=/mnt/m2/eft/spt:/opt/tarkov:z
#port 25565
Network=host

[Unit]
After=eft-spt.service

Requires=network-online.target
After=network.target

# Restart service only once on failure after 3 seconds
StartLimitBurst=2
StartLimitInterval=11
# StartLimitInterval > RestartSec * StartLimitBurst

[Service]
# Restart service only once on failure after 3 seconds
Restart=on-failure
RestartSec=3

spt server podman quadlet

[Container]
ContainerName=eft-spt
Image=ghcr.io/zhliau/fika-spt-server-docker:latest
Pod=eft.pod
Environment=TIME_ZONE=Europe/Madrid
Environment=AUTO_UPDATE_SPT=true INSTALL_FIKA=true SERVER_PORT=6969 SERVER_URL=192.168.1.10
Volume=/mnt/m2/eft/spt:/opt/server:z
Network=host

[Unit]
Requires=network-online.target
After=network.target

# Restart service only once on failure after 3 seconds
StartLimitBurst=2
StartLimitInterval=11
# StartLimitInterval > RestartSec * StartLimitBurst

[Service]
# Restart service only once on failure after 3 seconds
Restart=on-failure
RestartSec=3

/mnt/m2/eft/spt is a copy from a windows host to a linux server, I had to remove SPT.Server.exe so it got reinstalled as it was a windows binary and it failed to run. Both SPT and fika containers run on the same host. I'm using the same /mnt/m2/eft/spt installation path for both SPT and fika. I assume this is the intended method but correct me if I'm wrong. The STP server is now working but the dedicated client is not being started.

 nc -vzw 2 192.168.1.10 6969
Ncat: Version 7.92 ( https://nmap.org/ncat )
Ncat: Connected to 192.168.1.10:6969.
Ncat: 0 bytes sent, 0 bytes received in 0.01 seconds.

root@server1 ~
 nc -vzw 2 192.168.1.10 25565
Ncat: Version 7.92 ( https://nmap.org/ncat )
Ncat: Connection refused.

I also checked https://github.com/zhliau/fika-headless-docker?tab=readme-ov-file#stuck-right-after-bepinex-preloader-finished

But I'm not using virtualization, Fika.Core.dll and Fika.Dedicated.dll are properly installed and I have a profile.json matching the PROFILE_ID of the container.

Any idea what could be going wrong?

unai-ndz commented 1 week ago

I may have fixed it by building the docker file manually ~and installing libc6~. Will check tomorrow.

zhliau commented 6 days ago

Your headless image tag is wrong, it should reference latest or v1.4.2 instead of master. Can you try again with that correct tag?

zhliau commented 6 days ago

Also, I noticed that you are mounting the same directory into both the SPT server container and the headless client container. Does /mnt/m2/eft/spt contain a working copy of the EFT client as well as the SPT server files/directories? While theoretically this should work, I would recommend separating out the SPT server and EFT client directories, it makes things cleaner in my opinion.

You will not be able to connect on 25565 if the dedicated client is not currently hosting a raid. This port is only listening once a raid has been started on this dedicated client by another client selecting Use dedicated host when starting a raid.

Do you see requests to the fika/raid/dedicated/status endpoint in the SPT server container?

unai-ndz commented 6 days ago

Fixed the image tag and it's looking better.

Nov 19 08:56:52 server1 eft-fika[1534144]: Enabling wine fsync
Nov 19 08:56:52 server1 eft-fika[1534144]: Running Xvfb in background for modsync
Nov 19 08:56:52 server1 eft-fika[1534144]: Running Xvfb in background for raid end autorestart
Nov 19 08:56:52 server1 eft-fika[1534144]: Running wineboot update. Please wait ~60s. See wine.log for logs.
Nov 19 08:57:48 server1 eft-fika[1534144]: Enabling log purge
Nov 19 08:57:48 server1 eft-fika[1534144]: Starting crond
Nov 19 08:57:48 server1 eft-fika[1534144]: Reloading configuration files for periodic command scheduler: cron.
Nov 19 08:57:48 server1 eft-fika[1534144]: Starting periodic command scheduler: cron.
Nov 19 08:57:48 server1 eft-fika[1534144]: Starting Xvfb in background
Nov 19 08:57:48 server1 eft-fika[1534144]: Xvfb running PID is 179
Nov 19 08:57:48 server1 eft-fika[1534144]: Using wine executable /wine-ge/lutris-GE-Proton8-26-x86_64/bin/wine
Nov 19 08:57:48 server1 eft-fika[1534144]: EFT PID is 180
Nov 19 08:57:48 server1 eft-fika[1534144]: Waiting for EFT to exit
Nov 19 08:57:48 server1 eft-fika[1534144]: Starting BepInEx/LogOutput.log watch for auto-restart on raid end
Nov 19 08:57:48 server1 eft-fika[1534144]: [Info   :RequestHandler] [REQUEST]: /fika/client/check/mods
Nov 19 08:57:48 server1 eft-fika[1534144]: [Info   :RequestHandler] [REQUEST SUCCESSFUL] /fika/client/check/mods
Nov 19 08:57:48 server1 eft-fika[1534144]: [Info   : Dedicated] Plugins verified successfully
Nov 19 08:57:48 server1 eft-fika[1534144]: [Info   : Dedicated] Setting graphics and volume
Nov 19 08:57:48 server1 eft-fika[1534144]: [Info   :RequestHandler] [REQUEST]: /singleplayer/log
Nov 19 08:57:48 server1 eft-fika[1534144]: [Info   :RequestHandler] [REQUEST SUCCESSFUL] /singleplayer/log
Nov 19 08:57:48 server1 eft-fika[1534144]: [Info   :RequestHandler] [REQUEST]: /singleplayer/log
Nov 19 08:57:48 server1 eft-fika[1534144]: [Info   :RequestHandler] [REQUEST SUCCESSFUL] /singleplayer/log
Nov 19 08:57:48 server1 eft-fika[1534144]: [Info   :RequestHandler] [REQUEST]: /singleplayer/log
Nov 19 08:57:48 server1 eft-fika[1534144]: [Info   :RequestHandler] [REQUEST SUCCESSFUL] /singleplayer/log

Some requests to fika/raid/dedicated/getstatus but I think they are produced by the normal game client, not the dedicated one.

I also get this eft-spt[1537571]: Found 1 dedicated client profiles. but on the game client I cannot tick the Use dedicated client option. Will investaigate more later, thanks for the help.

zhliau commented 6 days ago

Some requests to fika/raid/dedicated/getstatus but I think they are produced by the normal game client,

Yes, these requests are from the player client (not the dedicated client) matchmaking UI attempting to query for available dedicated clients.

I also get this eft-spt[1537571]: Found 1 dedicated client profiles.

This is not really relevant, the SPT server spits this line out when going through all profiles to search for dedicated client profiles

What is the list of mods you have installed on the dedicated client? Can you post the output of ls -la /mnt/m2/eft/spt/BepInEx/plugins?

unai-ndz commented 4 days ago
 tree /mnt/m2/eft/spt/BepInEx/plugins
/mnt/m2/eft/spt/BepInEx/plugins
├── Corter-ModSync.dll
├── Fika.Core.dll
├── Fika.Dedicated.dll
└── spt
    ├── ConfigurationManager.dll
    ├── ConfigurationManager.xml
    ├── spt-common.dll
    ├── spt-core.dll
    ├── spt-custom.dll
    ├── spt-debugging.dll
    ├── spt-reflection.dll
    └── spt-singleplayer.dll

No hidden files either.