-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
None
-
Affects Version/s: all
-
Component/s: Documentation - All
-
None
-
2
-
Severity 2 - Major
-
0
Summary
Update Run Confluence as a systemd service on linux. According to internal cases, customers have been facing issues to install Confluence as systemd service, and the workaround provided by Greg at https://jira.atlassian.com/browse/CONFSERVER-54291 has been resolving issues with.
1) Shutdown Confluence. Remove remnants of existing init.d confluence service (just in case, backup these files first)
sudo rm /etc/init.d/confluence sudo rm /etc/rc0.d/K01confluence sudo rm /etc/rc1.d/K01confluence sudo rm /etc/rc2.d/S01confluence sudo rm /etc/rc3.d/S01confluence sudo rm /etc/rc4.d/S01confluence sudo rm /etc/rc5.d/S01confluence sudo rm /etc/rc6.d/K01confluence
Check if following file exists and if required remove it
sudo rm /run/systemd/generator.late/confluence.service
2) create a systemd unit file:
sudo vi /etc/systemd/system/confluence.service
add following entries to the file:
[Unit] Description=Confluence After=network.target [Service] Type=forking User=confluence PIDFile=/opt/atlassian/confluence/work/catalina.pid ExecStart=/opt/atlassian/confluence/bin/start-confluence.sh ExecStop=/opt/atlassian/confluence/bin/stop-confluence.sh [Install] WantedBy=multi-user.target
edit paths to Confluence directory (by default "/opt/atlassian/confluence") and user which is used for starting confluence (default "confluence")
3) save and exit
Reload the daemon and enable the newly created service:
sudo systemctl daemon-reload sudo systemctl enable confluence sudo systemctl start confluence
then test if service started without issues:
sudo systemctl status confluence