CentOS: Init scripts failing to start for some unknown reason
I think I may have solved it.
For some reason the init scripts weren't being copied to /etc/rc.d/init.d ! I've made symlinks there, and now chkconfig is picking them up, and most of them are now starting on boot..
I am a user of CentOS 6.5
and Jetty 9.1.0.v20131115
. I ran into the same symptoms that you are describing.
I was able to fix my issue by updating jetty.sh
, respectively /etc/init.d/jetty
, respectively /etc/rc.d/init.d/jetty
.
In this script, in the NAME
definition, change +
to *
, i.e. changeNAME=$(echo $(basename $0) | sed -e 's/^[SK][0-9]+//' -e 's/\.sh$//')
toNAME=$(echo $(basename $0) | sed -e 's/^[SK][0-9]*//' -e 's/\.sh$//')
The jetty.sh
script used to have a chkconfig
-related bug. This bug got fixed in a commit.
Background: In the buggy version, the NAME
environment variable gets set to jetty99
, 99 coming from a chkconfig
configuration.
The script is usually named jetty
, therefore the buggy version will look for a configuration file named /etc/default/jetty99
instead of the correct /etc/default/jetty
.