Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-26212

start-jira.sh doesn't set the shell for su(1)

    XMLWordPrintable

Details

    • 4.04
    • Severity 3 - Minor
    • Hide
      Atlassian Update – 04 December 2017

      Hi everyone,

      We have recently reviewed this issue and the overall interest in the problem. As the issue hasn't collect votes, watchers, comments, or support cases from many customers during its lifetime, it's very low on our priority list, and will not be fixed in the foreseeable future. That's why we've decided to resolve it as Time Out.

      Although we're aware the issue is still important to those of you who were involved in the conversations around it, we want to be clear in managing your expectations. The Jira team is focusing on issues that have broad impact and high value, reflected by the number of comments, votes, support cases, and customers interested. Please consult the Atlassian Bugfix Policy for more details.

      We understand how disappointing this decision may be, but we hope you'll appreciate our transparent approach and communication.

      Atlassian will continue to watch this issue for further updates, so please feel free to share your thoughts in the comments.

      Thank you,
      Ignat Alexeyenko
      Jira Bugmaster

      Show
      Atlassian Update – 04 December 2017 Hi everyone, We have recently reviewed this issue and the overall interest in the problem. As the issue hasn't collect votes, watchers, comments, or support cases from many customers during its lifetime, it's very low on our priority list, and will not be fixed in the foreseeable future. That's why we've decided to resolve it as Time Out . Although we're aware the issue is still important to those of you who were involved in the conversations around it, we want to be clear in managing your expectations. The Jira team is focusing on issues that have broad impact and high value, reflected by the number of comments, votes, support cases, and customers interested. Please consult the Atlassian Bugfix Policy for more details. We understand how disappointing this decision may be, but we hope you'll appreciate our transparent approach and communication. Atlassian will continue to watch this issue for further updates, so please feel free to share your thoughts in the comments. Thank you, Ignat Alexeyenko Jira Bugmaster

    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:

      1. Install JIRA 4.4 on an Ubuntu box.
      2. Reboot, or shut down JIRA.
      3. 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).

      Attachments

        Activity

          People

            Unassigned Unassigned
            106d2092c966 Owen Jacobson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: