Details
-
Bug
-
Resolution: Timed out
-
Low
-
None
-
4.4
-
Ubuntu 11.04
-
4.04
-
Severity 3 - Minor
-
-
Description
On some OSes, the user created by JIRA's installer has the shell /bin/false. This causes start-jira.sh to fail if it can't inherit $SHELL.
STR:
- Install JIRA 4.4 on an Ubuntu box.
- Reboot, or shut down JIRA.
- Use sudo service jira start to attempt to start JIRA.
Expected outcome: JIRA starts.
Actual outcome: output from the JIRA init script stops after
To run JIRA in the foreground, start the server with start-jira.sh -fg Server startup logs are located in /opt/atlassian/jira/bin/logs/catalina.out executing using dedicated user: jira
and JIRA does not start.
Root cause:
start-jira.sh contains the following stanza:
if [ -x "/sbin/runuser" ]; then sucmd="/sbin/runuser" else sucmd="su" fi if [ "$PRGRUNMODE" == "true" ] ; then $sucmd -m $JIRA_USER -c "$PRGDIR/catalina.sh run $@" else $sucmd -m $JIRA_USER -c "$PRGDIR/startup.sh $@" fi
Unfortunately, the service wrapper on some OSes (including Ubuntu) clears the SHELL environment variable, causing su to look up the shell in /etc/passwd – where it's /bin/false. startup.sh never runs.
Workaround:
Manually start JIRA each boot using /etc/init.d/jira start (not service jira start).