Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JIRA server cannot start

wissentek-palmary March 19, 2019

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

0 votes
wissentek-palmary March 21, 2019

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!

0 votes
brbojorque
Community Champion
March 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 
wissentek-palmary March 21, 2019

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 Champion
March 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.

wissentek-palmary March 21, 2019

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 Champion
March 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.

0 votes
Daniel
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 19, 2019
wissentek-palmary March 19, 2019

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

Michał Rybiński March 20, 2019

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.

wissentek-palmary March 21, 2019

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!

Michał Rybiński March 22, 2019

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events