Jira stopped suddenly with traces of a valid shutdown command
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Jira instance crashes sometimes without a reason. There is no high load or performance degradation before the shutdown.
Environment
Jira Software 8. x and above.
Diagnosis
In Jira Server logs you can see that Jira was shut down gracefully after receiving a valid shutdown command :
1
2
3
28-Mar-2023 13:23:04.200 INFO [Thread-2] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
28-Mar-2023 13:23:04.202 INFO [Thread-2] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
28-Mar-2023 13:28:04.641 INFO [main] org.apache.catalina.core.StandardServer.await A valid shutdown command was received via the shutdown port. Stopping the Server instance.
Cause
If your Jira server has stopped after a valid shutdown command, it means the process has been completed successfully. This command is usually sent by an administrator to stop the server. So, typically, the shutdown command is coming from someone stopping the service or running the stop-jira .bat/.sh file.
It could be that some other process/service on the server is stopping the service, but when this happens on a Linux instance, we typically don't see the shutdown command in Jira's logs. Instead, the system logs can track this as described in How to Resolve JIRA Process being Terminated Unexpectedly in Linux.
Admin configured an automation script (custom or using a 3rd party app) that has a "System. exit()" call in it.
If you see a similar log entry below, this suggests the stop command was initiated outside of Jira. We recommend engaging the team that supports the operating system that Jira runs on to determine what and how restartedJira.
1
2024-03-26 15:25:44,576+0900 Thread-1 INFO [c.a.jira.startup.DefaultJiraLauncher] Stopping launchers
If the environment is Linux
Examine the system log using the journalctl command, which shows the systemd logs. For example:
1
journalctl -u myservice
Replace "myservice" with the name of the service you're interested in.
Filter the logs based on the time period. For example, if you want to see the logs since yesterday, use this command:
1
journalctl -u myservice --since=yesterday
For more specific time periods, use the following format:
1
journalctl -u myservice --since="2024-03-01 00:00:00" --until="2024-03-31 23:59:59"
Remember to replace the dates and times with the range you're interested in.
If your service was restarted due to a system reboot, you might not find the exact reason in the service logs. In such cases, you can check the system reboot logs using the following command:
1
last reboot
This will show you a list of system reboots.
Solution
Start Jira manually: run
<installation-directory>\bin\start-jira.sh or start-jira.bat
The call System.exit() is a native JVM function. If this function is used in any script, it terminates the currently running JVM and exits the program. Disable the script or reach out to the third-party vendor, as it needs to be corrected. Hopefully, vendor support can provide alternatives.
Was this helpful?