[BDS-847] SIGTERM doesn't make Ubuntu Bedrock Server save and quit gracefully. Created: 01/May/19  Updated: 30/Aug/21  Resolved: 30/Aug/21

Status: Resolved
Project: Bedrock Dedicated Server
Affects Version/s: 1.9.0.15, 1.16.201.03 Hotfix
Fix Version/s: None

Type: Bug
Reporter: Jordon Moss Assignee: Unassigned
Resolution: Duplicate Votes: 3
Labels: awaiting-response
Environment:

Ubuntu Server 18.04 LTS. Server running as systemd service.


Issue Links:
Duplicate
duplicates BDS-203 BDS not stopping gracefully when runn... Resolved
Confirmation Status: Plausible

 Description   

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".



 Comments   
Comment by Maciej Piornik [ 30/Aug/21 ]

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

Comment by MrZoraman [ 01/Mar/21 ]

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
Comment by [Mojang] Mega_Spud (Jay Wells) [ 29/Jan/21 ]

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

Comment by IonicEcko [ 23/Jun/20 ]

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?
Comment by Toba da'Great [ 13/May/20 ]

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.

Comment by IonicEcko [ 25/Mar/20 ]

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

Comment by IonicEcko [ 04/Mar/20 ]

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

Comment by Vincent Vermilya [ 22/Jul/19 ]

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.

Comment by Beesham [ 03/May/19 ]

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.

Generated at Sat Jan 11 07:15:36 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.