It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

conflunce does not always start on reboot start with init.d on AWS Linux

I am running confluence proxied by httpd. 

Sometimes, on reboot, the httpd starts properly but the confluence tomcat not. There is even no entry in the catalina log. So, the entire init.d confluence batch fails. Manual start or reboot always works.

How to find out why the init.d's confluence start bash script is failing?

1 answer

0 votes
Alexis_Robert Community Leader Apr 21, 2018

Hi, 

 

can you check if you have any output from your startup script with "journalctl -xe" ? It should give you some hints on why the script fails.

 

Cheers, 

 

--Alexis

HI:

thanks for your thoughts!!!

There is no "journalctl" in AWS Linux. I have checked the messages and all other logs in the /var/logs but no entry for the failed reboot init.d's start.

When I started Confluence manually, there was only a message that there is an existing lock file which is to be deleted. 

Alexis_Robert Community Leader Apr 22, 2018

Hello, 

 

what AMI are you using ? I have checked on the "Amazon Linux 2" and have done the following to enable a startup script:

sudo /sbin/chkconfig --add MyService
sudo /sbin/chkconfig mysqld on

Then you can check that you service is properly configured:

sudo /sbin/chkconfig --list MyService 

 

Let me know if it works,

 

--Alexis 

HI:

thanks so much for your help!!!

I have pre-AWS Linux 2, it's https://aws.amazon.com/amazon-linux-ami/2017.09-release-notes/.

The output of sudo /sbin/chkconfig --list is below -- there is no confluence, unless i am mistaken??? I have used the official confluence installer and have made no further changes - it does not create a service??

 

acpid 0:off 1:off 2:on 3:on 4:on 5:on 6:off
apache2 0:off 1:off 2:off 3:on 4:off 5:off 6:off
atd 0:off 1:off 2:off 3:on 4:on 5:on 6:off
auditd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
blk-availability 0:off 1:on 2:on 3:on 4:on 5:on 6:off
cgconfig 0:off 1:off 2:off 3:off 4:off 5:off 6:off
cgred 0:off 1:off 2:off 3:off 4:off 5:off 6:off
cloud-config 0:off 1:off 2:on 3:on 4:on 5:on 6:off
cloud-final 0:off 1:off 2:on 3:on 4:on 5:on 6:off
cloud-init 0:off 1:off 2:on 3:on 4:on 5:on 6:off
cloud-init-local 0:off 1:off 2:on 3:on 4:on 5:on 6:off
crond 0:off 1:off 2:on 3:on 4:on 5:on 6:off
hibagent 0:off 1:off 2:off 3:off 4:off 5:off 6:off
ip6tables 0:off 1:off 2:on 3:on 4:on 5:on 6:off
iptables 0:off 1:off 2:on 3:on 4:on 5:on 6:off
irqbalance 0:off 1:off 2:on 3:on 4:on 5:on 6:off
kdump 0:off 1:off 2:off 3:on 4:on 5:on 6:off
lvm2-lvmetad 0:off 1:on 2:on 3:on 4:on 5:on 6:off
lvm2-lvmpolld 0:off 1:on 2:on 3:on 4:on 5:on 6:off
lvm2-monitor 0:off 1:on 2:on 3:on 4:on 5:on 6:off
mdmonitor 0:off 1:off 2:on 3:on 4:on 5:on 6:off
messagebus 0:off 1:off 2:on 3:on 4:on 5:on 6:off
netconsole 0:off 1:off 2:off 3:off 4:off 5:off 6:off
netfs 0:off 1:off 2:off 3:on 4:on 5:on 6:off
network 0:off 1:off 2:on 3:on 4:on 5:on 6:off
nfs 0:off 1:off 2:off 3:off 4:off 5:off 6:off
nfslock 0:off 1:off 2:off 3:on 4:on 5:on 6:off
ntpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
ntpdate 0:off 1:off 2:off 3:off 4:off 5:off 6:off
psacct 0:off 1:off 2:off 3:off 4:off 5:off 6:off
quota_nld 0:off 1:off 2:off 3:off 4:off 5:off 6:off
rdisc 0:off 1:off 2:off 3:off 4:off 5:off 6:off
rngd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
rpcbind 0:off 1:off 2:on 3:on 4:on 5:on 6:off
rpcgssd 0:off 1:off 2:off 3:on 4:on 5:on 6:off
rpcsvcgssd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
rsyslog 0:off 1:off 2:on 3:on 4:on 5:on 6:off
saslauthd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
sendmail 0:off 1:off 2:on 3:on 4:on 5:on 6:off
sshd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
svnserve 0:off 1:off 2:off 3:off 4:off 5:off 6:off
udev-post 0:off 1:on 2:on 3:on 4:on 5:on 6:off
Alexis_Robert Community Leader Apr 22, 2018

Hi, 

 

can you check if you have a confluence script in /etc/init.d ? Otherwise, follow step 5 from this guide to create it: https://confluence.atlassian.com/doc/start-confluence-automatically-on-linux-183148.html

And then you can simply go back to my previous post to add the service on startup. 

 

Cheers,

 

—Alexis

HI:

THANK YOU. 

The default script is there - /etc/init.d/confluence.sh. I cannot manually install it with chkconfig since "service confluence does not support chkconfig".

I assume I can replace the script with the one from https://confluence.atlassian.com/doc/start-confluence-automatically-on-linux-183148.html

However, I am confused:

1. The docs link above recommends adding the confluence to run as a service via chkconfig - why does not the default installer do it? and why does the default installer create a script which does not support chkconfig? 

2.  If I do manually, would the update script fail? Before updating Confluence, I would have to manually uninstall the service and revert to the default script?

3. How does it run now? Why does it usually work and sometimes not? What is the most likely explanation? Is chkconfig started service more robust than no-chkconfig service? What's the difference?

Actually, the identical situation is with JIRA - there is no chkconfig entry for JIRA either but it does always start.

The present script is 

 

[root@init.d]# cat confluence
#!/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
./start-confluence.sh
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac

Hello @Alexis_Robert I have the same problem.

I have an AWS instance with a Confluence DataCenter installed and it does not start everyday on machine startup.

I tried to load it up manually but only got "service confluence does not support chkconfig" and i don't know what could be happening.

Can you help us?

Regards.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Confluence

How is your team having fun and bonding, remotely, utilizing Confluence?

Thanks everyone for answering last week’s question. The winner of the random drawing from those who commented is: @LarryBrock I’ll contact you separately with your prize details. This wee...

269 views 9 6
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you