Jira not starting with the command service jira start

Fahad V A April 3, 2014

Hi,

When tries to start / stop Jira with command service jira start / service jira stop I am getting the below error

To run JIRA in the foreground, start the server with start-jira.sh -fg
executing using dedicated user: jira2
./startup.sh: line 62: /opt/atlassian/jira/bin/catalina.sh: Permission denied
./startup.sh: line 62: exec: /opt/atlassian/jira/bin/catalina.sh: cannot execute: Permission denied

When start Jira with the command sh /opt/atlassian/jira/bin/startup.sh Jira is starting and working fine.

I tried chmod 777 for the installation and home directory of Jira and still nothing happends. :(

I have unistalled and re-installed jira nore than once and i suspect this might be reason but i dont know how to resolve it.

Plese Help.. Thanks in Advance..


5 answers

1 accepted

6 votes
Answer accepted
Andris Grinbergs
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.
April 3, 2014

please check if owner for all jira files (including subdirectories) is jira2

Andris Grinbergs
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.
April 3, 2014

Please post output of


ls -la /opt/atlassian/jira/bin

command.

Like # people like this
Andris Grinbergs
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.
April 3, 2014

As you can see owner of these files is"root".

Please execute as root:

chown jira2 -R /opt/atlassian/jira

and same for jira home if it is not located in /opt/atlassian/jira

Fahad V A April 3, 2014

Hi Andris,

PFB output of the command..

drwxr-xr-x 4 root root 4096 Feb 26 11:23 .
drwxrwxrwx 15 root root 4096 Feb 25 06:16 ..
drwxr-xr-x 2 root root 4096 Jan 26 05:31 apr
drwxr-xr-x 2 root root 4096 Jan 27 11:49 attachments
-rw-r--r-- 1 root root 28548 Nov 22 2012 bootstrap.jar
-rw-r--r-- 1 root root 13217 Nov 22 2012 catalina.bat
-rwxr-xr-x 1 root root 19189 Nov 22 2012 catalina.sh
-rw-r--r-- 1 root root 2168 Nov 22 2012 catalina-tasks.xml
-rw-r--r-- 1 root root 24242 Nov 22 2012 commons-daemon.jar
-rw-r--r-- 1 root root 202519 Nov 22 2012 commons-daemon-native.tar.gz
-rw-r--r-- 1 root root 990 Nov 22 2012 config.bat
-rwxr-xr-x 1 root root 1105 Nov 22 2012 config.sh
-rw-r--r-- 1 root root 2131 Nov 22 2012 configtest.bat
-rwxr-xr-x 1 root root 1982 Nov 22 2012 configtest.sh
-rw-r--r-- 1 root root 1342 Nov 22 2012 cpappend.bat
-rwxr-xr-x 1 root root 7492 Nov 22 2012 daemon.sh
-rw-r--r-- 1 root root 2178 Nov 22 2012 digest.bat
-rwxr-xr-x 1 root root 2021 Nov 22 2012 digest.sh
-rwxr-xr-x 1 root root 1496 Nov 22 2012 install_linux_service.sh
-rw-r--r-- 1 root root 538 Nov 22 2012 jirabanner.txt
-rw-r--r-- 1 root root 581 Nov 22 2012 permgen.bat
-rw-r--r-- 1 root root 585 Nov 22 2012 permgenservice.bat
-rwxr-xr-x 1 root root 1640 Jan 26 05:31 permgen.sh
-rw-r--r-- 1 root root 6608 Nov 22 2012 service.bat
-rw-r--r-- 1 root root 3264 Nov 22 2012 setclasspath.bat
-rwxr-xr-x 1 root root 3403 Nov 22 2012 setclasspath.sh
-rw-r--r-- 1 root root 4304 Nov 22 2012 setenv.bat
-rwxr-xr-x 1 root root 4006 Feb 25 14:30 setenv.sh
-rwxr-xr-x 1 root root 1927 Nov 22 2012 setup_user.sh
-rw-r--r-- 1 root root 2111 Nov 22 2012 shutdown.bat
-rwxr-xr-x 1 root root 1960 Nov 22 2012 shutdown.sh
-rw-r--r-- 1 root root 487 Nov 22 2012 start-jira.bat
-rwxr-xr-x 1 root root 1257 Nov 22 2012 start-jira.sh
-rw-r--r-- 1 root root 2112 Nov 22 2012 startup.bat
-rwxr-xr-x 1 root root 1961 Nov 22 2012 startup.sh
-rw-r--r-- 1 root root 85 Nov 22 2012 stop-jira.bat
-rwxr-xr-x 1 root root 854 Nov 22 2012 stop-jira.sh
-rw-r--r-- 1 root root 77312 Nov 22 2012 tomcat7.exe
-rw-r--r-- 1 root root 99840 Nov 22 2012 tomcat7.exe.x64
-rw-r--r-- 1 root root 103424 Nov 22 2012 tomcat7w.exe
-rw-r--r-- 1 root root 38129 Nov 22 2012 tomcat-juli.jar
-rw-r--r-- 1 root root 261742 Nov 22 2012 tomcat-native.tar.gz
-rw-r--r-- 1 root root 4114 Nov 22 2012 tool-wrapper.bat
-rwxr-xr-x 1 root root 5086 Nov 22 2012 tool-wrapper.sh
-rwxr-xr-x 1 root root 142 Jan 26 05:31 user.sh
-rw-r--r-- 1 root root 2116 Nov 22 2012 version.bat
-rwxr-xr-x 1 root root 1965 Nov 22 2012 version.sh

1 vote
Andris Grinbergs
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.
April 3, 2014

Probably user jira2 don't have permission to higher folders, try as root:

chmod 755 /opt

chmod 755 /opt/atlassian

chmod 755 /opt/atlassian/jira

Try starting jira with this command (from root):
su - jira2 -c "/opt/atlassian/jira/bin/start-jira.sh"

...to ensure jira2 user can start jira.

Deleted user March 3, 2021

Hello Andris 

I had performed all above mentioned steps 

at final running su - <user> -c "/data/conflunence/app/bin/start-confluence.sh" 

I got below error:

-bash: /data/conflunence/app/bin/start-confluence.sh permission denied.

chown and chmod i did for all folders including home dir and installation dir.

Any one can help me

Thanks in advance

Regards,

Junaid

0 votes
Andris Grinbergs
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.
April 4, 2014
Great. :) You should probably mark this question as answered.
Lance Wilson June 29, 2020

Hey Andris, I know this is old but if there’s a conflict with Catalina.pid, does that mean I have to delete it?

Andris Grinbergs
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.
June 30, 2020

Not sure what do you mean with conflict.

If other jira instance is running(locking catalina.pid), don't delete it - stop previous instance before.

If no other instance is running but catalina.pid is there, check permissions on pid file - for example probably "jira" OS user can't delete catalina.pid created earlier by "root" user.

If you are 100% sure there are no other jira instance running on server (no java process) you can delete pid file manualy, however usually jira does it itself.

Lance Wilson June 30, 2020

ok, the truth is, i'm having issues running  the stop/startup.sh commands from the root and dedicated user.
I get that same permission denied  error message and the process is aborted. I tried the above method, but it looks like it may be a permissions issue. I would hate to have to ask someone on my team to grant me permissions, so i was hoping the chmod commands would have fixed my issue.

0 votes
Fahad V A April 3, 2014

Hi Andris,

Thanks a lot.. This really helped me.. :)

0 votes
Fahad V A April 3, 2014

I tried it.. but the same error.. :(

PFB theoutput of the command ls -la /opt/atlassian/jira/bin after the change

drwxr-xr-x 4 jira2 root 4096 Feb 26 11:23 .
drwxrwxrwx 15 jira2 root 4096 Feb 25 06:16 ..
drwxr-xr-x 2 jira2 root 4096 Jan 26 05:31 apr
drwxr-xr-x 2 jira2 root 4096 Jan 27 11:49 attachments
-rw-r--r-- 1 jira2 root 28548 Nov 22 2012 bootstrap.jar
-rw-r--r-- 1 jira2 root 13217 Nov 22 2012 catalina.bat
-rwxr-xr-x 1 jira2 root 19189 Nov 22 2012 catalina.sh
-rw-r--r-- 1 jira2 root 2168 Nov 22 2012 catalina-tasks.xml
-rw-r--r-- 1 jira2 root 24242 Nov 22 2012 commons-daemon.jar
-rw-r--r-- 1 jira2 root 202519 Nov 22 2012 commons-daemon-native.tar.gz
-rw-r--r-- 1 jira2 root 990 Nov 22 2012 config.bat
-rwxr-xr-x 1 jira2 root 1105 Nov 22 2012 config.sh
-rw-r--r-- 1 jira2 root 2131 Nov 22 2012 configtest.bat
-rwxr-xr-x 1 jira2 root 1982 Nov 22 2012 configtest.sh
-rw-r--r-- 1 jira2 root 1342 Nov 22 2012 cpappend.bat
-rwxr-xr-x 1 jira2 root 7492 Nov 22 2012 daemon.sh
-rw-r--r-- 1 jira2 root 2178 Nov 22 2012 digest.bat
-rwxr-xr-x 1 jira2 root 2021 Nov 22 2012 digest.sh
-rwxr-xr-x 1 jira2 root 1496 Nov 22 2012 install_linux_service.sh
-rw-r--r-- 1 jira2 root 538 Nov 22 2012 jirabanner.txt
-rw-r--r-- 1 jira2 root 581 Nov 22 2012 permgen.bat
-rw-r--r-- 1 jira2 root 585 Nov 22 2012 permgenservice.bat
-rwxr-xr-x 1 jira2 root 1640 Jan 26 05:31 permgen.sh
-rw-r--r-- 1 jira2 root 6608 Nov 22 2012 service.bat
-rw-r--r-- 1 jira2 root 3264 Nov 22 2012 setclasspath.bat
-rwxr-xr-x 1 jira2 root 3403 Nov 22 2012 setclasspath.sh
-rw-r--r-- 1 jira2 root 4304 Nov 22 2012 setenv.bat
-rwxr-xr-x 1 jira2 root 4006 Feb 25 14:30 setenv.sh
-rwxr-xr-x 1 jira2 root 1927 Nov 22 2012 setup_user.sh
-rw-r--r-- 1 jira2 root 2111 Nov 22 2012 shutdown.bat
-rwxr-xr-x 1 jira2 root 1960 Nov 22 2012 shutdown.sh
-rw-r--r-- 1 jira2 root 487 Nov 22 2012 start-jira.bat
-rwxr-xr-x 1 jira2 root 1257 Nov 22 2012 start-jira.sh
-rw-r--r-- 1 jira2 root 2112 Nov 22 2012 startup.bat
-rwxr-xr-x 1 jira2 root 1961 Nov 22 2012 startup.sh
-rw-r--r-- 1 jira2 root 85 Nov 22 2012 stop-jira.bat
-rwxr-xr-x 1 jira2 root 854 Nov 22 2012 stop-jira.sh
-rw-r--r-- 1 jira2 root 77312 Nov 22 2012 tomcat7.exe
-rw-r--r-- 1 jira2 root 99840 Nov 22 2012 tomcat7.exe.x64
-rw-r--r-- 1 jira2 root 103424 Nov 22 2012 tomcat7w.exe
-rw-r--r-- 1 jira2 root 38129 Nov 22 2012 tomcat-juli.jar
-rw-r--r-- 1 jira2 root 261742 Nov 22 2012 tomcat-native.tar.gz
-rw-r--r-- 1 jira2 root 4114 Nov 22 2012 tool-wrapper.bat
-rwxr-xr-x 1 jira2 root 5086 Nov 22 2012 tool-wrapper.sh
-rwxr-xr-x 1 jira2 root 142 Jan 26 05:31 user.sh
-rw-r--r-- 1 jira2 root 2116 Nov 22 2012 version.bat
-rwxr-xr-x 1 jira2 root 1965 Nov 22 2012 version.sh

Suggest an answer

Log in or Sign up to answer