2

I am running Atlassian JIRA on Ubuntu 12.04 LTS (Precise Pangolin). I would like to automatically start JIRA whenever the system boots. For this purpose, I created script jira in /etc/init.d, similar to the one described in Atlassian's Wiki.

I can manually start / stop JIRA by calling /etc/init.d/jira accordingly. However, JIRA does not start during the boot process. In /var/log/boot.log I see messages like Starting jira... and jira started... which I added in /etc/init.d/jira; however, it seems that the Java process does not survive the boot process as there is no Java process after reboot.

Any idea why the Java process does not outlive the boot process?

Thanks,

Martin

3 Answers 3

1

For anyone who runs into this on Ubuntu 18.04, this is apparently a known bug in Jira and one that hasn't been addressed and seems it may not be.

To resolve this, you need root access (or sudo) and need to edit /etc/init.d/jira to add the following lines immediately after the #!/bin/bash line

### BEGIN INIT INFO
# Provides: jira
# Required-Start: $network $local_fs $syslog
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: JIRA Server
# Description: JIRA Server
### END INIT INFO

Once this is done, run systemctl enable jira as root or with sudo.

This will get the stock init script that ships with Jira to properly start the service when the system boots.

0

I've been having the same problem with my own java process and I found this today: https://github.com/hectcastro/chef-statsd/issues/10

It's possible your issue is the same. Inside my startup script I was using sudo to launch my java process but if the line "Defaults requiretty" is uncommented in /etc/sudoers then sudo isn't allowed on boot. I tested the theory by commenting out that line and doing a reboot and sure enough my process started. I'm now using "daemon --user=myuser myapp" to launch my app instead. Hope that helps.

1
  • Welcome to AskUbuntu! When referring to external pages, it's good practice to include or summarize the key information from that post in case the page disappers in the future.
    – chaskes
    May 21, 2013 at 16:10
0

In the end, this solved the problem: https://confluence.atlassian.com/display/JIRA/Starting+JIRA+Automatically+on+Linux?focusedCommentId=214865540#comment-214865540

1
  • Please add more info of the steps you used form the link, not only a link. This site is supposed to have completed answers not links to completed answers (witch are a good extra for an answer).
    – PhoneixS
    Jun 4, 2013 at 9:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .