palworld-server-docker icon indicating copy to clipboard operation
palworld-server-docker copied to clipboard

RCON with adminPassword doesn't work in CLI

Open sethicis opened this issue 1 year ago • 12 comments

Describe the bug

If you have an ADMIN_PASSWORD set for the server RCON will not accept any authorization.

I've tried wrapping the password in quotes, both double and single, without quotes, touching the -p switch, using the --password long form. No matter what I try the RCON server always returns: cli: execute: auth: rcon: authentication failed. If you set the ADMIN_PASSWORD to empty string, then the rcon-cli works as expected. It's only when it is password protected that the CLI will not work.

To Reproduce

Steps to reproduce the behavior:

  1. Set the ADMIN_PASSWORD to something.
  2. Start the docker instance.
  3. Run `docker exec -it <containerID> rcon-cli --password <ADMIN_PASSWORD> info
  4. See authorization failed message.

Expected behavior

The provided admin password should be accepted if it matches what was set in as the docker environmental variable.

Desktop (please complete the following information)

  • Ubuntu 22.04.3 LTS
  • Docker image 0.19.0

docker-compose.yml contents

version: '3.9'
services:
  palworld:
    image: thijsvanloef/palworld-server-docker:latest
    restart: unless-stopped
    container_name: palworld-server
    ports:
      - 8211:8211/udp
      - 27015:27015/udp
    environment:
     - PUID=1000
     - PGID=1000
     - PORT=8211 # Optional but recommended
     - PLAYERS=4 # Optional but recommended
     - MULTITHREADING=true
     - RCON_ENABLED=true
     - RCON_PORT=25575
     - ADMIN_PASSWORD='test1234'
     - COMMUNITY=false  # Enable this if you want your server to show up in the community servers tab, USE WITH SERVER_PASSWORD!
     volumes:
      - ./game:/palworld/
  image_updater:
    image: containrrr/watchtower
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock

Important context

The world the server is running is a migrated single player save.

sethicis avatar Jan 30 '24 02:01 sethicis

I also suddenly experienced the problem today, so I change it to yesterday's version, so there is no problem

chickiyeah avatar Jan 30 '24 02:01 chickiyeah

I've experienced this issue with both 0.19.0 (today) and 0.17.0 (yesterday).

This might be important context, but I migrated a single player save to be the dedicated server world. I noticed that when in game when I try to login to RCON via /AdminPassword it says there is no password set on the server.

This makes me wonder if the RCON password is not being set properly on the world config, which I heard is a thing for migrated saves.

sethicis avatar Jan 30 '24 02:01 sethicis

I've experienced this issue with both 0.19.0 (today) and 0.17.0 (yesterday).

This might be important context, but I migrated a single player save to be the dedicated server world. I noticed that when in game when I try to login to RCON via /AdminPassword it says there is no password set on the server.

This makes me wonder if the RCON password is not being set properly on the world config, which I heard is a thing for migrated saves.

oh my server not update yesterday i think im using 2days ago version

chickiyeah avatar Jan 30 '24 02:01 chickiyeah

I had this same issue today, last night Rcon worked, now today it wasn't. I've been using rcon to control whether the servers up or not by detecting players using it.

Anyway, rolled back to "thijsvanloef/palworld-server-docker:v0.18" and it is working in that version.

joebywan avatar Jan 30 '24 06:01 joebywan

@sethicis Could you please confirm if the issue persists if you change your single quoted admin pass to double quotes? - ADMIN_PASSWORD='test1234' to - ADMIN_PASSWORD="test1234"

thijsvanloef avatar Jan 30 '24 07:01 thijsvanloef

Not the OP, but I had the issue just using your example docker-compose file locally, and also had it on AWS ECS Fargate. My Fargate deployment is using terraform, using double quotes for the env vars, and the task definition on AWS doesn't have quotes (but takes JSON, so it'd be double quoted)

joebywan avatar Jan 30 '24 07:01 joebywan

I have opened #223 to fix this.

bdelwood avatar Jan 30 '24 08:01 bdelwood

Problem should be resolved in update 0.19.1 thanks to beomseok-park, please pull the latest image and check if your issue has been resolved.

thijsvanloef avatar Jan 30 '24 19:01 thijsvanloef

Issue not resolved I'm afraid, and now the server name is not set either (defaults to Default Palworld Server)

kometkamerat avatar Jan 30 '24 19:01 kometkamerat

If you are still having trouble after updating, please remove your PalWorldSettings.ini and restart your container.

thijsvanloef avatar Jan 30 '24 21:01 thijsvanloef

@thijsvanloef , I pull the latest, deleted the PalWorldSettings.ini and restarted the container.

Unfortunately, the issue still persists. I did also try changing the single quotes around the password string in the compose file to double; sadly, no effect.

version: '3.9'
services:
  palworld:
    image: thijsvanloef/palworld-server-docker:latest
    restart: unless-stopped
    container_name: palworld-server
    ports:
      - 8211:8211/udp
      - 27015:27015/udp
    environment:
     - PUID=1000
     - PGID=1000
     - PORT=8211 # Optional but recommended
     - PLAYERS=4 # Optional but recommended
     - MULTITHREADING=true
     - RCON_ENABLED=true
     - RCON_PORT=25575
     - ADMIN_PASSWORD="test1234"
     - COMMUNITY=false  # Enable this if you want your server to show up in the community servers tab, USE WITH SERVER_PASSWORD!
       # Enable the environment variables below if you have COMMUNITY=true
       # - SERVER_PASSWORD="worldofpals"
       # - SERVER_NAME="World of Pals"
    volumes:
      - ./game:/palworld/
  image_updater:
    image: containrrr/watchtower
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock

Current behavior on latest image pull:

Screenshot 2024-01-30 at 5 43 04 PM

sethicis avatar Jan 30 '24 23:01 sethicis

@bdelwood @thijsvanloef , since @bdelwood's previous PR was for how the PalWorldSetting.ini was generated I'll include my freshly generated one here for reference.

; This configuration file is a sample of the default server settings.
; Changes to this file will NOT be reflected on the server.
; To change the server settings, modify Pal/Saved/Config/LinuxServer/PalWorldSettings.ini.
[/Script/Pal.PalGameWorldSettings]
OptionSettings=(Difficulty=None,DayTimeSpeedRate=1.000000,NightTimeSpeedRate=1.000000,ExpRate=1.000000,PalCaptureRate=1.000000,PalSpawnNumRate=1.000000,PalDamageRateAttack=1.000000,PalDamageRateDefense=1.000000,PlayerDamageRateAttack=1.000000,PlayerDamageRateDefense=1.000000,PlayerStomachDecreaceRate=1.000000,PlayerStaminaDecreaceRate=1.000000,PlayerAutoHPRegeneRate=1.000000,PlayerAutoHpRegeneRateInSleep=1.000000,PalStomachDecreaceRate=1.000000,PalStaminaDecreaceRate=1.000000,PalAutoHPRegeneRate=1.000000,PalAutoHpRegeneRateInSleep=1.000000,BuildObjectDamageRate=1.000000,BuildObjectDeteriorationDamageRate=1.000000,CollectionDropRate=1.000000,CollectionObjectHpRate=1.000000,CollectionObjectRespawnSpeedRate=1.000000,EnemyDropItemRate=1.000000,DeathPenalty=All,bEnablePlayerToPlayerDamage=False,bEnableFriendlyFire=False,bEnableInvaderEnemy=True,bActiveUNKO=False,bEnableAimAssistPad=True,bEnableAimAssistKeyboard=False,DropItemMaxNum=3000,DropItemMaxNum_UNKO=100,BaseCampMaxNum=128,BaseCampWorkerMaxNum=15,DropItemAliveMaxHours=1.000000,bAutoResetGuildNoOnlinePlayers=False,AutoResetGuildTimeNoOnlinePlayers=72.000000,GuildPlayerMaxNum=20,PalEggDefaultHatchingTime=72.000000,WorkSpeedRate=1.000000,bIsMultiplay=False,bIsPvP=False,bCanPickupOtherGuildDeathPenaltyDrop=False,bEnableNonLoginPenalty=True,bEnableFastTravel=True,bIsStartLocationSelectByMap=True,bExistPlayerAfterLogout=False,bEnableDefenseOtherGuildPlayer=False,CoopPlayerMaxNum=4,ServerPlayerMaxNum=4,ServerName="Default Palworld Server",ServerDescription="",AdminPassword="test1234",ServerPassword="",PublicPort=8211,PublicIP="",RCONEnabled=true,RCONPort=25575,Region="",bUseAuth=True,BanListURL="https://api.palworldgame.com/api/banlist.txt")

sethicis avatar Jan 30 '24 23:01 sethicis

@thijsvanloef , I pull the latest, deleted the PalWorldSettings.ini and restarted the container.

Unfortunately, the issue still persists. I did also try changing the single quotes around the password string in the compose file to double; sadly, no effect.

version: '3.9'
services:
  palworld:
    image: thijsvanloef/palworld-server-docker:latest
    restart: unless-stopped
    container_name: palworld-server
    ports:
      - 8211:8211/udp
      - 27015:27015/udp
    environment:
     - PUID=1000
     - PGID=1000
     - PORT=8211 # Optional but recommended
     - PLAYERS=4 # Optional but recommended
     - MULTITHREADING=true
     - RCON_ENABLED=true
     - RCON_PORT=25575
     - ADMIN_PASSWORD="test1234"
     - COMMUNITY=false  # Enable this if you want your server to show up in the community servers tab, USE WITH SERVER_PASSWORD!
       # Enable the environment variables below if you have COMMUNITY=true
       # - SERVER_PASSWORD="worldofpals"
       # - SERVER_NAME="World of Pals"
    volumes:
      - ./game:/palworld/
  image_updater:
    image: containrrr/watchtower
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock

Current behavior on latest image pull:

Screenshot 2024-01-30 at 5 43 04 PM

You can change compose RCON_ENABLED=True temporary, it's work for me

See detail in this pr #233

pipixi avatar Jan 31 '24 05:01 pipixi

@thijsvanloef, issue resolved.

I don't know if @bdelwood's fix also helped contribute to the solution, but what finally got it to work for me was doing what this Redditor mentioned here.

By deleting the WorldOption.sav file I was able to get the rcon to work properly from docker exec AND in game. As always, be sure to backup the file before deleting it, just in case, but for me deleting the file and restarting the server did the trick.

(This also resolved a number of server status issues for me as well, like the server name not showing correctly nor the max number of players.)

For anyone else who stumbles across this issue please be aware that after you delete the WorldOption.sav file you'll be prompted to pick a spawn location again once you connect to the server. This is normal and fine. All my bases, production progress and pals were still present and fine.

Thank you all again for your help with this issue -- closing!

sethicis avatar Jan 31 '24 07:01 sethicis

Where is the file WorldOption.sav? Cannot find it in the Palworld volume...

find . -name "*sav"
./Pal/Saved/SaveGames/0/F299CF3EE3CD4C73B18E474DF4AF85F4/Players/80D98523000000000000000000000000.sav
./Pal/Saved/SaveGames/0/F299CF3EE3CD4C73B18E474DF4AF85F4/Level.sav
./Pal/Saved/SaveGames/0/F299CF3EE3CD4C73B18E474DF4AF85F4/LevelMeta.sav

kometkamerat avatar Jan 31 '24 07:01 kometkamerat

Ignore that, deleting PalWorldSettings.ini fixed the issue 😄

kometkamerat avatar Jan 31 '24 07:01 kometkamerat

If deleting palworldsettings.ini is required, could the container not just generate it from scratch on boot? It's already downloading the server etc. Why not take a sec to re-generate the config to avoid any structure issues causing problems?

On Wed, Jan 31, 2024 at 5:56 PM kometkamerat @.***> wrote:

Ignore that, deleting PalWorldSettings.ini fixed the issue 😄

— Reply to this email directly, view it on GitHub https://github.com/thijsvanloef/palworld-server-docker/issues/214#issuecomment-1918572082, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABE665ZPJ337PHGC5FWI7R3YRH2KPAVCNFSM6AAAAABCQOLBNGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJYGU3TEMBYGI . You are receiving this because you commented.Message ID: @.***>

joebywan avatar Jan 31 '24 08:01 joebywan

That will also delete other adjustments the server owner has done, like droprate, deathpenalty, etc.

kometkamerat avatar Jan 31 '24 09:01 kometkamerat

Would they not be doing that via the docker env vars anyway?

On Wed, Jan 31, 2024 at 7:22 PM kometkamerat @.***> wrote:

That will also delete other adjustments the server owner has done, like droprate, deathpenalty, etc.

— Reply to this email directly, view it on GitHub https://github.com/thijsvanloef/palworld-server-docker/issues/214#issuecomment-1918703270, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABE6653533FOLMP33AD77FDYRIELTAVCNFSM6AAAAABCQOLBNGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJYG4YDGMRXGA . You are receiving this because you commented.Message ID: @.***>

joebywan avatar Jan 31 '24 09:01 joebywan

Not the ones untouched by the env vars, like the ones described above. There is only a selection of settings defined by vars.

kometkamerat avatar Jan 31 '24 09:01 kometkamerat

If you look at the start.sh they're all covered.

On Wed, Jan 31, 2024 at 7:59 PM kometkamerat @.***> wrote:

Not the ones untouched by the env vars, like the ones described above. There is only a selection of settings defined by vars.

— Reply to this email directly, view it on GitHub https://github.com/thijsvanloef/palworld-server-docker/issues/214#issuecomment-1918770804, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABE6656SMP6WETSXYLPG2WTYRIIZXAVCNFSM6AAAAABCQOLBNGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJYG43TAOBQGQ . You are receiving this because you commented.Message ID: @.***>

joebywan avatar Jan 31 '24 10:01 joebywan

My bad, I just followed the readme.md. That is correct, and in that instance rebuilding palworldsettings.ini to avoid the issue in the future is an idea.

kometkamerat avatar Jan 31 '24 10:01 kometkamerat

Sorry, I forgot to mention that in my specific manifestation of this issue. My dedicated server was running a single / coop player save that had been migrated to the dedicated server. I don't know if WorldOption.sav files exist for normal dedicated servers. I've heard that their existence sometimes prevents the dedicated server from honoring the PalWorldSettings.ini values, like in my situation.

For the record, if you are like me and have a migrated save, you can find your WorldOption.sav in <game_vol_location>/Pal/Saved/SavedGame/0/<world_id>/.

If anyone has a similar setup to me and is having trouble feel free to reach out and @ me.

sethicis avatar Jan 31 '24 20:01 sethicis

@thijsvanloef, issue resolved.

I don't know if @bdelwood's fix also helped contribute to the solution, but what finally got it to work for me was doing what this Redditor mentioned here.

By deleting the WorldOption.sav file I was able to get the rcon to work properly from docker exec AND in game. As always, be sure to backup the file before deleting it, just in case, but for me deleting the file and restarting the server did the trick.

(This also resolved a number of server status issues for me as well, like the server name not showing correctly nor the max number of players.)

For anyone else who stumbles across this issue please be aware that after you delete the WorldOption.sav file you'll be prompted to pick a spawn location again once you connect to the server. This is normal and fine. All my bases, production progress and pals were still present and fine.

Thank you all again for your help with this issue -- closing!

This is what worked for me, thanks!

cfu288 avatar Feb 04 '24 16:02 cfu288