Ask Your Question
0

Error: Could not prepare for execution: Could not create PID file: /var/run/pe-puppet/agent.pid

asked 2013-09-09 08:13:46 -0500

manchana gravatar image

Hi All,

While I am running puppet agent I get the following error:

command : puppet agent --verbose Error: Could not prepare for execution: Could not create PID file: /var/run/pe-puppet/agent.pid

Checked under /var/run/pe-puppet, pid file is being created when the serrvice is started. Checked in the puppet.conf and the rundir is correctly mentioned. Nothing found under /var/log/pe-puppet/

Please let me know where else I can check for the error.

Thanks, Manchana

edit retag flag offensive close merge delete

Comments

Hi Brendan, Thanks for the help. As i mentioned above I see the agent.pid file when service is started, so file is being written to /var/run/pe-puppet directory ...(more)

manchana gravatar imagemanchana ( 2013-09-09 09:18:52 -0500 )edit

What OS? Is Apparmor or SELinux enabled that may be impacting Puppet?

bmurts gravatar imagebmurts ( 2013-09-09 09:45:49 -0500 )edit

root@master ~]# facter | grep operatingsystem operatingsystem => RedHat operatingsystemmajrelease => 6 operatingsystemrelease => 6.2 [root@master ~]# facter | grep selinux selinux => false [root@master ~]# getenforce Disabled Thanks, Manchana

manchana gravatar imagemanchana ( 2013-09-09 11:44:05 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2013-09-09 14:39:13 -0500

GregLarkin gravatar image

Please check to see if you already have a daemonized puppet agent running when you execute the puppet agent command again. If you do, then you will not be able to run the agent again as a daemon. You can run it like so, even when the daemonized version is running:

puppet agent -t --verbose
edit flag offensive delete link more

Comments

Hi Greg, Thanks for that, its worked like a champ.

manchana gravatar imagemanchana ( 2013-09-10 12:39:54 -0500 )edit

I'm glad that worked for you, and please accept my answer as correct when you have a moment - thank you!

GregLarkin gravatar imageGregLarkin ( 2013-09-10 13:30:51 -0500 )edit
0

answered 2013-09-09 08:47:13 -0500

bmurts gravatar image

Confirm rundir = /var/run/pe-puppet is set properly within /etc/puppetlabs/puppet/puppet.conf

Also, confirm ownership of the pe-puppet directory in /var/run:

Mine is currently set to: drwxrwxrwt 2 root root 60 Aug 26 11:47 pe-puppet

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2013-09-09 08:13:46 -0500

Seen: 14,694 times

Last updated: Sep 09 '13