puppet-server-2.7.19-1.el5
is installed from the puppetlabs repo.puppetmaster
is started successfull, but it doesn't create the pid file. It is the reason for [ FAILED ]
message when stopping:
/etc/init.d/puppetmaster stop
Stopping puppetmaster: [FAILED]
The init script: http://fpaste.org/nsfI/
The /etc/rc.d/init.d/functions
library: http://fpaste.org/ox5Q/
And this is what I get when running in the debug mode: http://fpaste.org/DkoS/
I know the way to echo
the pid to a file manually after starting, but why doesn't daemon
function's --pidfile
work?
daemon $PUPPETMASTER $PUPPETMASTER_OPTS --masterport=${PUPPETMASTER_PORTS[$i]} --pidfile=/var/run/puppet/puppetmaster.${PUPPETMASTER_PORTS[$i]}.pid
Sure, Puppet master is running as puppet
user:
ps -ef | grep [p]uppet
puppet 23418 1 0 18:13 ? 00:00:00 /usr/bin/ruby /usr/sbin/puppetmasterd
and the owner of /var/run/puppet/
folder is puppet
:
# ls -ld /var/run/puppet/
drwxr-xr-x 2 puppet puppet 4096 Sep 17 18:46 /var/run/puppet/
It is up to the controlled program (in this case puppetmasterd
), not the daemon()
function, to create the pidfile; daemon()
relies on this.
Confirm where puppetmasterd
creates its pidfile (it could be /var/run/puppet.pid
, /var/lib/puppet/run/master.pid
, etc.) To find out, inspect the contents of puppetmasterd
(if a script), or kill puppetmasterd
then strace -f puppetmasterd 2>&1 | grep '\.pid'
.
Modify the value of pidfile
in your /etc/init.d/puppetmaster
accordingly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With