thijsvanloef / palworld-server-docker

A Docker Container to easily run a Palworld dedicated server.
https://hub.docker.com/r/thijsvanloef/palworld-server-docker
MIT License
2.43k stars 295 forks source link

cli: execute: auth: rcon: dial tcp 127.0.0.1:25575: connect: connection refused #449

Closed DHS1001 closed 8 months ago

DHS1001 commented 8 months ago

Describe the bug

After starting the server, it showed the below message:

cli: execute: auth: rcon: dial tcp 127.0.0.1:25575: connect: connection refused

To Reproduce

Using docker composer to deploy

Expected behavior

rcon connect successfully

Actual behavior

Error message showed

OS information

Hardware information

docker-compose.yml contents

services:
   palworld:
      image: thijsvanloef/palworld-server-docker:latest
      restart: always
      container_name: Palworld-Server
      stop_grace_period: 30s
      ports:
        - 8211:8211/udp
        - 27015:27015/udp
        - 25575:25575/tcp
      environment:
        - PUID=xxx
        - PGID=xxx
        - PORT=8211
        - PLAYERS=2
        - SERVER_PASSWORD=xxx
        - MULTITHREADING=true
        - RCON_ENABLED=true
        - RCON_PORT=25575
        - TZ=xxxx
        - ADMIN_PASSWORD=xxxx
        - COMMUNITY=false
        - SERVER_NAME=xxx
        - SERVER_DESCRIPTION=xxx
        - AUTO_REBOOT_ENABLED= true
        - AUTO_REBOOT_CRON_EXPRESSION= 55 11 * * *
        - AUTO_REBOOT_WARN_MINUTES= 5
      volumes:
         - ../palworld:/palworld:rw
      network_mode: bridge

Container/Host Logs

[S_API FAIL] Tried to access Steam interface SteamUser021 before SteamAPI_Init succeeded.
[S_API FAIL] Tried to access Steam interface SteamFriends017 before SteamAPI_Init succeeded.
[S_API FAIL] Tried to access Steam interface STEAMAPPS_INTERFACE_VERSION008 before SteamAPI_Init succeeded.
[S_API FAIL] Tried to access Steam interface SteamNetworkingUtils004 before SteamAPI_Init succeeded.
cli: execute: auth: rcon: dial tcp 127.0.0.1:25575: connect: connection refused
Dashboy1998 commented 8 months ago

Player logging is attempting running rcon before the server finishes booting and rcon is started yet.

Not a big deal but should still be fixed.

DHS1001 commented 8 months ago

Player logging is attempting running rcon before the server finishes booting and rcon is started yet.

Not a big deal but should still be fixed.

There is no user currently trying to log in. It showed up just after starting the instance. Is there anything can do to confirm the rcon is working properly?

Dashboy1998 commented 8 months ago

You can run rcon to verify it's running correctly docker exec palworld-server rcon-cli info

Dashboy1998 commented 8 months ago

To clarify player logging runs on a timer. While it would be great to trigger based on a new player joining/leaving I don't know of a way for us to implement that.

DHS1001 commented 8 months ago

Thanks @Dashboy1998, just wondering the benefit of running rcon? Is it related to server management? Considering only two local users probably not worth to activate the rcon?

Dashboy1998 commented 8 months ago

Rcon is the only way to manage the server unless you do only in game commands.

Rcon is the only way for the container to trigger a save or properly shutdown.

Without rcon there's no way for the container to save so your backups might not actually be useful as player data and world data save out of sync.

DHS1001 commented 8 months ago

Thanks for the quick fixed :)

urbenlegend commented 8 months ago

This issue is still happening in my instance. I just pulled as of half an hour ago. Connecting to rcon via docker-compose exec -it palworld-server rcon-cli fails with cli: execute: auth: rcon: dial tcp 127.0.0.1:25575: connect: connection refused

Waiting for RCON port to open to show player logging... gets spammed repeatedly in the logs.

Here's the boot up log:

****EXECUTING USERMOD****
usermod: no changes
****Checking for new update****
Current Version: 3750364703337203431
The Server is up to date!
****GENERATING CONFIG****
Using Env vars to create PalWorldSettings.ini
****Compiling PalWorldSettings.ini****
Compiling PalWorldSettings.ini done!
****GENERATING CRONTAB****
BACKUP_ENABLED=true
Adding cronjob for auto backups
Cronjobs started
****Starting Server****
./PalServer.sh -port=8211 -queryport=27015 -useperfthreads -NoAsyncLoadingThread -UseMultithreadForDS
time="2024-02-27T04:17:56Z" level=info msg="read crontab: /home/steam/server/crontab"
[S_API] SteamAPI_Init(): Loaded local 'steamclient.so' OK.
Shutdown handler: initalize.
Increasing per-process limit of core file size to infinity.
- Existing per-process limit (soft=18446744073709551615, hard=18446744073709551615) is enough for us (need only 18446744073709551615)
CAppInfoCacheReadFromDiskThread took 0 milliseconds to initialize
Setting breakpad minidump AppID = 2394010
[S_API FAIL] Tried to access Steam interface SteamUser021 before SteamAPI_Init succeeded.
[S_API FAIL] Tried to access Steam interface SteamFriends017 before SteamAPI_Init succeeded.
[S_API FAIL] Tried to access Steam interface STEAMAPPS_INTERFACE_VERSION008 before SteamAPI_Init succeeded.
[S_API FAIL] Tried to access Steam interface SteamNetworkingUtils004 before SteamAPI_Init succeeded.
Waiting for RCON port to open to show player logging...
Waiting for RCON port to open to show player logging...
Waiting for RCON port to open to show player logging...
Waiting for RCON port to open to show player logging...

Here's my docker-compose:

services:
  palworld:
    image: thijsvanloef/palworld-server-docker:latest
    restart: always
    ports:
      - 8211:8211/udp
      - 27015:27015/udp
    environment:
      PUID: 1000
      PGID: 1000
      PORT: 8211
      SERVER_PASSWORD: "<redacted>"
      MULTITHREADING: true
      RCON_ENABLED: true
      RCON_PORT: 25575
      ADMIN_PASSWORD: "<redacted>"
      COMMUNITY: false # Enable this if you want your server to show up in the community servers tab, USE WITH SERVER_PASSWORD!
      SERVER_NAME: "<redacted>"
      SERVER_DESCRIPTION: "<redacted>"
      # Custom game settings
      PLAYERS: 32
      GUILD_PLAYER_MAX_NUM: 32
      COOP_PLAYER_MAX_NUM: 32
      PAL_EGG_DEFAULT_HATCHING_TIME: 24
    volumes:
      - ./palworld:/palworld/