Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Most recent PR merge is ignoring env vars #212

Closed
lrobles-iterable opened this issue Jan 29, 2024 · 18 comments
Closed

Most recent PR merge is ignoring env vars #212

lrobles-iterable opened this issue Jan 29, 2024 · 18 comments

Comments

@lrobles-iterable
Copy link

Describe the bug

After the most recent PR merge #203, settings in Palworldsettings.ini are being ignored.

Things such as server name, server password are not being set after removing them from the startup command

To Reproduce

Steps to reproduce the behavior:

  1. Pull latest container
  2. set env vars for server name and password
  3. they are ignored

Expected behavior

EITHER options that were previously added to the startup line should be set, or allow us to set our own startup command options

Screenshots

My env vars being set, but the server is named "Default palworld server" and no password is set
image

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information)

  • OS: [e.g. Windows 10, Ubuntu, Debian]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

docker-compose.yml contents

      containers:
      - name: palworld
        image: thijsvanloef/palworld-server-docker:latest
        env:
        - name: PLAYERS
          value: "16"
        - name: "COMMUNITY"
          value: "true"
        - name: "ADMIN_PASSWORD"
          value: "xxxxx"
        - name: "SERVER_PASSWORD"
          value: "xxxxx"
        - name: "SERVER_NAME"
          value: "xxxxxx"
        - name: "RCON_PORT"
          value: "25575"
        - name: "RCON_ENABLED"
          value: "true"
        - name: "BACKUP_CRON_EXPRESSION"

Container/Host Logs

Additional context

Add any other context about the problem here.

@lrobles-iterable
Copy link
Author

Related to #210

@thijsvanloef
Copy link
Owner

If you are able to please share the contents of your PalWorldSettings.ini.
Also are you using any special characters in your name/password?

@NobleKangaroo
Copy link

NobleKangaroo commented Jan 29, 2024

If you are able to please share the contents of your PalWorldSettings.ini. Also are you using any special characters in your name/password?

You've done an amazing job with this container but it's now not working for my friends and I as well. Unfortunately the configuration is not loading after #203 which we thought was caused by us! :D Here's an almost exact copy of my config (using Docker Swarm) which was working before #203:

version: '3.9'

x-nfs-driver-opts:
  &nfs-driver-opts
  type: nfs
  o: addr=nfs-server.example.com,nolock,tcp,hard

volumes:
  palworld_server:
    driver_opts:
      <<: *nfs-driver-opts
      device: ':/mnt/palworld_server'

services:
  palworld:
    image: thijsvanloef/palworld-server-docker:latest
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=UTC
      - PORT=8211
      - PLAYERS=20
      - COMMUNITY=true
      - SERVER_NAME=My Server Name Here
      - SERVER_DESCRIPTION=Pikachu, I choose you!
      - SERVER_PASSWORD=mypass
      - ADMIN_PASSWORD=theadminpass
      - MULTITHREADING=true
      - RCON_ENABLED=true
      - RCON_PORT=25575
      # Customizations
      - DAYTIME_SPEEDRATE=0.25
      - NIGHTTIME_SPEEDRATE=3.0
      - PAL_EGG_DEFAULT_HATCHING_TIME=3.6
    ports:
      - 8211:8211/udp
      - 27015:27015/udp
    volumes:
      - palworld_server:/palworld
    deploy:
      placement:
        constraints:
          - node.labels.function == worker
        preferences:
          - spread: node.labels.zone

Could you maybe revert the change and re-build on Docker Hub until this is sorted out? At least that way it would be back to its original mostly- working state. Running image: thijsvanloef/palworld-server-docker:v0.18:v0.18 for now.

Thanks again, sorry this happened, hope to be able to play tonight.

@lrobles-iterable
Copy link
Author

lrobles-iterable commented Jan 30, 2024

If you are able to please share the contents of your PalWorldSettings.ini. Also are you using any special characters in your name/password?

I've already reverted to v0.18 which is working

no special characters in server name or password. just simple single-word strings

@thijsvanloef
Copy link
Owner

Please make sure that the Env variable values are quoted in the docker compose

@thijsvanloef
Copy link
Owner

@NobleKangaroo If you do not quote your names/discription the following happens:

ServerName="World of Pals",ServerDescription=Pikachu, I choose you!,AdminPassword="adminPasswordHere",

Which invalidates the PalWorldSettings.ini

@beomseok-park
Copy link
Contributor

See #222

@Marc--
Copy link

Marc-- commented Jan 30, 2024

Hi there, i can confirm the problem on my server. env variables are not applied. It appends with 0.19 update.

I don't have specials characters in server name or password.

I revert to 0.18 and it's working with same variables.

EDIT: I made more tests, and i can see the starting log of the container are different between 0.18 and 0.19 (added at bottom).

I don't know if it's important but there is a "unkown char" in the log after "CHECKING FOR EXISTING CONFIG", it displays "�" and in notepad++ it's SOH"

Here is my Compose and PalWorldSettings.ini file if it can help.


version: "3.0"
services:
palworld:
image: thijsvanloef/palworld-server-docker:latest
restart: unless-stopped
container_name: palworld-server
ports:
- 8211:8211/udp
- 27015:27015/udp
network_mode: prod_bridge
environment:
- PUID=998
- PGID=100
- TZ=Europe/Paris
- PUBLIC_IP=A.B.C.D
- PORT=8211
- QUERY_PORT=27015
- RCON_PORT=25575
- PLAYERS=4
- MULTITHREADING=true
- ENABLE_RCON=true
- COMMUNITY=true
- SERVER_PASSWORD="ASHORTERONE"
- SERVER_NAME="PLEA44"
- ADMIN_PASSWORD="AVERYLONGPASSWORD"
- BACKUP_CRON_EXPRESSION=0 */2 * * *
- DELETE_OLD_BACKUPS=true
- OLD_BACKUP_DAYS=30
volumes:
- /srv/dev-disk-by-uuid-1da99476-7b55-497e-b2ba-7571787f2bab/docker/palworld:/palworld

[/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=PLEA44,ServerDescription="",AdminPassword=AVERYLONGPASSWORD,ServerPassword=ASHORTERONE,PublicPort=8211,PublicIP="A.B.C.D",RCONEnabled=true,RCONPort=25575,Region="",bUseAuth=True,BanListURL="https://api.palworldgame.com/api/banlist.txt")

0 18
0 19

0.18

EXECUTING USERMOD
STARTING INSTALL/UPDATE
tid(29) burning pthread_key_t == 0 so we never use it
Redirecting stderr to '/home/steam/Steam/logs/stderr.txt'
Logging directory: '/home/steam/Steam/logs'
[ 0%] Checking for available updates...
[----] Verifying installation...
[ 0%] Downloading update...
[ 0%] Checking for available updates...
[----] Download complete.
[----] Extracting package...
[----] Extracting package...
[----] Extracting package...
[----] Extracting package...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Cleaning up...
[----] Update complete, launching Steamcmd...
tid(41) burning pthread_key_t == 0 so we never use it
Redirecting stderr to '/home/steam/Steam/logs/stderr.txt'
Logging directory: '/home/steam/Steam/logs'
[ 0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation - version 1705108307
-- type 'quit' to exit --
Loading Steam API...OK
Connecting anonymously to Steam Public...OK
Waiting for client config...OK
Waiting for user info...OK
Update state (0x3) reconfiguring, progress: 0.00 (0 / 0)
Update state (0x5) verifying install, progress: 3.53 (79267940 / 2248045559)
Update state (0x5) verifying install, progress: 37.53 (843601016 / 2248045559)
Update state (0x5) verifying install, progress: 90.74 (2039951551 / 2248045559)
Success! App '2394010' fully installed.
CHECKING FOR EXISTING CONFIG

4
PUBLIC_IP=A.B.C.D
RCON_ENABLED=true
RCON_PORT=25575
STARTING SERVER
./PalServer.sh -port=8211 -servername=PLEA44 -serverdescription=Le serveur de la Mafia Nantaise -serverpassword=AAAA -adminpassword=BBBB -queryport=27015 EpicApp=PalServer -useperfthreads -NoAsyncLoadingThread -UseMultithreadForDS
[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 2 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.

0.19

EXECUTING USERMOD
STARTING INSTALL/UPDATE
tid(29) burning pthread_key_t == 0 so we never use it
Redirecting stderr to '/home/steam/Steam/logs/stderr.txt'
Logging directory: '/home/steam/Steam/logs'
[ 0%] Checking for available updates...
[----] Verifying installation...
[ 0%] Downloading update...
[ 0%] Checking for available updates...
[----] Download complete.
[----] Extracting package...
[----] Extracting package...
[----] Extracting package...
[----] Extracting package...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Cleaning up...
[----] Update complete, launching Steamcmd...
tid(41) burning pthread_key_t == 0 so we never use it
Redirecting stderr to '/home/steam/Steam/logs/stderr.txt'
Logging directory: '/home/steam/Steam/logs'
[ 0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation - version 1705108307
-- type 'quit' to exit --
Loading Steam API...OK
Connecting anonymously to Steam Public...OK
Waiting for client config...OK
Waiting for user info...OK
Update state (0x3) reconfiguring, progress: 0.00 (0 / 0)
Update state (0x3) reconfiguring, progress: 0.00 (0 / 0)
Update state (0x5) verifying install, progress: 67.67 (1521171575 / 2248045559)
Success! App '2394010' fully installed.
CHECKING FOR EXISTING CONFIG
SERVER_NAME=PLEA44
SERVER_DESCRIPTION=Le serveur de la Mafia Nantaise
SERVER_PASSWORD=AAAA
ADMIN_PASSWORD=BBBB

4
PUBLIC_IP=A.B.C.D
RCON_ENABLED=true
RCON_PORT=25575
BACKUP_ENABLED=true
STARTING SERVER
./PalServer.sh -port=8211 -queryport=27015 EpicApp=PalServer -useperfthreads -NoAsyncLoadingThread -UseMultithreadForDS
time="2024-01-30T11:47:55+01:00" level=info msg="read crontab: /home/steam/server/crontab"
Shutdown handler: initalize.
Increasing per-process limit of core file size to infinity.
[S_API] SteamAPI_Init(): Loaded local 'steamclient.so' OK.

  • Existing per-process limit (soft=18446744073709551615, hard=18446744073709551615) is enough for us (need only 18446744073709551615)
    CAppInfoCacheReadFromDiskThread took 1 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.

@thijsvanloef
Copy link
Owner

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.

@PulsarFTW
Copy link

PulsarFTW commented Jan 30, 2024

Awesome work on the docker. V0.18 is fantastic.

Regarding this issue: I had the same issue on v0.19, I rolled back to v0.18 and it was working. I just tested updating to 0.19.1 and it's still setting default options.

@thijsvanloef
Copy link
Owner

@PulsarFTW I've also change the docker-compose.yml example, could you try that with 0.19.1

@thijsvanloef
Copy link
Owner

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

@josipledic
Copy link

josipledic commented Jan 30, 2024

I had changed the PAL_EGG_DEFAULT_HATCHING_TIME and some other env vars and now I restarted the container and the hatching time is infinite (99 hours +++) and the worktime multiplier is also infinite, can't craft anything anymore. I reverted the changes, tried 0.18, 0.19, 0.19.1 restarted the container, deleted the default settings .ini but nothing helped so far. Is the server backup bugged for good now?

//edit:

okay so I made the mistake to use quotes around some of the env vars and now the PalWorldSettings.ini always defaults back to the wrong env vars with the quotes instead of my new ones without the quotes around numbers. I edited both DefaultPalWorldSettings.ini and PalWorldSettings.ini manually but everytime I restart the container I open the latter and find the old numbers with quotes again.

@NobleKangaroo
Copy link

NobleKangaroo commented Jan 31, 2024

@NobleKangaroo If you do not quote your names/discription the following happens:

ServerName="World of Pals",ServerDescription=Pikachu, I choose you!,AdminPassword="adminPasswordHere",

Which invalidates the PalWorldSettings.ini

I don't know how but when NOT quoting the settings, the server is operating fine and the server name and description are good but when quoting them, the server name appears as the first word with a quote at the beginning. For instance if I set SERVER_NAME="World of Pals" and run it, the server name in-game shows as just "World and similarly if I set SERVER_DESCRIPTION="Pikachu, I choose you!" then the server description in-game just shows up as "Pikachu .... it's kind of like the rcon-cli issue where the spaces cause the arguments to get truncated after the first one.

As you mention, though, the PalWorldSettings.ini do look like this:

[/Script/Pal.PalGameWorldSettings]
OptionSettings=(Difficulty=None,DayTimeSpeedRate=0.25,NightTimeSpeedRate=3.0,ExpRate=1.0,PalCaptureRate=1.0,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=3.6,WorkSpeedRate=1.000000,bIsMultiplay=False,bIsPvP=False,bCanPickupOtherGuildDeathPenaltyDrop=False,bEnableNonLoginPenalty=True,bEnableFastTravel=True,bIsStartLocationSelectByMap=True,bExistPlayerAfterLogout=False,bEnableDefenseOtherGuildPlayer=False,CoopPlayerMaxNum=4,ServerPlayerMaxNum=20,ServerName=My Palworld Server,ServerDescription=Pikachu, I choose you!,AdminPassword=adminpassword,ServerPassword=somepassword,PublicPort=8211,PublicIP="",RCONEnabled=true,RCONPort=25575,Region="",bUseAuth=True,BanListURL="https://api.palworldgame.com/api/banlist.txt")

Specifically of note is the bit

ServerPlayerMaxNum=20,ServerName=My Palworld Server,ServerDescription=Pikachu, I choose you!,AdminPassword=

HOWEVER that's still working and the name and description in-game are displaying as intended as well as the password is working and the player count is working. I don't know if there's some case where having a space would invalidate the ini but at least in my scenario, it appears that's not happening and in fact, quotes are causing issues.

@thijsvanloef
Copy link
Owner

@NobleKangaroo are you sure you are on the latest image? The bug you are describing "only the first word with a quote" sounds like 0.18.0

@thijsvanloef
Copy link
Owner

@lrobles-iterable are you still experiencing this issue with 0.19.1?

@thijsvanloef
Copy link
Owner

Closing this issue to merge all related issues into one: #239

@NobleKangaroo
Copy link

@NobleKangaroo are you sure you are on the latest image? The bug you are describing "only the first word with a quote" sounds like 0.18.0

Yes this was on 0.18.0. Thanks for confirming that. I'll give :latest a spin again. Good work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants