jammsen / docker-palworld-dedicated-server

Docker container to easily provision and manage Palworld Dedicated Server
https://hub.docker.com/r/jammsen/palworld-dedicated-server
MIT License
898 stars 151 forks source link

[Bug Report] "authentication failed" error occurred when using RCON #178

Closed zwh8800 closed 5 months ago

zwh8800 commented 5 months ago

Have you read the Important information text above

Current behavior

I created the server using the recommended docker-compose.yml and default.env files (only modified the password). Then I logged into the container using docker exec -ti palworld-dedicated-server bash. When I use the command "rcon showplayers", it produces the following error:

cli: execute: auth: rcon: authentication failed

my docker-compose.yml is:

version: '3.9'
services:
  palworld-dedicated-server:
    #build: .
    container_name: palworld-dedicated-server
    image: jammsen/palworld-dedicated-server:latest
    restart: unless-stopped
    ports:
      - target: 8211 # Gamerserver port inside of the container
        published: 8211 # Gamerserver port on your host
        protocol: udp
        mode: host
      - target: 25575 # RCON port inside of the container
        published: 25575 # RCON port on your host
        protocol: tcp
        mode: host
    env_file:
      - ./default.env
    volumes:
      - /home/zzz/pal-data:/palworld

my default.env is:

# Change this for logging and backup, see "Environment variables" in the README.md
TZ=Asia/Shanghai
ALWAYS_UPDATE_ON_START=true
MULTITHREAD_ENABLED=true
COMMUNITY_SERVER=true
BACKUP_ENABLED=true
BACKUP_CRON_EXPRESSION=0 * * * *
BACKUP_RETENTION_POLICY=false
BACKUP_RETENTION_AMOUNT_TO_KEEP=30
STEAMCMD_VALIDATE_FILES=true
# Change this to manual if you want to edit your configs yourself
SERVER_SETTINGS_MODE=auto 
NETSERVERMAXTICKRATE=120
DIFFICULTY=None
DAYTIME_SPEEDRATE=1.000000
NIGHTTIME_SPEEDRATE=1.000000
EXP_RATE=1.000000
PAL_CAPTURE_RATE=1.000000
PAL_SPAWN_NUM_RATE=1.000000
PAL_DAMAGE_RATE_ATTACK=1.000000
PAL_DAMAGE_RATE_DEFENSE=1.000000
PLAYER_DAMAGE_RATE_ATTACK=1.000000
PLAYER_DAMAGE_RATE_DEFENSE=1.000000
PLAYER_STOMACH_DECREASE_RATE=1.000000
PLAYER_STAMINA_DECREACE_RATE=1.000000
PLAYER_AUTO_HP_REGENE_RATE=1.000000
PLAYER_AUTO_HP_REGENE_RATE_IN_SLEEP=1.000000
PAL_STOMACH_DECREACE_RATE=1.000000
PAL_STAMINA_DECREACE_RATE=1.000000
PAL_AUTO_HP_REGENE_RATE=1.000000
PAL_AUTO_HP_REGENE_RATE_IN_SLEEP=1.000000
BUILD_OBJECT_DAMAGE_RATE=1.000000
BUILD_OBJECT_DETERIORATION_DAMAGE_RATE=1.000000
COLLECTION_DROP_RATE=1.000000
COLLECTION_OBJECT_HP_RATE=1.000000
COLLECTION_OBJECT_RESPAWN_SPEED_RATE=1.000000
ENEMY_DROP_ITEM_RATE=1.000000
DEATH_PENALTY=All
ENABLE_PLAYER_TO_PLAYER_DAMAGE=false
ENABLE_FRIENDLY_FIRE=false
ENABLE_INVADER_ENEMY=true
ACTIVE_UNKO=false
ENABLE_AIM_ASSIST_PAD=true
ENABLE_AIM_ASSIST_KEYBOARD=false
DROP_ITEM_MAX_NUM=3000
DROP_ITEM_MAX_NUM_UNKO=100
BASE_CAMP_MAX_NUM=128
BASE_CAMP_WORKER_MAXNUM=15
DROP_ITEM_ALIVE_MAX_HOURS=1.000000
AUTO_RESET_GUILD_NO_ONLINE_PLAYERS=false
AUTO_RESET_GUILD_TIME_NO_ONLINE_PLAYERS=72.000000
GUILD_PLAYER_MAX_NUM=20
PAL_EGG_DEFAULT_HATCHING_TIME=72.000000
WORK_SPEED_RATE=1.000000
IS_MULTIPLAY=false
IS_PVP=false
CAN_PICKUP_OTHER_GUILD_DEATH_PENALTY_DROP=false
ENABLE_NON_LOGIN_PENALTY=true
ENABLE_FAST_TRAVEL=true
IS_START_LOCATION_SELECT_BY_MAP=true
EXIST_PLAYER_AFTER_LOGOUT=false
ENABLE_DEFENSE_OTHER_GUILD_PLAYER=false
COOP_PLAYER_MAX_NUM=4
MAX_PLAYERS=8
SERVER_NAME=jammsen-docker-generated-###RANDOM###
SERVER_DESCRIPTION=Palworld-Dedicated-Server running in Docker by jammsen
ADMIN_PASSWORD=my-admin-password
SERVER_PASSWORD=my-password
PUBLIC_PORT=8211
PUBLIC_IP=
RCON_ENABLED=true
RCON_PORT=25575
REGION=
USEAUTH=true
BAN_LIST_URL=https://api.palworldgame.com/api/banlist.txt

Desired behavior

Hope to be able to use RCON commands normally

Links to screenshots

No response

To Reproduce

docker exec -ti palworld-dedicated-server bash rcon showplayers

Software setup

Hardware setup

Additional context

No response

CleryMenuel commented 5 months ago

That seems strange to me.

Can you run "docker exec -ti palworld-dedicated-server cat /palworld/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini" command to see if it takes your default.env file.

And is your server working? Do you have folders in /home/zzz/pal-data?

thejcpalma commented 5 months ago

Could you share your docker logs too? Redact the password and public IP if there ofc

docker logs -t palworld-dedicated-server

Also see if the file rcon.yaml is correctly setup

docker exec palworld-dedicated-server cat rcon.yaml
jammsen commented 5 months ago

Hey @zwh8800 - Both of the are right. Please follow their advice and provide additional data to help us help you.

jammsen commented 5 months ago

@zwh8800 ping

beardenj commented 5 months ago

Hello! I ran into this issue yesterday. I encountered the issue by doing the following: 1) Deploy a default server with the example YAML provided on the README 2) Updated the SERVER_DESCRIPTION value in the YAML configuration file with a \n character 3) docker-compose up --force-recreate 4) docker-compose down 5) docker-compose up

Now you should have authentication errors due to a malformed PalWorldSettings.ini. The workaround I did was to bring the container down and restore the ini file with one from a previous backup

jammsen commented 5 months ago

Im closing this as inactive and not enough information. Feel free to reacht out again.

Shiratsui commented 1 month ago

I get the same error It happens when migrate server (I used to host my server on gamever, and now I wont to host it locally)

It solved when deleting worldOption.sav file in Pal/Saved/SaveGames/0/XXXXX Full path would be Pal/Saved/SaveGames/0/XXXXX/worldOption.sav

It seems like changing rcon password is not updating on worldOption.sav (maybe rcon settings configured inside this file)

jammsen commented 1 month ago

I get the same error It happens when migrate server (I used to host my server on gamever, and now I wont to host it locally)

It solved when deleting worldOption.sav file in Pal/Saved/SaveGames/0/XXXXX Full path would be Pal/Saved/SaveGames/0/XXXXX/worldOption.sav

It seems like changing rcon password is not updating on worldOption.sav (maybe rcon settings configured inside this file)

See FAQ in the README.md