I've installed JIRA and everything was smooth. enabled automatic start and hence the install of the JIRA startup script in /etc/init.d
But it seems when it runs it fails. when I manually start JIRA using catalina.sh it works fine - JIRA starts up and I can access the web console.
I tried to manually execute start/stop (service JIRA stop, service JIRA start) and I get below error.
root@vindika-lubantu:~# service jira start
To run JIRA in the foreground, start the server with start-jira.sh -fg
executing using dedicated user: jira
./catalina.sh: 1: cd: can't cd to ./..
Cannot find /opt/atlassian/jira/bin/bin/setclasspath.sh
This file is needed to run this program
Now here I'm not sure why catalina.sh is looking for this 'bin/bin' path. maybe CATALINA_BASE is not set properly. I'm a bit loss here as I'm new to JIRA. Can someone please help?
PS: I'm running JIRA on a VM and I also have Confluence installed in the same VM.
catalina.sh assumes that you are in the bin directory when you run it, but the init.d script is running with root as the current directory. You need to either set CATALINA_HOME or cd into the bin directory before running the script. Safest/easiest is to create your own wrapper script in init.d rather than trying to use catalina.sh there directly. It might look something like:
#!/bin/sh -e cd "/opt/atlassian/jira/bin" exec ./start-jira.sh "$@"
Edit: Originally said to run
catalina.sh, but as that skips the
su command that switches to the dedicated JIRA user, that has security concerns. The
start-jira.sh script is the correct one to use.
init.d scripts run as root on most systems. Running as root is, of course, not recommended. start-jira.sh takes care of changing to the appropriate user before running catalina.sh, and my answer really ought to instruct you to run that instead of running catalina.sh directly. If the "jira" user did not have access to these directories, then the "cd" that it tries to do while looking for where JIRA has been installed would probably fail, after which point it would just be confused. Changing the directories to the jira user and running start-jira.sh is probably a better answer.
@Vindika Dissanayake: The correct way to run the installer is documented here: https://confluence.atlassian.com/display/JIRA/Installing+JIRA+on+Linux#InstallingJIRAonLinux-1.DownloadandInstalltheJIRA'LinuxInstaller'; You may run this as root. It will guide you through creating a user especially for JIRA's use so that it will not be running as root when it starts, but root's privileges are needed to create that user, so it is actually recommended that you use root for the actual installation.
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot