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

server stopping for each update #678

Closed
changemenemo opened this issue Dec 7, 2016 · 29 comments
Closed

server stopping for each update #678

changemenemo opened this issue Dec 7, 2016 · 29 comments
Labels
Time Out Issue closed due to inactivity

Comments

@changemenemo
Copy link

Hi,
It seems that the server is stopping for each update and doesn't re run after or at least is not listening anymore so I need to restart it every time... Or maybe it's a port problem I don't kno ...

@klightspeed
Copy link
Collaborator

What is logged in arkserver.log and arkmanager.log

@changemenemo
Copy link
Author

CtrlCHandler: Signal=2
/usr/local/bin/arkmanager: line 909:  5125 Aborted                 (core dumped) "$arkserverroot/$arkserverexec" "$arkserveropts" "${arkextraopts[@]}"
2016-12-06 01:01:37: Bad PID ''; expected '5125'
2016-12-06 01:01:37: exited with status 0
2016-12-06 01:02:12: start
2016-12-06 01:02:12: Running /ark/server/ShooterGame/Binaries/Linux/ShooterGameServer TheIsland\?MaxPlayers\?Port=-1\?QueryPort\?RCONEnabled=True\?RCONPort=32330\?ServerAdminPassword\?ServerPassword\?SessionName\?listen -log
2016-12-06 01:02:12: Server PID: 1289
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
Setting breakpad minidump AppID = 346110
2016-12-06 01:06:58: server is up
Using binned.
4.5.1-0+UE4 7038 3077 402 6
CtrlCHandler: Signal=2
/usr/bin/arkmanager: line 643:  1289 Aborted                 (core dumped) "$arkserverroot/$arkserverexec" "$arkserveropts" "${arkextraopts[@]}"
2016-12-06 09:43:09: start
2016-12-06 09:43:09: Running /ark/server/ShooterGame/Binaries/Linux/ShooterGameServer TheCenter\?MaxPlayers=5\?Port=45110\?QueryPort=45112\?RCONEnabled=True\?RCONPort=32330\?ServerAdminPassword=PqWm8a4\?ServerPassword\?SessionName=barricade\?listen -log
2016-12-06 09:43:09: Server PID: 204
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
Setting breakpad minidump AppID = 346110
2016-12-06 09:46:50: server is up
Using binned.
4.5.1-0+UE4 7038 3077 402 6
/home/buildbot/buildslave/steam_rel_client_linux64/build/src/clientdll/applicationmanager.cpp (3004) : Assertion Failed: CApplicationManager::GetMountVolume: invalid index
/home/buildbot/buildslave/steam_rel_client_linux64/build/src/clientdll/applicationmanager.cpp (3004) : Assertion Failed: CApplicationManager::GetMountVolume: invalid index
/home/buildbot/buildslave/steam_rel_client_linux64/build/src/clientdll/applicationmanager.cpp (3155) : Assertion Failed: m_vecInstallBaseFolders.Count() > 0
CtrlCHandler: Signal=2
/usr/local/bin/arkmanager: line 909:   204 Aborted                 (core dumped) "$arkserverroot/$arkserverexec" "$arkserveropts" "${arkextraopts[@]}"
2016-12-07 01:02:07: start
2016-12-07 01:02:07: Running /ark/server/ShooterGame/Binaries/Linux/ShooterGameServer TheIsland\?MaxPlayers\?Port=-1\?QueryPort\?RCONEnabled=True\?RCONPort=32330\?ServerAdminPassword\?ServerPassword\?SessionName\?listen -log
2016-12-07 01:02:07: Server PID: 23756
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
Setting breakpad minidump AppID = 346110
2016-12-07 01:06:42: server is up
Using binned.
4.5.1-0+UE4 7038 3077 402 6
CtrlCHandler: Signal=2
/usr/bin/arkmanager: line 909: 23756 Aborted                 (core dumped) "$arkserverroot/$arkserverexec" "$arkserveropts" "${arkextraopts[@]}"
2016-12-07 04:04:14: Bad PID ''; expected '23756'
2016-12-07 04:04:14: exited with status 0
2016-12-07 04:05:09: start
2016-12-07 04:05:09: Running /ark/server/ShooterGame/Binaries/Linux/ShooterGameServer TheCenter\?MaxPlayers=5\?Port=45110\?QueryPort=45112\?RCONEnabled=True\?RCONPort=32330\?ServerAdminPassword=PqWm8a4\?ServerPassword\?SessionName=barricade\?listen -log
2016-12-07 04:05:09: Server PID: 6741
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
Setting breakpad minidump AppID = 346110
/usr/local/bin/arkmanager: line 909:  6741 Killed                  "$arkserverroot/$arkserverexec" "$arkserveropts" "${arkextraopts[@]}"
2016-12-07 04:08:29: start
2016-12-07 04:08:29: Running /ark/server/ShooterGame/Binaries/Linux/ShooterGameServer TheCenter\?MaxPlayers=5\?Port=45110\?QueryPort=45112\?RCONEnabled=True\?RCONPort=32330\?ServerAdminPassword=PqWm8a4\?ServerPassword\?SessionName=barricade\?listen -log
2016-12-07 04:08:29: Server PID: 7328
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
Setting breakpad minidump AppID = 346110
2016-12-07 04:09:43: server is up

last lines of arserver

2016-11-26 21:04:25: stopped
2016-11-26 21:04:25: stop
2016-11-26 21:04:26: restart
2016-11-26 21:04:34: start
2016-11-26 21:16:45: stopping; reason: restart
2016-11-26 21:16:48: stopped
2016-11-26 21:16:48: stop
2016-11-26 21:16:49: restart
2016-11-26 21:16:56: start
2016-11-28 06:57:51: start
2016-11-30 10:37:08: start
2016-12-01 01:01:38: stopping; reason: update
2016-12-01 01:01:41: stopped
2016-12-01 01:02:08: start
2016-12-02 00:00:42: stopping; reason: update
2016-12-02 00:00:44: stopped
2016-12-02 00:01:09: start
2016-12-03 00:01:47: stopping; reason: update
2016-12-03 00:01:49: stopped
2016-12-03 00:02:12: start
2016-12-04 00:00:34: stopping; reason: update
2016-12-04 00:00:36: stopped
2016-12-04 00:01:00: start
2016-12-04 22:18:06: stopping; reason: restart
2016-12-04 22:18:08: stopped
2016-12-04 22:18:08: stop
2016-12-04 22:18:09: restart
2016-12-04 22:18:16: start
2016-12-04 23:19:37: stopping; reason: restart
2016-12-04 23:19:39: stopped
2016-12-04 23:19:39: stop
2016-12-04 23:19:40: restart
2016-12-04 23:19:48: start
2016-12-06 01:01:34: stopping; reason: update
2016-12-06 01:01:37: stopped
2016-12-06 01:02:12: start
2016-12-06 09:38:47: stopping; reason: shutdown
2016-12-06 09:38:49: stopped
2016-12-06 09:43:09: start
2016-12-07 01:01:34: stopping; reason: update
2016-12-07 01:01:39: stopped
2016-12-07 01:02:07: start
2016-12-07 04:04:13: stopping; reason: restart
2016-12-07 04:04:15: stopped
2016-12-07 04:04:15: stop
2016-12-07 04:04:16: restart
2016-12-07 04:05:09: start
2016-12-07 04:08:03: stopping; reason: restart
2016-12-07 04:08:23: stopped
2016-12-07 04:08:23: stop
2016-12-07 04:08:24: restart
2016-12-07 04:08:29: start

last line of arkmanager.log

I guess it s more a problem because of the game than your tools but still it's annoying

@klightspeed
Copy link
Collaborator

klightspeed commented Dec 7, 2016

That server is up about 4 minutes after each startup suggests it is listening. << This would be confused by a lack of a QueryPort.

It looks like you're running 2 servers from the same directory. One server is being updated, while the other is being restarted some time later.

Additionally, it looks like the TheIsland server has Port= and QueryPort=. You might want to specify your Port and QueryPort for that TheIsland server. You should also specify a different RCONPort as both servers are trying to listen on the same RCON port.

@krobertson
Copy link

I have been having this same issue, and my logs contain roughly the same output. I am only running one instance, however there are two things I notice that are consistent:

  1. The restart after the update contains Port=-1 and QueryPort without a parameter.

  2. Instead of outputting server is up, I can see this in the log:

15:00:54: Bad PID '26750'; expected '17553'
15:00:54: exited with status 0

I normally see Bad PID '' on a normal server shutdown, however when it shows an actual PID is always the failed startup after an update.

I have updates configured in a cron job with the command arkmanager update --warn --update-mods. I can try specifying the instance to see if the restart then works, but also seems like a valid issue.

@krobertson
Copy link

I think both myself and @boistordu are running Ark in Docker using https://github.com/TuRz4m/Ark-docker from @TuRz4m. I think it is more specific to the image. So retract my statement.

In the restart, some settings are correct, like the mods, but all the ones that are wrong like the Port, QueryPort, map, and such are all settings that are populated by environment variables. The main user controlled arkmanger.cfg has this:

serverMap=${SERVERMAP}                                          # server map (default TheIsland)
#serverMapModId="469987622"                                         # Uncomment this to specify the Map Mod Id (<fileid> in http://steamcommunity.com/sharedfiles/filedetails/?id=<fileid>)
#ark_TotalConversionMod="496735411"                                 # Uncomment this to specify a total-conversion mod
ark_SessionName=${SESSIONNAME}                                  # if your session name needs special characters please use the .ini instead
ark_ServerPassword=${SERVERPASSWORD}                            # ARK server password, empty: no password required to login
ark_ServerAdminPassword=${ADMINPASSWORD}                        # ARK server admin password, KEEP IT SAFE!
ark_MaxPlayers=${NBPLAYERS}                                      # Number MAX of player

And the /etc/arkmanager/arkmanager.cfg has this:

# Port config 
ark_Port=${STEAMPORT}                                                     # ARK server port (default 7778)
ark_QueryPort=${SERVERPORT}                                               # ARK query port (default 27016)
ark_RCONEnabled="True"                                              # Enable RCON Protocol
ark_RCONPort="32330"                                                # RCON Port

So I'll take a look at adjusting the crontab to properly have the environment variables as well.

@krobertson
Copy link

Ok... it seems I am chasing behind @boistordu again, he already filed an issue with the Docker image. 😄

But in the discussion, they didn't seem to reach the conclusion it was environment related with the crontab.

@changemenemo
Copy link
Author

ow no you are not chasing after me. I'm trying different tests from time to time but I need to come with the idea first, that's what takes time.
so yes we are using apparently the same docker image. And I still can't see why the PID should be wrong ? did you find anything in the dockerfile about tue *PID?

@klightspeed
Copy link
Collaborator

The docker image pins arkmanager to v1.5

I suspect that ENV lines only apply to lines executed from the Dockerfile. cron would use whatever environment was inherited from the init system (systemd in this case). If the docker file writes the environment to a file that is sourced by the shell, then it might be best to source that file from arkmanager.cfg

@changemenemo
Copy link
Author

yeah but i've changet that a long time ago by compiling myself. Sorry but I still don't see which line of env in the dockerfile or the rest that could indicate to cron to use different pid than the actual process of arkmanager launching ark. But I will continue to revise the code and do some tests.

@krobertson
Copy link

The PID isn't the actual problem. It starts the new server with completely wrong parameters, such as using TheIsland instead of TheCenter.

The PID doesn't matter since way before that is where it was wrong.

@changemenemo
Copy link
Author

yes but then do we speak about PID problem and that there is actually 2 PID referenced in our logs. The system can't guess a PID to my knowledge, do it? And yes the start is with wrong parameters, totally agreeing with you on that but normally it shouldn't be a problem since we are changing that afterwards so shouldn't the process manager following that? ? plus normally the process managing all that is reading configurations files which precises another configuration than the first parameters no?

@changemenemo
Copy link
Author

What I mean, is that norammly no coders would (didn't revise the code of arkmanager) base the configruation of his tool on environment var if there are local configuration files.

@krobertson
Copy link

I agree, the issue is definitely the docker image. I was going to update it to have the crontab load the right environment variables.

@changemenemo
Copy link
Author

I think we need to take a beat here and discuss that more.
in which way do you want to change the crontab? there is nothing in the crontab at the beginning and I don't see any line about the crontab being modified....
Did you at least first try to modify the dockerfile with good env var? Because I did and it didn't change anything a few months earlier... So that's why we need to take a beat here I think... Or maybe I don't understand what you want to modify

@changemenemo
Copy link
Author

maybe it would be best if both of us put in clear in the cfg files all the parameters. Like that we'll see if there is any change about that.
If I recall correctly my test, there won't be any changes and we will still end up with the same problem. But maybe I'm wrong.

@krobertson
Copy link

My goal is to change the image to work without having to do more manual setup. Will try to have a PR for the docker image tomorrow.

@changemenemo
Copy link
Author

and what is your definition of manual setup here? we only need to define some of the parameters .... We'll see your code then but the first thing that came wrong with turzam was precisely that he didn't have the time to talk about the problems in his docker image. Anyway tell me when you have time to talk about it since I'm not comfortable for another one who again have no time to talk about the changes.

@krobertson
Copy link

Are you saying insinuating I am the other one who doesn't have time to talk about it?

I'll have a PR for it. In my opinion, it is easier to have comments on something concrete as opposed to something half done.

To your question though, should have it fixed by just stopping your Docker container, pulling the new image, an then running it with that image. That way it is just fixed for anyone already using the image and isn't a breaking change.

@changemenemo
Copy link
Author

no I wasn't saying that, I just don't wan't another Turzam case, that's what I'm saying.

and you didn't seem to have understood a word of what I've said earlier. Like I said earlier, I've tested by removing env var and put the parameters in the *.cfg files directly => it hasn't change a thing, still same problem, still same logs content. And that was 3 or 4 months ago. So we can try again if you want to do that but did you at least test it already before to put in place another file ?

@krobertson
Copy link

Did you also hard set ark_Port and ark_QueryPort in /ark/arkmanager.cfg? These ones only existed in the docker image itself and wouldn't persist between container restarts.

I was going to start a second server with an hourly server restart in cron to see if it has the same issue. Easier than waiting for the next update.

@changemenemo
Copy link
Author

yes I've done that too. But please test on your end too, maybe i've done something wrong at that time, it's totally possible that I've done slightly mistake or something else, so please try it too.

Maybe I don't have enough knowledge to do so, but in any case I still don't see the link that you see between env var, crontab. So if it works at your end, I will be very happy to know I just didn't have the knowledge of what's happening here.

@klightspeed
Copy link
Collaborator

What is the output of arkmanager --version on the docker image? Is the wrong parameters issue fixed when you change the GIT_TAG=v1.5 to either GIT_TAG=master or GIT_TAG=v1.6.14

With the crontab env var issue, you will likely need to export the variables to a file and have arkmanager.cfg source that file.

@changemenemo
Copy link
Author

changemenemo commented Dec 31, 2016

docker exec ark arkmanager --version
Version: 1.6
Channel: master
Blob SHA: 42672a2c2754752a0216b86dd8a5728ab879ee6a

I know that certainly not the last commit but i didn't done an upgrade since 3 or 4 months ago. Since the change of using root or a specific user for arkmanager actually.

@changemenemo
Copy link
Author

actually I just think about something... you've changed from root to the user steam to run arkmanager correct?

@changemenemo
Copy link
Author

/etc/arkmanager/arkmanager.cfg doesn't get the right configuration settings in our dockerfile @kroberston

@changemenemo
Copy link
Author

@krobertson so anyway if you could enlight me about a problem that would be great. Why our docker container is the only one where copy the content of a env var in a *.cfg file is problematic?
our /etc/arkmanagerarkmanager.cfg never take the right configuration of the env var and the specificity of creating a docker container is actually to put these contents into file. So if you have a piece of information about that, I would be eternally happy about it.

@changemenemo
Copy link
Author

and by the way the ark port and ark query port are not up to date anymore with the new config file from arkamanger 1.6.14

@krobertson
Copy link

Posted my changes here: TuRz4m/Ark-docker#17

From using it locally with a crontab that just did a restart, it appears to be working just fine. No other changes necessary to my existing crontab or config files.

I pushed the image as krobertson/ark:test and will switch my server over to using it, and see if the next server update goes fine.

@changemenemo
Copy link
Author

i will continue to discuss of some specs to your changes on the comment of your modification

@Alphakilo Alphakilo added the Time Out Issue closed due to inactivity label Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Time Out Issue closed due to inactivity
Projects
None yet
Development

No branches or pull requests

4 participants