Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

How do I Start/Stop Jira? I'm on Amazon Linux 2 and having no success

Edited

I've tried a few ways to start/stop jira and neither are working. For starters, here's my UD script that initially installs and starts Jira


echo "===== Downloading Jira ====="

cat <<\EOF >> ~/jira.varfile
app.confHome=/var/atlassian/application-data/jira
app.install.service$Boolean=false
portChoice=custom
httpPort$Long=8080
rmiPort$Long=8443
launch.application$Boolean=false
sys.adminRights$Boolean=true
sys.confirmedUpdateInstallationString=false
sys.installationDir=/opt/atlassian/jira
sys.languageId=en
EOF

echo "done"
echo "===== Modify Jira Permissions ====="
chmod +x ~/jira.bin
echo "===== Start Jira Install ====="
sudo ~/jira.bin -q -varfile ~/jira.varfile
sudo /opt/atlassian/jira/bin/startup.sh
echo "===== Cleaning up Jira Files ====="
rm -f ~/jira.bin
rm -f ~/jira.varfile
chmod 750 /opt/atlassian/jira/logs/

I tried a few things to manually stop Jira from the terminal:
1. sudo /opt/atlassian/jira/bin/stop-jira.sh
which returned:

executing using dedicated user

`sMMMMMMMMMMMMMM+
MMMMMMMMMMMMMM
:sdMMMMMMMMMMM
MMMMMM
`sMMMMMMMMMMMMMM+ MMMMMM
MMMMMMMMMMMMMM +MMMMM
:sMMMMMMMMMMM MMMMM
MMMMMM `UOJ
`sMMMMMMMMMMMMM+ MMMMMM
MMMMMMMMMMMMMM +MMMMM
:sdMMMMMMMMMM MMMMM
MMMMMM `UOJ
MMMMMM
+MMMMM
MMMMM
`UOJ

Atlassian Jira
Version : 8.19.1


If you encounter issues starting or stopping Jira, please see the Troubleshooting guide at https://docs.atlassian.com/jira/jadm-docs-0819/Troubleshooting+installation


Server startup logs are located in /opt/atlassian/jira/logs/catalina.out
Using CATALINA_BASE: /opt/atlassian/jira
Using CATALINA_HOME: /opt/atlassian/jira
Using CATALINA_TMPDIR: /opt/atlassian/jira/temp
Using JRE_HOME: /opt/atlassian/jira/jre/
Using CLASSPATH: /opt/atlassian/jira/bin/bootstrap.jar:/opt/atlassian/jira/bin/tomcat-juli.jar
Using CATALINA_OPTS:
Using CATALINA_PID: /opt/atlassian/jira/work/catalina.pid
cat: /opt/atlassian/jira/work/catalina.pid: Permission denied
PID file found but either no matching process was found or the current user does not have permission to stop the process. Stop aborted.


 

2. I tried to switch user to Jira and run the same command, but now it's asking me for a password? 

[sudo] password for jira:

 

I don't have a password set, so I tried no password and it didn't work.

 

3. I tried the standard systemctl stop jira and got:

 Failed to start jira.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files

 

What else can I do to get Jira to stop/start from the terminal?

1 answer

1 accepted

3 votes
Answer accepted
Tim Perrault
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.
Oct 27, 2022

Hi @MP32 

 

It sounds like you have sudo privileges, so to get around the password issue run sudo -i this will switch you to root, then just su jirauser. 

I would definitely go through the logs as it looks like a permission issue on the filesystem.

https://confluence.atlassian.com/jirakb/how-to-fix-directory-permissions-in-linux-for-jira-server-829048437.html 

I followed the steps for option 2 in that doc and I'm still running into the same error after I changed the file permissions. This error is the one that keeps showing up after permissions got changed and I tried running as root and Jira user:

PID file found but either no matching process was found or the current user does not have permission to stop the process. Stop aborted.

 

I looked at the logs and towards the bottom it says this, not sure if any of this is relevant or not

user.country : US
user.dir : /
user.home : /root
user.language : en
user.name : root
user.timezone : UTC

Tim Perrault
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.
Oct 27, 2022

it looks like Jira is running as root. run the top command to find the PID of Jira. You can then just kill the process. Once the process is killed then switch to the jira user and start the process again.

I tried doing killall -9 jira and it said that there's no process named jira. I ran ps aux | grep jira to try to find the PID and this was the output:


root 3637 0.2 13.2 5031304 531924 ? Sl Oct27 0:57 /opt/atlassian/jira/jre//bin/java -Djava.util.logging.config.file=/opt/atlassian/jira/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xms384m -Xmx2048m -XX:InitialCodeCacheSize=32m -XX:ReservedCodeCacheSize=512m -Djava.awt.headless=true -Datlassian.standalone=JIRA -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dmail.mime.decodeparameters=true -Dorg.dom4j.factory=com.atlassian.core.xml.InterningDocumentFactory -XX:-OmitStackTraceInFastThrow -Djava.locale.providers=COMPAT -Djdk.tls.ephemeralDHKeySize=2048-Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Xlog:gc*:file=/opt/atlassian/jira/logs/atlassian-jira-gc-%t.log:tags,time,uptime,level:filecount=5,filesize=20M -XX:+ExplicitGCInvokesConcurrent -Dignore.endorsed.dirs= -classpath /opt/atlassian/jira/bin/bootstrap.jar:/opt/atlassian/jira/bin/tomcat-juli.jar -Dcatalina.base=/opt/atlassian/jira -Dcatalina.home=/opt/atlassian/jira -Djava.io.tmpdir=/opt/atlassian/jira/temp org.apache.catalina.startup.Bootstrap start
root 3676 0.0 0.1 193160 6900 ? Ssl Oct27 0:01 /usr/bin/stunnel5 /var/run/efs/stunnel-config.fs-05869e2bcc0fa812b.var.atlassian.application-data.jira.20620
root 24058 0.0 0.1 192440 4312 pts/2 S 02:42 0:00 su jira
jira 24059 0.0 0.0 126736 3992 pts/2 S+ 02:42 0:00 bash
root 24212 0.0 0.1 241656 7180 pts/3 S+ 02:43 0:00 sudo vim /opt/atlassian/jira/logs/catalina.out
root 24213 0.0 0.2 150328 9360 pts/3 Sl+ 02:43 0:00 vim /opt/atlassian/jira/logs/catalina.out
root 25771 0.0 0.0 121280 972 pts/0 S+ 03:06 0:00 grep --color=auto jira

 

How else can I find the PID? The columns aren't named, but I tried a ton of the different numbers and it said "no such process" when trying to kill it

Tim Perrault
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.
Oct 27, 2022

looks like the PID is 3637. run kill -9 3637

Like MP32 likes this

You're a life-saver, appreciate it

Like Tim Perrault likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events