{
   "expand": "operations,versionedRepresentations,editmeta,changelog,renderedFields",
   "id": "217255",
   "self": "https://bugs.mojang.com/rest/api/2/issue/217255",
   "key": "BDS-203",
   "fields": {
      "issuetype": "1",
      "project": "11700",
      "fixVersions": [],
      "resolution": "4",
      "customfield_10500": {
         "self": "https://bugs.mojang.com/rest/api/2/customFieldOption/10303",
         "value": "Confirmed",
         "id": "10303",
         "disabled": false
      },
      "customfield_12800": null,
      "customfield_12602": [],
      "customfield_12601": null,
      "customfield_12604": null,
      "customfield_12603": null,
      "customfield_12606": null,
      "customfield_12605": null,
      "customfield_12608": null,
      "resolutiondate": "2021-12-28T17:53:26.000+0200",
      "customfield_12607": null,
      "customfield_12609": null,
      "workratio": -1,
      "lastViewed": null,
      "watches": {
         "self": "https://bugs.mojang.com/rest/api/2/issue/BDS-203/watchers",
         "watchCount": 2,
         "isWatching": false
      },
      "created": "2018-10-29T06:46:20.000+0200",
      "customfield_12000": null,
      "customfield_12201": null,
      "customfield_12600": null,
      "labels": [],
      "customfield_11700": "{}",
      "versions": [
         "17409",
         "17604",
         "19807"
      ],
      "issuelinks": [
         {
            "id": "198103",
            "self": "https://bugs.mojang.com/rest/api/2/issueLink/198103",
            "type": "10102",
            "inwardIssue": "225656"
         },
         {
            "id": "248135",
            "self": "https://bugs.mojang.com/rest/api/2/issueLink/248135",
            "type": "10102",
            "inwardIssue": "239430"
         }
      ],
      "assignee": null,
      "updated": "2021-12-28T17:53:26.000+0200",
      "status": "5",
      "description": "h4. Summary\r\nBDS does not respond to standard server signals.\r\n\r\nh4. Steps to reproduce... (windows)\r\n# Download and unzip BDS\r\n# Download and unzip NSSM\r\n# Configure BDS as a service and start - ensure you enable logging for easiest eval\r\n# Stop the service using cmd/powershell/services.msc\r\n# Note in the log that the server immediately terminates rather than running a safe shutdown\r\n\r\nh4. What I expected to happen...\r\nBDS should handle the termination signal gracefully to allow BDS to be configured as a service.\r\n\r\nh4. What actually happened...\r\nServer immediately terminated, risking corruption etc.\r\n\r\nh4. How this affects admins\r\nAt 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.",
      "customfield_11100": 2.0,
      "customfield_11300": null,
      "customfield_11500": null,
      "customfield_12503": null,
      "customfield_12700": null,
      "customfield_12502": null,
      "customfield_12504": null,
      "attachment": [],
      "summary": "BDS not stopping gracefully when running as a service",
      "creator": "paulk",
      "reporter": "paulk",
      "customfield_10002": null,
      "customfield_12501": null,
      "customfield_12500": null,
      "customfield_11601": null,
      "customfield_11600": "0|i0vk53:",
      "environment": null,
      "customfield_11801": null,
      "customfield_11800": null,
      "customfield_11602": null,
      "customfield_11802": null,
      "comment": {
         "comments": [
            {
               "self": "https://bugs.mojang.com/rest/api/2/issue/217255/comment/497990",
               "id": "497990",
               "author": "jmb1304",
               "body": "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.",
               "updateAuthor": "jmb1304",
               "created": "2018-10-30T06:14:17.678+0200",
               "updated": "2018-10-30T06:14:17.678+0200"
            },
            {
               "self": "https://bugs.mojang.com/rest/api/2/issue/217255/comment/498118",
               "id": "498118",
               "author": "paulk",
               "body": "Thanks, Jacob. \"screens\" was a helpful tip.",
               "updateAuthor": "paulk",
               "created": "2018-10-30T23:17:15.374+0200",
               "updated": "2018-10-30T23:17:15.374+0200"
            },
            {
               "self": "https://bugs.mojang.com/rest/api/2/issue/217255/comment/511779",
               "id": "511779",
               "author": "mecu",
               "body": "Can either of you please provide steps on how to achieve this?\n\n\u00a0\n\nThis comment gives an example:\u00a0https://bugs.mojang.com/browse/BDS-56?focusedCommentId=490680&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-490680",
               "updateAuthor": "mecu",
               "created": "2019-01-12T02:29:34.746+0200",
               "updated": "2019-01-12T02:30:43.980+0200"
            },
            {
               "self": "https://bugs.mojang.com/rest/api/2/issue/217255/comment/525308",
               "id": "525308",
               "author": "mecu",
               "body": "I found this, which was written for the Java version, but adapted works for Bedrock too:\n\nhttps://gist.github.com/justinjahn/4fe65b552b0622662420928cc8ffc7c0",
               "updateAuthor": "mecu",
               "created": "2019-03-14T00:22:18.903+0200",
               "updated": "2019-03-14T00:22:18.903+0200"
            },
            {
               "self": "https://bugs.mojang.com/rest/api/2/issue/217255/comment/528398",
               "id": "528398",
               "author": "solrac214",
               "body": "I have had really good luck running the server in a docker container.\u00a0https://github.com/cdunkelb/bedrocker",
               "updateAuthor": "solrac214",
               "created": "2019-03-24T04:55:47.349+0200",
               "updated": "2019-03-24T04:55:47.349+0200"
            },
            {
               "self": "https://bugs.mojang.com/rest/api/2/issue/217255/comment/783367",
               "id": "783367",
               "author": "ionicecko",
               "body": "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). \r\n\r\nHowever, 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 .\r\n\r\nI've updated the summary to focus on that issue and confirmed the report.",
               "updateAuthor": "ionicecko",
               "created": "2020-08-09T15:53:52.359+0300",
               "updated": "2020-08-09T15:53:52.359+0300"
            },
            {
               "self": "https://bugs.mojang.com/rest/api/2/issue/217255/comment/1085718",
               "id": "1085718",
               "author": "JIRAUSER648376",
               "body": "Hi\r\n\r\nDoes this issue still occur after updating to 1.17.34? \r\n\r\nThis ticket will automatically reopen when you reply. ",
               "updateAuthor": "JIRAUSER648376",
               "created": "2021-10-07T16:22:58.653+0300",
               "updated": "2021-10-07T16:22:58.653+0300"
            },
            {
               "self": "https://bugs.mojang.com/rest/api/2/issue/217255/comment/1131515",
               "id": "1131515",
               "author": "JIRAUSER648376",
               "body": "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|http://help.mojang.com/customer/portal/articles/801354-writing-helpful-bug-reports-for-minecraft] which includes steps to reproduce the problem.\r\n\r\n{*}Quick Links{*}:\r\n\ud83d\udcd3 [Issue Guidelines|http://help.mojang.com/customer/portal/articles/801354-writing-helpful-bug-reports-for-minecraft] \u2013 \ud83d\udcac [Mojang Support|https://help.minecraft.net/hc/en-us/requests/new] \u2013 \ud83d\udce7 [Suggestions|https://feedback.minecraft.net/] \u2013 \ud83d\udcd6 [Minecraft Wiki|http://minecraft.gamepedia.com/Minecraft_Wiki]",
               "updateAuthor": "JIRAUSER648376",
               "created": "2021-12-28T17:53:26.632+0200",
               "updated": "2021-12-28T17:53:26.632+0200"
            }
         ],
         "maxResults": 8,
         "total": 8,
         "startAt": 0
      },
      "votes": {
         "self": "https://bugs.mojang.com/rest/api/2/issue/BDS-203/votes",
         "votes": 2,
         "hasVoted": false
      }
   },
   "changelog": {
      "startAt": 0,
      "maxResults": 12,
      "total": 12,
      "histories": [
         {
            "id": "1003407",
            "author": "bemoty",
            "created": "2018-11-10T19:02:55.971+0200",
            "items": [
               {
                  "field": "description",
                  "fieldtype": "jira",
                  "from": null,
                  "fromString": null,
                  "to": null,
                  "toString": "Would be great to eventually have the Bedrock server more easily integrate with systemd/systemctl on Ubuntu, for starting on system boot-up, re-starting on failure, etc.\n\nI can do it now, but it's kind of hack-y. For example, once systemd starts the Bedrock server, there's no good way to have it gracefully stop, it must kill the process.\n\nAlong the same line, if we're daemonizing ( ? ) the server,\u00a0it'd be nice to have some way to attach to a running server in order to run commands.\n\nExample :\u00a0./bedrock_server attach\n\nI'd even settle for some way to run commands one-off, so I could properly shut down a running server.\n\nExample :\u00a0./bedrock_server command stop\n\nThanks!"
               },
               {
                  "field": "environment",
                  "fieldtype": "jira",
                  "from": null,
                  "fromString": "Would be great to eventually have the Bedrock server more easily integrate with systemd/systemctl on Ubuntu, for starting on system boot-up, re-starting on failure, etc.\n\nI can do it now, but it's kind of hack-y. For example, once systemd starts the Bedrock server, there's no good way to have it gracefully stop, it must kill the process.\n\nAlong the same line, if we're daemonizing ( ? ) the server,\u00a0it'd be nice to have some way to attach to a running server in order to run commands.\n\nExample :\u00a0./bedrock_server attach\n\nI'd even settle for some way to run commands one-off, so I could properly shut down a running server.\n\nExample :\u00a0./bedrock_server command stop\n\nThanks!",
                  "to": null,
                  "toString": null
               }
            ]
         },
         {
            "id": "1758776",
            "author": "ionicecko",
            "created": "2020-08-09T15:27:52.038+0300",
            "items": [
               {
                  "field": "Confirmation Status",
                  "fieldtype": "custom",
                  "from": null,
                  "fromString": null,
                  "to": "10300",
                  "toString": "Unconfirmed"
               },
               {
                  "field": "status",
                  "fieldtype": "jira",
                  "from": "1",
                  "fromString": "Open",
                  "to": "1",
                  "toString": "Open"
               }
            ]
         },
         {
            "id": "1758793",
            "author": "ionicecko",
            "created": "2020-08-09T15:38:51.842+0300",
            "items": [
               {
                  "field": "Link",
                  "fieldtype": "jira",
                  "from": null,
                  "fromString": null,
                  "to": "BDS-437",
                  "toString": "This issue is duplicated by BDS-437"
               }
            ]
         },
         {
            "id": "1758806",
            "author": "ionicecko",
            "created": "2020-08-09T15:54:01.405+0300",
            "items": [
               {
                  "field": "description",
                  "fieldtype": "jira",
                  "from": null,
                  "fromString": "Would be great to eventually have the Bedrock server more easily integrate with systemd/systemctl on Ubuntu, for starting on system boot-up, re-starting on failure, etc.\n\nI can do it now, but it's kind of hack-y. For example, once systemd starts the Bedrock server, there's no good way to have it gracefully stop, it must kill the process.\n\nAlong the same line, if we're daemonizing ( ? ) the server,\u00a0it'd be nice to have some way to attach to a running server in order to run commands.\n\nExample :\u00a0./bedrock_server attach\n\nI'd even settle for some way to run commands one-off, so I could properly shut down a running server.\n\nExample :\u00a0./bedrock_server command stop\n\nThanks!",
                  "to": null,
                  "toString": "h4. Summary\r\nBDS does not respond to standard server signals.\r\n\r\nh4. Steps to reproduce... (windows)\r\n# Download and unzip BDS\r\n# Download and unzip NSSM\r\n# Configure BDS as a service and start - ensure you enable logging for easiest eval\r\n# Stop the service using cmd/powershell/services.msc\r\n# Note in the log that the server immediately terminates rather than running a safe shutdown\r\n\r\nh4. What I expected to happen...\r\nBDS should handle the termination signal gracefully to allow BDS to be configured as a service.\r\n\r\nh4. What actually happened...\r\nServer immediately terminated, risking corruption etc.\r\n\r\nh4. How this affects admins\r\nAt 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."
               }
            ]
         },
         {
            "id": "1758807",
            "author": "ionicecko",
            "created": "2020-08-09T15:54:23.256+0300",
            "items": [
               {
                  "field": "Confirmation Status",
                  "fieldtype": "custom",
                  "from": "10300",
                  "fromString": "Unconfirmed",
                  "to": "10303",
                  "toString": "Confirmed"
               },
               {
                  "field": "status",
                  "fieldtype": "jira",
                  "from": "1",
                  "fromString": "Open",
                  "to": "1",
                  "toString": "Open"
               },
               {
                  "field": "summary",
                  "fieldtype": "jira",
                  "from": null,
                  "fromString": "Launch with systemd (Ubuntu), and attach to running service",
                  "to": null,
                  "toString": "BDS not stopping gracefully when running as a service"
               }
            ]
         },
         {
            "id": "1760229",
            "author": "arisabot",
            "created": "2020-08-10T15:54:27.773+0300",
            "items": [
               {
                  "field": "Linked",
                  "fieldtype": "custom",
                  "from": null,
                  "fromString": null,
                  "to": null,
                  "toString": "1"
               },
               {
                  "field": "status",
                  "fieldtype": "jira",
                  "from": "1",
                  "fromString": "Open",
                  "to": "1",
                  "toString": "Open"
               }
            ]
         },
         {
            "id": "2344780",
            "author": "JIRAUSER648376",
            "created": "2021-08-30T13:53:44.780+0300",
            "items": [
               {
                  "field": "Link",
                  "fieldtype": "jira",
                  "from": null,
                  "fromString": null,
                  "to": "BDS-847",
                  "toString": "This issue is duplicated by BDS-847"
               }
            ]
         },
         {
            "id": "2344782",
            "author": "arisabot",
            "created": "2021-08-30T13:53:48.524+0300",
            "items": [
               {
                  "field": "Version",
                  "fieldtype": "jira",
                  "from": null,
                  "fromString": null,
                  "to": "17604",
                  "toString": "1.9.0.15"
               },
               {
                  "field": "Version",
                  "fieldtype": "jira",
                  "from": null,
                  "fromString": null,
                  "to": "19807",
                  "toString": "1.16.201.03 Hotfix"
               }
            ]
         },
         {
            "id": "2345778",
            "author": "arisabot",
            "created": "2021-08-31T13:53:57.121+0300",
            "items": [
               {
                  "field": "Linked",
                  "fieldtype": "custom",
                  "from": null,
                  "fromString": "1",
                  "to": null,
                  "toString": "2"
               },
               {
                  "field": "status",
                  "fieldtype": "jira",
                  "from": "1",
                  "fromString": "Open",
                  "to": "1",
                  "toString": "Open"
               }
            ]
         },
         {
            "id": "2392938",
            "author": "JIRAUSER648376",
            "created": "2021-10-07T16:22:58.661+0300",
            "items": [
               {
                  "field": "resolution",
                  "fieldtype": "jira",
                  "from": null,
                  "fromString": null,
                  "to": "10001",
                  "toString": "Awaiting Response"
               },
               {
                  "field": "status",
                  "fieldtype": "jira",
                  "from": "1",
                  "fromString": "Open",
                  "to": "5",
                  "toString": "Resolved"
               }
            ]
         },
         {
            "id": "2497721",
            "author": "JIRAUSER648376",
            "created": "2021-12-28T17:52:41.657+0200",
            "items": [
               {
                  "field": "resolution",
                  "fieldtype": "jira",
                  "from": "10001",
                  "fromString": "Awaiting Response",
                  "to": null,
                  "toString": null
               },
               {
                  "field": "status",
                  "fieldtype": "jira",
                  "from": "5",
                  "fromString": "Resolved",
                  "to": "4",
                  "toString": "Reopened"
               }
            ]
         },
         {
            "id": "2497722",
            "author": "JIRAUSER648376",
            "created": "2021-12-28T17:53:26.634+0200",
            "items": [
               {
                  "field": "resolution",
                  "fieldtype": "jira",
                  "from": null,
                  "fromString": null,
                  "to": "4",
                  "toString": "Incomplete"
               },
               {
                  "field": "status",
                  "fieldtype": "jira",
                  "from": "4",
                  "fromString": "Reopened",
                  "to": "5",
                  "toString": "Resolved"
               }
            ]
         }
      ]
   }
}