Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

JIRA server cannot start

I installed  Jira 8.0 on Ubuntu server 18.04, after installation, all configuration is ok, and i can start Jira. Also I have choosen to install Jira as a serivce.

But after I reboot my ubuntu server, the Jira server will not start itself, I have to use command line to start Jira server manually.

How can I make Jira server starts automatically after ubuntu server starts?

Thanks a lot in advance!

3 answers

Hi Daniel, Thanks for your comments, but I cannot open this link.

Hi @wissentek-palmary 

Basically you need to add jira to OS startup. The link above has correct text link, but some GA parameters make it not work. Try to copy text itself if mine doesn't work:

https://confluence.atlassian.com/jirakb/starting-jira-automatically-on-linux-828796713.html

 

Right now it is possible also to run Jira under systemd if only someone
- prefers to
- wants current native mechanism for auto restart on server startup and on failure

I did it on my installation as well as I found some community thread about it: https://community.atlassian.com/t5/Jira-Software-questions/Installed-Jira-and-Confluence-as-a-service-but-they-don-t-start/qaq-p/792134

It's enough, after installing Jira, to perform following steps:

Stop Jira, if it's running.

First, create backup copy of legacy SysV script and make room for service unit definition (otherwise enabling autostart along with system startup may throw some errors):

EDIT: move file to .bak instead of copying it /EDIT

sudo mv /etc/init.d/jira /etc/init.d/jira.bak

Make sure you have jira (or any <jira-user>) as owner of JIRA_HOME and Jira installation folders (incl everything inside). If needed, run:

chown -R <jira-user>:<jira-user-group> <path-to-folder>

e.g.

chown -R jira:jira /var/atlassian/application-data/jira/

chown -R jira:jira /opt/atlassian/jira/

Create systemd service unit definition:

sudo vim /etc/systemd/system/jira.service

with following content:

[Unit] 
Description=Atlassian Jira
After=syslog.target network.target postgresql.service

[Service]
Type=forking
User=jira
PIDFile=/opt/atlassian/jira/work/catalina.pid
ExecStart=/opt/atlassian/jira/bin/start-jira.sh
ExecStop=/opt/atlassian/jira/bin/stop-jira.sh
Restart=on-failure
RestartSec=180

[Install]
WantedBy=multi-user.target

- make sure "After=" contains your database service - jira needs a db, doesn't it?
- Restart and RestartSec - I've added them to make sure systemd wll make attempt to re-start jira automatically on some failure every 3 minutes

After file is saved, run following commands:

sudo systemctl daemon-reload

to load jira.service into systemd and

sudo systemctl start jira.service

to start it.

Afterwards:

sudo systemctl enable jira.service

to make sure Jira starts along with OS start.

Tested on Ubuntu 18.04 Server.

Hi Michal:

 

Thank you very much, but I met problem and it did not work.

 

When I run sudo systemctl start jira.service, it failed to excute this.

 

Could you kindly give further comments? I am quite new on ubuntu and jira.

 

Thanks a lot in advance!

I forgot to add:

 

sudo cp /etc/init.d/jira /etc/init.d/jira.bak

possibly should be 

 

sudo cp /etc/init.d/jira /etc/init.d/jira.bak
sudo rm /etc/init.d/jira

 or simply

sudo mv /etc/init.d/jira /etc/init.d/jira.bak

 

tu put it in a very simplified statement: old SysV script is getting in the way. You want it to be not there whenever using systemd service unit definition, as the latter should replace former.

 

Could you please check it?

 

Also it helps whenever you can provide output with error after command is executed.

0 votes
brbojorque Community Leader Mar 20, 2019

Hi @wissentek-palmary ,

Ubuntu uses daemon to manage services, unfortunately in your case the service probably did not registered.

Try the following command in your system.

 

systemctl jira enable
systemctl jira start

or 

service enable jira
service start jira 

Hi Bryan:

 

Here is what I got from the console

 

==================================================

jirard@jirard: /opt/atlassian/jira/bin$ service jira enable

usage: /etc/init.d/jira {start|stop}

jirard@jirard: /opt/atlassian/jira/bin$ service start jira

Start: unrecognized service

===================================================

jirard@jirard: /etc/init.d$ systmctl enable jira

Unknown operation jira.

jirard@jirard: /etc/init.d$ systmctl jira start

Unknown operation jira.

==================================================

 

I am quite new on Ubuntu Server and JIRA, could you please kindly give further comments?

 

Thanks a lot in advance!

brbojorque Community Leader Mar 21, 2019

Hi @wissentek-palmary , 

Please retype the command below and let me know the result.

service jira
service jira status
service jira enable
service jira start
service jira restart
chkconfig jira on

Either of the above commands will fix your problem since the installer already installed the service. You just need to activate it to autostart when the server restarted.

Hi Bryan:

 

just first comment, when I try chkconfig jira on

system feedback is

chkconfig: command not found

 

is there anything wrong?

 

Thanks

brbojorque Community Leader Mar 21, 2019

Hi @wissentek-palmary , it is because chkconfig is not available in the system.

Have a test and restart the server and see if jira automatically starts up.

Hi all:

 

Thank you for all your comments. Now the problem solved.

I installed Ubuntu Server 16.04 LTS to instead of 18.04 LTS, then after Ubuntu Server reboot, Jira Server can start automatically.

My Jira Software version is 8.0.2

 

Great and start to work now!

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Jira Software

Presenting the "Best of 2020" Jira Software roundup!

Catch up with Atlassian Product Managers in our 2020 Demo Den round-up! From Advanced Roadmaps to Code in Jira to Next-Gen Workflows, check out the videos below to help up-level your work in the new ...

4,152 views 5 15
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you