Mojira Archive
BDS-847

SIGTERM doesn't make Ubuntu Bedrock Server save and quit gracefully.

When the minecraft dedicated server gets a SIGTERM signal, it doesn't save and quit gracefully. It just immediately kills the process without saving.

I'm currently running BDS as a systemd service, so I'd like to not lose data if I have to call "systemctl stop minecraft".

Environment

Ubuntu Server 18.04 LTS. Server running as systemd service.

Linked Issues

Comments9

I am having this issue also.
If terminated 'ungracefully', ports get tied up and the server cannot restart without freeing those ports or a system reboot.

For now you can use tmux to work around it.

ExecStart=/usr/bin/tmux new -ds mcbe 'LD_LIBRARY_PATH=. ./bedrock_server'`

ExecStop=/usr/bin/tmux sendkeys -t mcbe:0.0 stop Enter

You can't have more than 1 instance per tmux socket, but you can use the -S flag for that if you must. Hopefully they change their handling of SIGTERM from apathetically to cleanly.

Hi,

Is this still an issue in 1.14.32.1?

I know enough about linux to be dangerous and help test some of the issues here but this one is a little outside my wheel house.

If someone is able to test and confirm that would be amazing.

Ionic

I've not heard back from you in a while.

In order to keep the Bedrock Dedicated Server project running smoothly I'm going to request this issue be closed as Awaiting Response.

Never fear though! If this is still affecting you in the latest version (and is related to Bedrock Dedicated Server and not the Minecraft Bedrock game) all you have to do is comment and it will reopen.

If your issue does still exist but is related to the game and not the server software please head over to the Minecraft (Bedrock codebase) project.

Ionic

Quick Links:
πŸ““ Issue Guidelines – πŸ’¬ Community Support – πŸ“§ Customer Support – πŸ“– BDS Wiki – πŸ“– FAQs

This feature is needed on both Ubuntu and Windows. There is currently no safe way for an outside application to call for Save or shutdown when the server is running.

If the report could please be updated with the following information we can get the report confirmed. I have the knowledge to do it for Windows but no idea how this impacts Linux or how to repro.

What I expected to happen was...:

When I killed a squid, it should have dropped an ink sac.

What actually happened was...:

Instead, it dropped an apple.

Steps to Reproduce:

  1. Find a squid (though we all know how difficult they are to find when you actually want to find one).
  2. Kill the squid.
  3. Notice that it drops apples instead of ink sacs. How am I supposed to get black dye now?

Cleaning up old tickets: This ticket had been set to 'Awaiting Response', but has not received a response from the reporter (~3 months+) so is being closed as Incomplete. If you feel this is still a valid issue then please comment, or create a new ticket following the Issue Guidelines which includes steps to reproduce the problem.

Quick Links:
πŸ““ Issue Guidelines – πŸ’¬ Mojang Support – πŸ“§ Suggestions – πŸ“– Minecraft Wiki

I can confirm server versionΒ 1.16.201.3 on ubuntu and windows do not handle SIGTERM correctly. The server process ends immediately and does not shut down correctly.

Β 

What I expected to happen was...:

When I type ctrl+c, I expect the server to shut down as if I had issued the stop command.

Β 

What actually happened was...:

Instead, the process exits immediately without properly shutting down.Β 

Β 

Steps to Reproduce:

  1. Start the server
  2. With the server's terminal window active, press ctrl+c

Thank you for your report!
We're tracking this issue in BDS-203, so this ticket is being resolved and linked as a duplicate.

If you would like to add a vote and any extra information to the main ticket it would be appreciated.

If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.

Quick Links:
πŸ““ Bug Tracker Guidelines – πŸ“§ Mojang Support
πŸ““ Project Summary – ✍️ Feedback and Suggestions – πŸ“– BDS Wiki – πŸ“– FAQs

History11

IonicEcko

Added labels: awaiting-response

Removed labels:

[Mod] OcelotOnesie

Resolution: Unresolved β†’ Awaiting Response

[Bot] Arisa

Resolution: Awaiting Response β†’ Unresolved

IonicEcko

Added Confirmation Status: Plausible

[Mojang] Mega_Spud (Jay Wells)

Resolution: Unresolved β†’ Awaiting Response

[Mojang] Mega_Spud (Jay Wells)

Resolution: Awaiting Response β†’ Unresolved

[Mojang] Mega_Spud (Jay Wells)

Resolution: Unresolved β†’ Incomplete

[Mod] tryashtar

Added affects versions: 1.16.201.03 Hotfix

[Mod] tryashtar

Resolution: Incomplete β†’ Unresolved

Maciej Piornik
Maciej Piornik

Resolution: Unresolved β†’ Duplicate

Duplicate
Jordon Moss
3
2
Plausible
awaiting-response
1.9.0.15 1.16.201.03 Hotfix