GameServerManagers / LinuxGSM

The command-line tool for quick, simple deployment and management of Linux dedicated game servers.
https://linuxgsm.com
MIT License
4.3k stars 819 forks source link

ts3server stops with Accounting error during cronjob update, and sometimes randomly #2513

Closed borzaka closed 3 years ago

borzaka commented 5 years ago

User Story

I have root cronjobs to manage the ts3server. It looks like this:

@reboot su - ts3server -c '/home/ts3server/ts3server monitor' > /dev/null 2>&1
30 5 * * * su - ts3server -c '/home/ts3server/ts3server update' > /dev/null 2>&1
0 0 * * 0 su - ts3server -c '/home/ts3server/ts3server update-functions' > /dev/null 2>&1

Since 2019.09.14. when the update command runs, the server stops and I have to manually start. This happened 2 days in a row.

I have updates below.

Basic info

Further Information

When I manually run the update command by the ts3server user, or with root, no server stoppings.

Logs

script:

Sep 16 05:30:02.582 ts3server: UPDATE: INFO: Checking for update: teamspeak.com
Sep 16 05:30:04.091 ts3server: UPDATE: PASS: Checking local build
Sep 16 05:30:05.298 ts3server: UPDATE: PASS: Checking remote build
Sep 16 05:30:06.303 ts3server: UPDATE: INFO: No update available
Sep 16 05:30:06.304 ts3server: UPDATE: INFO: Local build: 3.9.1
Sep 16 05:30:06.305 ts3server: UPDATE: INFO: Remote build: 3.9.1
Sep 16 05:30:06.307 ts3server: UPDATE: PASS: command_update.sh exiting with code: 0

server:

strange, I have found this 2 lines in 2 different log files. ts3server_2019-09-15__11_06_15.947276_0.log ts3server_2019-09-15__11_06_15.947276_1.log

2019-09-16 03:30:16.396367|ERROR   |Accounting    |   |failed to register local accounting service: No such file or directory
2019-09-16 03:30:16.396785|INFO    |VirtualServerBase|1  |stopped

Don't mind the 03:30 timestamp. It was at 05:30, but ts3server somehow logged 03:30.

updated postdetails (2020.05.10.): https://termbin.com/wjr4

Expected behaviour

No stopping during updates.

Updates

Before this I was changing TeamSpeak password via ./ts3server change-password During the password change, it notified me that ts3server will be restarted. A stop occurred, but a restart not. I had to manually start the server again. The anomaly described in this issue started after this:

issue-label-bot[bot] commented 5 years ago

Issue-Label Bot is automatically applying the label type: bug to this issue, with a confidence of 0.90. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

borzaka commented 4 years ago

This issue is just happened again. And I have no idea what triggered it.

console:

2020-05-07 03:30:17.233598|ERROR   |Accounting    |   |failed to register local accounting service: No such file or directory
2020-05-07 03:30:17.233947|INFO    |VirtualServerBase|1  |stopped

script:

May 07 05:30:03.871 ts3server: UPDATE: INFO: Checking for update: teamspeak.com
May 07 05:30:04.880 ts3server: UPDATE: PASS: Checking local build
May 07 05:30:06.053 ts3server: UPDATE: PASS: Checking remote build
May 07 05:30:07.058 ts3server: UPDATE: INFO: No update available
May 07 05:30:07.059 ts3server: UPDATE: INFO: Local build: 3.12.1
May 07 05:30:07.059 ts3server: UPDATE: INFO: Remote build: 3.12.1
May 07 05:30:07.062 ts3server: UPDATE: INFO: LinuxGSM version: v20.2.1
May 07 05:30:07.063 ts3server: UPDATE: PASS: command_update.sh exiting with code: 0

server: 2020-05-07 03:30:17.233947|INFO |VirtualServerBase|1 |stopped

Note: The timestamps are off, but this happened on the same time.

I had to manually start.

My cronjobs:

###TeamSpeak###
@reboot su - ts3server -c '/home/ts3server/ts3server monitor' > /dev/null 2>&1
30 5 * * * su - ts3server -c '/home/ts3server/ts3server update' > /dev/null 2>&1
0 0 * * 0 su - ts3server -c '/home/ts3server/ts3server update-functions' > /dev/null 2>&1

Updated postdetails: https://termbin.com/wjr4

Yesterday it happened out of the blue, no update was scheduled, and dropped everyone on the server:

2020-05-09 22:00:24.504222|ERROR   |Accounting    |   |failed to register local accounting service: No such file or directory
2020-05-09 22:00:24.504281|INFO    |VirtualServerBase|1  |client disconnected 'r3imal'(id:120) reason 'reasonmsg=Server Shutdown!'
2020-05-09 22:00:24.504391|INFO    |VirtualServerBase|1  |client disconnected 'ToT_T1'(id:24) reason 'reasonmsg=Server Shutdown!'
2020-05-09 22:00:24.504800|INFO    |VirtualServerBase|1  |stopped

I found this, but the source site is does not exists:

FIx "Failed to register local accounting service" error message

Edit /etc/fstab and add the following line at the bottom: tmpfs /dev/shm tmpfs defaults 0 0

Source: http://forum.teamspeak.com/showthread.php/68827-Failed-to-register-local-accounting-service

And found this issue, which might be related: #2436 It says I have to delete this file:

ts3server@debian:~$ ls -al /dev/shm
total 4
drwxrwxrwt  2 root      root        60 May 10 11:25 .
drwxr-xr-x 19 root      root      3300 May  6 17:53 ..
-rw-r--r--  1 ts3server ts3server  128 May 10 11:25 7gbhujb54g8z9hu43jre8

But the ownership looks right.

When the ts3server is not running, the 7gbhujb54g8z9hu43jre8 file doesn't exists:

ts3server@debian:~$ ls -al /dev/shm
total 0
drwxrwxrwt  2 root root   40 May 11 05:30 .
drwxr-xr-x 19 root root 3300 May  6 17:53 ..

After I start it creates it.

I found this in the official docs: https://docs.linuxgsm.com/game-servers/teamspeak-3#accounting-failed-to-register

h3o66 commented 4 years ago

Are there any special settings set in LGSM ?

gxind commented 3 years ago

just run into the same story any update on this issue? debian 10

h3o66 commented 3 years ago

Imho a fix could be created, that could delete this if no other Teamspeak 3 instance is running on the server. But this should not happen usually if the server is stopped under normal conditions.

h3o66 commented 3 years ago

Hopefully this is fixed by the PR If someone is able to test it, feel free to.

h3o66 commented 3 years ago

updated my PR, maybe someone wants to check this :)

netstx commented 3 years ago

Is this common to most game servers or just ts3? I have an issue where my Valheim server stops after updates (set to check for update during server start in the config). Was wondering if this is related at all, or if I should keep looking. Thanks.

h3o66 commented 3 years ago

Is this common to most game servers or just ts3? I have an issue where my Valheim server stops after updates (set to check for update during server start in the config). Was wondering if this is related at all, or if I should keep looking. Thanks.

this is just a issue specific for TS3

github-actions[bot] commented 2 years ago

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