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

[ARK] Duplicate parameters | Server config files are overwritten at every server restart. #1104

Closed
adgriff2 opened this issue Oct 6, 2016 · 23 comments
Assignees
Labels
type: bug Something isn't working

Comments

@adgriff2
Copy link

adgriff2 commented Oct 6, 2016

All files in these locations are overwritten at every server start:
/home/arkserver/serverfiles/ShooterGame/Saved/Config/LinuxServer/
/home/arkserver/serverfiles/ShooterGame/Saved/Config/CleanSourceConfigs/

arkserver@Server01:~/serverfiles/ShooterGame/Saved/Config/LinuxServer$ stat GameUserSettings.ini
File: ‘GameUserSettings.ini’
Size: 2916 Blocks: 8 IO Block: 4096 regular file
Device: 801h/2049d Inode: 394032 Links: 1
Access: (0600/-rw-------) Uid: ( 1003/arkserver) Gid: ( 1003/arkserver)
Access: 2016-10-06 00:25:36.020873072 -0400
Modify: 2016-10-06 00:39:19.087156534 -0400
Change: 2016-10-06 00:39:19.087156534 -0400
Birth: -
arkserver@Server01:~/serverfiles/ShooterGame/Saved/Config/LinuxServer$ ~/arkserver start
[ OK ] Starting ark-server: ark-server
arkserver@Server01:~/serverfiles/ShooterGame/Saved/Config/LinuxServer$ stat GameUserSettings.ini
File: ‘GameUserSettings.ini’
Size: 2916 Blocks: 8 IO Block: 4096 regular file
Device: 801h/2049d Inode: 394032 Links: 1
Access: (0600/-rw-------) Uid: ( 1003/arkserver) Gid: ( 1003/arkserver)
Access: 2016-10-06 00:41:25.573665726 -0400
Modify: 2016-10-06 00:41:25.577665678 -0400
Change: 2016-10-06 00:41:25.577665678 -0400
Birth: -

I've even tried deleting the entire contents of both folders. The files get recreated and any config changes made are overwritten.

@antonydevanchi
Copy link

@adgriff2 As far as I know usage correct encoding of the file will help solve the problem. Try UTF-16 LE.

@UltimateByte
Copy link
Contributor

@Smile42RU Thanks for the hand, i got no clue about this.
If this is the actual issue, you can also edit your config with nano or vi instead of with an FTP and a windows editor, since they should preserve the formatting.

@adgriff2
Copy link
Author

adgriff2 commented Oct 6, 2016

I've been running an ark server on this same box for around a year with my own (quite humble) steamcmd script and never had a config encoding issue, odd. My backup configs are all ascii. This is the first time I've tried LGSM.

That said, I used iconv to change the encoding to UTF-16LE. This had no effect and was overwritten as soon as the server was started.

@adgriff2
Copy link
Author

adgriff2 commented Oct 6, 2016

It appears that some options are defined in the startup parms and also in the config file. Maybe these are in conflict?

@UltimateByte
Copy link
Contributor

Well spotted, it could be !
Can you try removing them from the config file and see ?

@adgriff2
Copy link
Author

adgriff2 commented Oct 6, 2016

I've reverted to using my previous script for the time being. I'll try to schedule some downtime at some point to play with it.

@UltimateByte
Copy link
Contributor

We had several people complaining about this recently. So we need to get our hands in it i guess anyways.

@UltimateByte UltimateByte added type: bug Something isn't working ark survival evolved labels Oct 6, 2016
@cedarlug
Copy link
Contributor

cedarlug commented Oct 7, 2016

From what I find, this is what Ark does with a config file with an error.
Ref: arkmanager/ark-server-tools#367
Ref: http://survivetheark.com/index.php?/forums/topic/1614-gameini-wont-save-and-gets-blank-on-server-start/&do=findComment&comment=47538
Ref: arkmanager/ark-server-tools#260

My recommendation is to put all of your settings in the arkserver script.

@WriggleDev
Copy link

Are you generating your gameusersettings.ini and copy/pasting it in?
I ended up taking my generated .ini file and retyping the settings in manually and it worked.

@UltimateByte UltimateByte added non-script issue and removed type: bug Something isn't working labels Oct 7, 2016
@adgriff2
Copy link
Author

adgriff2 commented Oct 7, 2016

Are you generating your gameusersettings.ini and copy/pasting it in?
I ended up taking my generated .ini file and retyping the settings in manually and it worked.

At first I was, but then I deleted all the configs and let the starting server recreate them. I then restarted the server without altering the configs. The starting server overwrote the configs it had just created. This seems to confirm that the problem isn't linked to a user altering them.

@adgriff2
Copy link
Author

adgriff2 commented Oct 7, 2016

Here's what I currently use that doesn't have the config overwriting problem. It's just a small script I wrote to stop the server via systemd, forceupdate it, then start it back up via systemd. Below that is the systemd 'script' that contains the startup command that works. It's much more abbreviated than the one used in LGSM. I'm thinking the LGSM startup command may be the problem.
adgriff2@Server01:~/scripts$ cat updateArk.sh
#!/bin/bash
sudo systemctl stop ark-dedicated.service
&& /home/steamuser/steamcmd/steamcmd.sh
+login anonymous
+force_install_dir /home/steamuser/steamcmd/Ark
+app_update 376030
+quit
&& sudo systemctl start ark-dedicated.service
adgriff2@Server01:~/scripts$ cat /etc/systemd/system/ark-dedicated.service
[Unit]
Description=ARK: Survival Evolved dedicated server
Wants=network-online.target
After=syslog.target network.target nss-lookup.target network-online.target

[Service]
ExecStart=/home/steamuser/steamcmd/Ark/ShooterGame/Binaries/Linux/ShooterGameServer TheIsland?listen?SessionName=GriffinArk -server -log
LimitNOFILE=100000
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
User=steamuser
Group=steamuser

[Install]
WantedBy=multi-user.target

@adgriff2
Copy link
Author

adgriff2 commented Oct 7, 2016

Changing the '#parms variable in arkserver.sh to be more like my old startup command seems to have fixed the problem. I removed args for MultiHome, MaxPlayers, QueryPort, RCONPort, Port, and ServerAdminPassword. I think these are taken care of in the config.

@UltimateByte
Copy link
Contributor

BTW we have to chose anyways if we put stuff inside the .ini or start parameters in LGSM. There are currently some duplicate parameters.
This needs to be addressed.

@UltimateByte UltimateByte added type: bug Something isn't working development queue and removed non-script issue labels Oct 7, 2016
@UltimateByte UltimateByte changed the title [ARK] Server config files are overwritten at every server restart. [ARK] Duplicate parameters | Server config files are overwritten at every server restart. Oct 7, 2016
@UltimateByte
Copy link
Contributor

I'm on it.
Ark don't give a crap about ports set within cfg file. So we'd rather get them only into start parameters.

@UltimateByte
Copy link
Contributor

So, here is what config looks like now
GameServerManagers/Game-Server-Configs@3ff04ea#diff-4ca2a40fe9ae60534d8ed66ed8a843ce

SessionName & ServerAdminPassword are set using .ini file.
Leaving RCONPort since Ark will recreate it anyways, at least it'll be in the right location.
Ports/maxplayers/IP are set within start parms; however maxplayers will show up in .ini after starting the server but can't seem to be set within .ini file, resets to 70 no matter what.

Pull-requesting for a main script fix soon.

@UltimateByte
Copy link
Contributor

This has been merged.
Advised:

  • Updating arkserver script
  • Running ./arkserver uf;
  • Grabbing the newest config file (renaming the older will do the trick, newest will be downloaded).

@jkdoug
Copy link

jkdoug commented Feb 25, 2017

I'm having this issue myself, using the latest and greatest arkserver scripts. Nothing I've tried so far has stopped my config from being overwritten every time I start the server.

The weird thing is that I see no message echo'd, and my default config, which I edited, remains intact. I don't know where it's even getting the config file it's using or where in the code it's doing this.

@UltimateByte
Copy link
Contributor

@jkdoug What are you editing your config with ? Are you sure you're putting settings at the right location ? Are you editing config files while the server is off ? (you should)

@jkdoug
Copy link

jkdoug commented Feb 25, 2017

Yes, I stopped the server, edited serverfiles/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini with vi, and started the server again.

I tried editing arkserver to use the develop branch. It seems that the features are not merged into the master very often.

@UltimateByte
Copy link
Contributor

@jkdoug Once a week. Changes mentioned here are already implemented.

@jkdoug
Copy link

jkdoug commented Feb 25, 2017

Well, I'm sorry, but the changes are not fixing anything for me. Maybe I'll try deleting everything and starting over.

@UltimateByte
Copy link
Contributor

UltimateByte commented Feb 25, 2017

@jkdoug Any mistake in Ark's config file will make it overwritten. LGSM part about it has been fixed unless proved otherwise.

@lock
Copy link

lock bot commented Jul 18, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants