puppet service not starting

asked 2014-11-26 12:44:46 -0500

lorcutt gravatar image

updated 2014-12-01 11:11:59 -0500

I'm seeing odd behavior where puppet is not starting the puppet agent. Any help is appreciated.

Running the latest opensource puppet code 3.7.3.

I have configured my systems with

service {'puppet':
  ensure => running,
  enable => true,
}

I had thought this was working fine until I was just running some tests where I had stopped the puppet service and then ran "puppet agent -t" expecting it to restart - I and found about 25% of the RHEL5 systems didn't start the agent as expected.

This appears to match the behavior in https://projects.puppetlabs.com/issues/8346 - there doesn't appear to be any resolution to this ticket, and as far as I can tell it was not carried forward to the new ticketing system.

Here's information from a system in which it is occurring:

[root@djb00001 ~]# uname -r
2.6.18-128.el5

[root@djb00001 ~]# rpm -q puppet
puppet-3.7.3-1.el5

[root@djb00001 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.3 (Tikanga)

[root@djb00001 ~]# service puppet status
puppet is stopped

[root@djb00001 ~]# echo $?
3

[root@djb00001 ~]# puppet agent -t
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for djb00001.<domain>
Info: Applying configuration version '1417026751'
Notice: Finished catalog run in 0.27 seconds

[root@djb00001 ~]# service puppet status
puppet is stopped

[root@djb00001 ~]# echo $?
3

[root@djb00001 ~]# grep service /var/lib/puppet/state/resources.txt
service[puppet]

Commands suggested for debugging in ticket 8346:

[root@djb00001 ~]# /etc/init.d/funcd status
-bash: /etc/init.d/funcd: No such file or directory

[root@djb00001 ~]# echo $?
127

[root@djb00001 ~]# puppet resource service funcd -d
Debug: Runtime environment: ruby_version=1.8.7, puppet_version=3.7.3, run_mode=user
... lots of stuff...
Debug: Executing '/sbin/service funcd status'
Debug: Executing '/sbin/chkconfig funcd'
service { 'funcd':
  ensure => 'stopped',
  enable => 'false',
}

[root@djb00001 ~]# puppet resource service funcd hasstatus=true -d
Debug: Runtime environment: run_mode=user, puppet_version=3.7.3, ruby_version=1.8.7
....
Debug: Loaded state in 0.01 seconds
Debug: Executing '/sbin/service funcd status'
Debug: Finishing transaction 23631806274260
Debug: Storing state
Debug: Stored state in 0.03 seconds
Debug: Executing '/sbin/service funcd status'
service { 'funcd':
  ensure => 'stopped',
}


[root@djb00001 ~]# /etc/init.d/puppet status
puppet is stopped

[root@djb00001 ~]# echo $?
3

[root@djb00001 ~]# puppet resource service puppet -d

Debug: Runtime environment: ruby_version=1.8.7, puppet_version=3.7.3, run_mode=user
... lots of stuff...
Debug: Executing '/sbin/service puppet status'
Debug: Executing '/sbin/chkconfig puppet'
service { 'puppet':
  ensure => 'running',
  enable => 'true',
}

[root@djb00001 ~]# puppet resource service puppet hasstatus=true -d

Debug: Runtime environment: ruby_version=1.8.7, run_mode=user, puppet_version=3.7.3
...
Debug: Loaded state in 0.00 seconds
Debug: Executing '/sbin/service puppet status'
Debug: Finishing transaction 23907975424860
Debug: Storing state
Debug: Stored state in 0.03 seconds
Debug: Executing '/sbin/service puppet status'
service { 'puppet':
  ensure => 'running',
}
[root@djb00001 ~]#

[root@djb00001 ~]# service puppet status
puppet is stopped

[root@djb00001 ~]# echo $?
3

[root@djb00001 ~]#

[root@djb00001 ~]# puppet agent -t --debug
...
Debug: Executing '/sbin/service ...
(more)
edit retag flag offensive close merge delete

Comments

What is the output of the command "rpm -q redhat-lsb"?

GregLarkin gravatar imageGregLarkin ( 2014-11-26 16:39:05 -0500 )edit

it's not installed

lorcutt gravatar imagelorcutt ( 2014-11-26 17:26:14 -0500 )edit

What happens if you run "service puppet start"? Running "puppet agent -t" only runs the agent in the foreground, and that will not start the agent daemon. It may also be useful to run the init script in debug mode and post the output: "sh -x /etc/init.d/puppet start"

GregLarkin gravatar imageGregLarkin ( 2014-11-26 21:37:10 -0500 )edit

i'm not logged in to the system right now so I can't give you the output, but it starts normally and I've traced through the init script without seeing any issues.

lorcutt gravatar imagelorcutt ( 2014-11-27 10:11:05 -0500 )edit

Let's back up a bit - please stop the puppet service (service puppet stop), then run "puppet agent -t --debug --trace" and post a link to a pastebin of the output. After puppet agent exits, run "ps uaxww | grep puppet" and post that output, too. The trace may provide details.

GregLarkin gravatar imageGregLarkin ( 2014-12-01 11:38:51 -0500 )edit