[BDS-203] BDS not stopping gracefully when running as a service Created: 29/Oct/18  Updated: 28/Dec/21  Resolved: 28/Dec/21

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

Type: Bug
Reporter: Paul K Assignee: Unassigned
Resolution: Incomplete Votes: 2
Labels: None

Issue Links:
Duplicate
is duplicated by BDS-437 Should handle SIGINT and SIGTERM signals Resolved
is duplicated by BDS-847 SIGTERM doesn't make Ubuntu Bedrock S... Resolved
Confirmation Status: Confirmed

 Description   

Summary

BDS does not respond to standard server signals.

Steps to reproduce... (windows)

  1. Download and unzip BDS
  2. Download and unzip NSSM
  3. Configure BDS as a service and start - ensure you enable logging for easiest eval
  4. Stop the service using cmd/powershell/services.msc
  5. Note in the log that the server immediately terminates rather than running a safe shutdown

What I expected to happen...

BDS should handle the termination signal gracefully to allow BDS to be configured as a service.

What actually happened...

Server immediately terminated, risking corruption etc.

How this affects admins

At the moment its possible to configure BDS as a service and it works without issue. However when restarting the host or even just the service, it terminates immediately causing an unsafe shutdown and risking corruption.



 Comments   
Comment by Maciej Piornik [ 28/Dec/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 Maciej Piornik [ 07/Oct/21 ]

Hi

Does this issue still occur after updating to 1.17.34?

This ticket will automatically reopen when you reply.

Comment by IonicEcko [ 09/Aug/20 ]

The report as it currently stands is more of a feature request (the ability to run BDS as a service etc) which need to be submitted over at the feedback site (https://feedback.minecraft.net).

However, the way BDS reacts when running as a service (not shutting down cleanly as described in BDS-437 - not obeying service termination signals) I would consider a bug .

I've updated the summary to focus on that issue and confirmed the report.

Comment by Carl Dunkelberger [ 24/Mar/19 ]

I have had really good luck running the server in a docker container. https://github.com/cdunkelb/bedrocker

Comment by Michael Hoppes [ 13/Mar/19 ]

I found this, which was written for the Java version, but adapted works for Bedrock too:

https://gist.github.com/justinjahn/4fe65b552b0622662420928cc8ffc7c0

Comment by Michael Hoppes [ 12/Jan/19 ]

Can either of you please provide steps on how to achieve this?

 

This comment gives an example: https://bugs.mojang.com/browse/BDS-56?focusedCommentId=490680&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-490680

Comment by Paul K [ 30/Oct/18 ]

Thanks, Jacob. "screens" was a helpful tip.

Comment by Jacob Barnes [ 30/Oct/18 ]

Currently the way most server owners do this is by using the screen package. I will agree though, it would be nice if the server could detect that the operating system is shutting down and gracefully stop itself.

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