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

restarting server after update not working #13

Open
changemenemo opened this issue Aug 1, 2016 · 25 comments · May be fixed by #17
Open

restarting server after update not working #13

changemenemo opened this issue Aug 1, 2016 · 25 comments · May be fixed by #17

Comments

@changemenemo
Copy link

the restart server after update seems good but then the server is jsut waiting and if i get the status the server is often in no status for listening. which log do you need? I don't see anything particular in it .

@changemenemo
Copy link
Author

changemenemo commented Aug 1, 2016

some example lines of arkserver.log
21:32:47: Server PID: 215 [S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed. Setting breakpad minidump AppID = 346110 rm: cannot remove '/ark/server/ShooterGame/Saved/.autorestart': No such file or directory Using binned. 4.5.1-0+UE4 7038 3077 402 5 /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 CtrlCHandler: Signal=2 /usr/local/bin/arkmanager: line 504: 215 Aborted (core dumped) "$arkserverroot/$arkserverexec" "$arkserveropts" "${arkextraopts[@]}" 21:33:47: start /usr/local/bin/arkmanager: line 641: ulimit: open files: cannot modify limit: Operation not permitted 21:33:47: Running /ark/server/ShooterGame/Binaries/Linux/ShooterGameServer TheCenter\?MaxPlayers=5\?Port=45113\?QueryPort=45115\?RCONEnabled=True\?RCONPort=32330\?ServerAdminPassword=PqWm8a4\?ServerPassword\?SessionName=Komintern\?listen -log 21:33:47: Server PID: 184 [S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed. Setting breakpad minidump AppID = 346110 21:35:27: server is up Using binned. 4.5.1-0+UE4 7038 3077 402 5 /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 06:00:42: start /usr/bin/arkmanager: line 641: ulimit: open files: cannot modify limit: Operation not permitted 06:00:42: Running /ark/server/ShooterGame/Binaries/Linux/ShooterGameServer TheCenter\?MaxPlayers=5\?Port=-1\?QueryPort\?RCONEnabled=True\?RCONPort=32330\?ServerAdminPassword\?ServerPassword\?SessionName\?listen -log 06:00:42: Server PID: 5799 /usr/local/bin/arkmanager: line 647: 184 Aborted (core dumped) "$arkserverroot/$arkserverexec" "$arkserveropts" "${arkextraopts[@]}" 06:00:42: Bad PID '5799'; expected '184' 06:00:42: exited with status 0 [S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed. Setting breakpad minidump AppID = 346110 06:02:59: server is up Using binned. 4.5.1-0+UE4 7038 3077 402 5 CtrlCHandler: Signal=2

crontab.log
Downloading ARK update ... �-�/�|�\�-�/�|�\�-�/�|�\�-�/�|�\�-�/�|�\�-�/�|�\�-�/�|�\�-�/�|�\�-�/�|�\�-�/�|�\�-�/� �This ARK server will shutdown for an update in 30 minutes Nobody is connected. Shutting down immediately Stopping server... The server has been stopped Applying update from staging directory The server is starting... The server is now running, and should be up within 10 minutes Running command 'update' for instance 'main' Downloading mod 111111111 ... �-�/�|�\�-�/�|�\�-� �Mod 111111111 was not successfully downloaded Your server is already up to date! The most recent version is 1255371. Running command 'update' for instance 'main' Downloading mod 111111111 ... �-�/�|�\�-�/�|�\�-�/� �Mod 111111111 was not successfully downloaded Your server is already up to date! The most recent version is 1255371. Running command 'update' for instance 'main' Downloading mod 111111111 ... �-�/�|�\�-�/�|�\�-�/� �Mod 111111111 was not successfully downloaded Your server is already up to date! The most recent version is 1255371. Running command 'update' for instance 'main' Downloading mod 111111111 ... �-�/�|�\�-�/�|�\�-�/� �Mod 111111111 was not successfully downloaded Your server is already up to date! The most recent version is 1255371.

is this because I have 2 instances of your docker running for 2 server in place of having 2 isntances of ark in the same docker instance? or is it a problem with the only mod I add?

@changemenemo
Copy link
Author

how do I do that within a docker? and why then when I do a restart of the server it's listening again? it's only when I try to let it be that it doesn't listen no more.

@changemenemo
Copy link
Author

changemenemo commented Aug 1, 2016

well sorry mate but I didn't know that since steam authorized multi session access to the same account, so I wasn't seeing the problem.
So Wait, if I follow you correctly I should do 2 instance of the same docker but well two server ark instance in the same docker, like that the script could have full control of the API?
Then I guess it's impossible to really run two server of ARK on two different machine with the same client access right? for example one server on OVH and one on my private network couldn't be possible or at least could cause some problems?
And by the way what could give a restart of steam anything good?

@changemenemo
Copy link
Author

And sorry if my questions are too stupid but at least I'm trying to understand what's wrong since I had apparently the wrong idea of the whole multi session of steam works....

@changemenemo
Copy link
Author

changemenemo commented Aug 1, 2016

mmmmh okey so I get the multisession totally wrong then ^^my bad.
I am under the impression that this docker doesn't allow multiple instance of ark in the same container, Am I correct?

And some subsidiary question : can't rebind with docker, it doesn't work => mean that even if we try to use these variables the server won't listen and that's why 7778 or 27015 are still open ?

@changemenemo
Copy link
Author

I can't find anything about restart steamcmd in docker and to have the ark server accept the new credentials actually.... So maybe you find it easily but I really don't find anything about it

@changemenemo
Copy link
Author

changemenemo commented Aug 1, 2016

anyway to resume i would need how to resume the steam credentials connection or should I reinstall the whole thing?
and I would like to know how do you launch the docker for multiple instances of ark server in the same container because i've seen an instance.cfg but his role doesn't seem clear to me.... And so yes i'm certainly a noob but to advance I need good documentation and I can't go through 4 days to experiment all parameters of this . sorry about that

@changemenemo
Copy link
Author

I would really like some help from turzam or someone else about how to restart steam? Or to know if I have to reinstall the whole docker ark?

@changemenemo
Copy link
Author

changemenemo commented Aug 7, 2016

Maybe I don't understand correctly but what you've linked it's only what basically the process in the docker does each time you run it isn't it? So what's the point, since I've already relaunch several time the docker container + erase the container and recreate it linked to the same container where all the config files and map are?
So the line

"Update checks SteamCMD for any server updates and applys them. The server will update and restart only if required.
./arkserver update"

it does it all the time and have done it all the time and still I had api failed according to your diagnostic based on my logs, so what good could that do ? It's an honnest quesiton, I clearly don't understand your point of view on this one.
From what you said earlier, I should find something like >steamcmd --forcecheck or something like that to relink the steam account to the installation of ark isn't it?

@changemenemo
Copy link
Author

changemenemo commented Aug 7, 2016

Hi,

Ireally don't want to argue but with so little explanation I don't know how you expect people to react.
I've tried google it during 3 days for that thing as you asked at first and found nothing. You linked me to a script website!!! this script bypass the whole installation of the container. I have several error message if I run it like that :

 `[ .... ] Validate ark-server: Validating files: SteamCMD

    fetching check_permissions.sh...FAIL
tee: /ark/log/script/ark-server-script.log: No such file or directory

tee: /ark/log/script/ark-server-script.log: No such file or directory
https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/lgsm/functions/check_permissions.sh`

Did you run your solution at first at least to be certain to not just do some jabbering?
If I run a docker it's to use the tool incorporated in the container, not to add new ones completely unrelated.

[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
This is a valid warning. As long as you see "Server started up successfully" message, just ignore it.

That's all what you find on google when you try to look for the problem I describe. So I can be very patient but if you are sure about your solution then explain it, not just throw it in the face of anyone.
thanks in advance

@changemenemo
Copy link
Author

So again my question was simple:
Is there a way !!!!!!!!!!!!!!with the tools already in place in the container!!!!!! to relink the account to steam? Or should make backup et reinstall the whole thing ?

@TuRz4m
Copy link
Owner

TuRz4m commented Aug 8, 2016

Hi,
I don't fully understand your problem, can we start again ?

  • Do you have the latest version of this image ? (To be sure : docker pull turzam/ark)
  • What exactly is your issue ?
  • What is your setup ? (can you provide the command line or docker-compose file ? (without password)

@changemenemo
Copy link
Author

of course, I didn't still have reinstalled.

latest yes.
the issue is that : when the server update itself (so not with my interaction), I have 50% chance that the server will not listening again= So if I ask arkmanager the server is running but not listening so not accessible from outside.
my command line is
docker run -d -p 45109:7778 -p 45109:7778/udp -p 45110:27015 -p 45110:27015/udp -p 45111:45111 -p 45111:45111/udp -p 45112:45112 -p 45112:45112/udp -p 45113:32330 -e SESSIONNAME=Barricade -e ADMINPASSWORD="" -e AUTOUPDATE=120 -e AUTOBACKUP=60 -e WARNMINUTE=30 -e SERVERPORT=45112 -e STEAMPORT=45111 -e TZ="Europe/Brussels" -v /media/DOCK/shared/ARK2/:/ark --name ark2 turzam/ark

I had two instance of your container running because I didn't know if your container was accepting and managing several instances and I was under the impression that it was not. So I had two of these nad csong95 have pointed that the steamAPI was failing in the logs I showed. So we came to the conclusion that it was because there were 2 instances running.

@TuRz4m
Copy link
Owner

TuRz4m commented Aug 8, 2016

This image is not designed to run multiple instances in one container. It could be possible but I never tried it.
Ark Server Tools allows multiple instances, but I think your container should run only one. It's cleaner if you have one instance per container imho.

WARNMINUTE, AUTOBACKUP & AUTOUPDATE is no longer used (you can use the crontab file).

Your command line should be like this
docker run -d -p 45111:45111 -p 45111:45111/udp -p 45112:45112 -p 45112:45112/udp -p 45113:32330 -e SESSIONNAME=Barricade -e ADMINPASSWORD="" -e SERVERPORT=45112 -e STEAMPORT=45111 -e TZ="Europe/Brussels" -v /media/DOCK/shared/ARK2/:/ark --name ark2 turzam/ark

And if you have another ark server, you should use something like that :
docker run -d -p 45121:45121 -p 45121:45121/udp -p 45122:45122 -p 45122:45122/udp -p 45123:32330 -e SESSIONNAME=Barricade2 -e ADMINPASSWORD="" -e SERVERPORT=45122 -e STEAMPORT=45121 -e TZ="Europe/Brussels" -v /media/DOCK/shared/ARK3/:/ark --name ark3 turzam/ark
(I know that you download the game twice, at least you won't have any problem and it's pretty easy to add another one)

Then for [S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed., I always had this error, but it never prevented the server from running. (If someone has a fix, I can modify this image)

Does your problem with restarting after an update happens also when you're running only one server ?
Does it occurs when you manually execute docker exec ark2 arkmanager update ?

@changemenemo
Copy link
Author

changemenemo commented Aug 8, 2016

so you are confirming that if I set the steamport variable manually it will change it? because your container still expose 27015 and 7778 .... Or is it just because of the expose statement in your dockerfile but it's actually not in use? I would really glad have an answer to this...

Okey so you are getting this error too, good to know then, so it's not related because of two ark server definitely.
the problem at starting never occured when I try to start the server myself or if I manually update with the commandline of arkmanager. So I was wondering between 3 solutions in my head, steam api problem or port forwarding problem (maybe some problem with some timeout because of docker) or hardware problem

And do you know if 2 session of steam like that can access the same steam api account?

@changemenemo
Copy link
Author

And as I say earlier, here is the proof that your container still expose unwanted ports:
0e7867185861 turzam/ark "/home/steam/user.sh" 2 minutes ago Up 2 minutes 7778/tcp, 7778/udp, 27015/tcp, 27015/udp, 0.0.0.0:45111-45112->45111-45112/tcp, 0.0.0.0:45111-45112->45111-45112/udp, 0.0.0.0:45113->32330/tcp

So can you clarify about the variables that you use?

@TuRz4m
Copy link
Owner

TuRz4m commented Aug 12, 2016

Yep I know.... basically, unless it has changed in ARK (it's possible, I tested this with an early version of the ark server), you can't bind the server port or steam port to another port with docker. So if you run your container like this : docker run -p 7779:7778 -p 27016:27015 turzam/ark, it just won't work.

You need to change this two ports in the ark server config file.
But when I created this image, I can't predict which port are going to be used.
Usually, when you run the container, you can map whatever port you want with the -p option.
In case you have issues with that, the solution is to clone this github with git clone https://github.com/TuRz4m/Ark-docker.git, change the variable STEAMPORT and SERVERPORT in the Dockerfile and then build it with docker build -t "ark" . and then use this image.

If someone has a better solution, I'm all ears.

Note : you can correctly remap the RCON port to a different port, this is why there is no config to change this one.

@changemenemo
Copy link
Author

If I may, can you let this thread open until I can confirm that I don't have the same problem? As soon as there is an update of ARK I will be back here. Until then I will make more investigate about the differences between expose port and publish port and also try to understand what exactly you wanted to mean in your last post because it wasn't clear for me.

@changemenemo
Copy link
Author

I still have the bug of non listening server after an automatic update. Before to re-build this thing i will try to reinstall it from your docker and then see if there is any changes.

@changemenemo
Copy link
Author

changemenemo commented Aug 15, 2016

I re-run the installation process again.
When do we inject the steam credentials again? I don't recall. Or maybe there isn't? But then here is the solution to our steam api failed... So we should put at least a file with steam credentials... I know that we can ran this shit anonymously, but is it really a good idea? I don't think so. So can we go forward with this problem? And obviously I don't have the knowledge to do it myself.

@changemenemo
Copy link
Author

tuI know this is vacation but turzam can you please answer ? thanks

@TuRz4m
Copy link
Owner

TuRz4m commented Aug 19, 2016

Yep ! Sorry, I'm a little busy, but I use steam anonymously because you can download/update Ark Server like this (at least last time I check)
If you use your steam account, you're gonna have some issues with steam guard always forgetting that you already have access and generally people don't like leaving their steam credentials in a file ^^

@changemenemo
Copy link
Author

I understand what you are saying but it is the responsability of the owner of the server to protect the data which are inside. Anyway could you add an option to give the credentials to the container and that it would use it? It could be really nice to do that. For steam guard you could take the same system that houki/arma3 since anyway the start of the container has to be with --it attached.
Anyway it would be nice if you could do that. At least it would delete the api steam error problem and not have answers like csong95 have answered to debug any kind of problems.

@changemenemo
Copy link
Author

did you think about what I said to enter the credentials? or at least to leave the choice to the user? I have an example of dockerfile for that if you want...

@changemenemo
Copy link
Author

It seems that we have no choice now to put our credentials because of the new extension which is a paid version :) So could you please think about it to put a credentials option in our container?

By the way, the server again stop listening. Just one server running, and i had done as I stated earlier, a new installation, so it can't come from my container. So maybe something in yoru image cause a problem like port forwarding, change of ip or i don't know. It could be great if you at least check by putting credentials in the running command of the image for example....

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

Successfully merging a pull request may close this issue.

2 participants