how I can stop (and restart) the confluence (tomcat?) from command line on Linux?
Hi Calogero
Simply go to you confluence installation directory, find the bin directory and there you'll find several .sh scripts. Simply execute ./stop-confluence.sh or ./shutdown.sh
you can use ps -af | grep confluence to see if the process has actually been gracefully shut down.
If this didn't happen after a few minutes you can kill the process by noting down the process id you can find using the above ps command and execute kill <processid>, be aware that this will not gracefully shut down your instance.
Best regards,
Peter
Manually:
Don't use the shutdown.sh script. It is old.
Please use the stop-confluence.sh script. - it is newer (and i.m.o. much better)
Automaticly:
https://confluence.atlassian.com/display/DOC/Start+Confluence+Automatically+on+Linux
At the page's bottom you will find a VERY simple init script from Félix Martineau
Hi Calogero,
The following is the script mentioned by Peter Kramp on previous message:
#!/bin/bash # Confluence Linux service controller script cd "/opt/atlassian/confluence/bin" case "$1" in start) ./start-confluence.sh ;; stop) ./stop-confluence.sh ;; restart) ./stop-confluence.sh sleep 5 ./start-confluence.sh ;; status) PID=`ps aux | grep java | grep confluence | awk '{print $2}'` if test -z $PID then echo "Confluence is down..." else echo "Confluence is running... PID $PID" fi ;; *) echo "Usage: $0 {start|stop|restart|status}" exit 1 ;; esac
I would kindly ask you to create a file called "start-confluence.sh" and paste the above into it. Please, replace the following:
Please, make sure the "start-confluence.sh" file has executable rights. In order to acchieve that, please run the following command from the directory where the file is located:
chmod a+x start-confluence.sh
In order to run the file, please use the following commands under the directory where the same is located:
# start confluence ./start-confluence.sh start # stop confluence ./start-confluence.sh stop # restart confluence ./start-confluence.sh restart # confluence's status ./start-confluence.sh status
After running the command to stop, I would kindly ask you to run the command status to make sure Confluence is down. Please, notice that it might take a while to bring Confluence down, so be patience.
If even after a minute or so your Confluence instance continues on running, you can run the following command from your terminal:
# replace PID with "Confluence is running... PID $PID" given # e.g.: "Confluence is running... PID 1234" kill -9 1234
As Peter Van de Voorde has mentioned, this would be your last resource to stop Confluence.
Kind regards,Rafael
when I try to stop confluence I get this:
./stop-confluence.sh stopexecuting using dedicated userIf you encounter issues starting up Confluence, please see the Installation guide at http://confluence.atlassian.com/display/DOC/Confluence+Installation+Guide
Server startup logs are located in /project/confluence/logs/catalina.outUsing CATALINA_BASE: /project/confluenceUsing CATALINA_HOME: /project/confluenceUsing CATALINA_TMPDIR: /project/confluence/tempUsing JRE_HOME: /project/confluence/jre/Using CLASSPATH: /project/confluence/bin/bootstrap.jar:/project/confluence/bin/tomcat-juli.jarUsing CATALINA_PID: /project/confluence/work/catalina.pidPID file found but no matching process was found. Stop aborted.[root@ip-10-162-1-10 bin]#
It looks like you're new here. Sign in or register to get started.