catalina.pid file not created

Jeff Shepherd May 4, 2022

When I start Jira as the `jira` user using the command 

/opt/atlassian/jira-software/current/bin/start-jira.sh

the `/opt/atlassian/jira-software/current/work/catalina.pid` file is created as expected.

When started as a system service using 

sudo systemctl start jira-software

the `catalina.pid` file is not created.

In my `/opt/atlassian/jira-software/current/bin/setenv.sh` I have not modified anything below the 'don't make changes below here' line and it contains the standard 

# set the location of the pid file
if [ -z "$CATALINA_PID" ] ; then
if [ -n "$CATALINA_BASE" ] ; then
CATALINA_PID="$CATALINA_BASE"/work/catalina.pid
elif [ -n "$CATALINA_HOME" ] ; then
CATALINA_PID="$CATALINA_HOME"/work/catalina.pid
fi
fi
export CATALINA_PID

My `/etc/bashrc` sets `export CATALINA_BASE=/opt/atlassian/jira-software/current` though my CATALINA_HOME is undefined.

Jira is normally started at power-up as a system service/

My version of Jira is 8.13.13 and I am using the dc-deployments-automation Ansible scripts from https://bitbucket.org/atlassian/dc-deployments-automation/

1 answer

1 accepted

0 votes
Answer accepted
Jeff Shepherd July 7, 2022

In /usr/lib/systemd/system/jira-software.service the line to start Jira is as follows:

```

ExecStart=/opt/atlassian/jira-software/current/bin/start-jira.sh -fg >/opt/atlassian/jira-software/current/logs/catalina.out 2>&1

```

The `-fg` option prevents the catalina.pid file from being created.

(Note that when running from the command line I was just using `/opt/atlassian/jira-software/current/bin/start-jira.sh`)

Suggest an answer

Log in or Sign up to answer