Recently, one of the servers appeared to not be keeping up with configuration changes. Since it runs Puppet, this is a problem – it means that the changes at the puppet server are not getting propagated to the clients. The server is running Ubuntu Lucid Lynx Server 10.04.3 and Puppet 2.6.3.
So I shut down the puppet agent and tried running it manually:
# service puppet stop * Stopping puppet agent ...done. # puppet agent --test notice: Run of Puppet configuration client already in progress; skipping #
Since puppet is definitively not running, I had to do some research and find out why it was not running.
I found this bug (Puppet bug #2888) that stated sometimes puppet does not remove its lockfile /var/lib/puppet/state/puppetdlock
. Sure enough, on my system, the lockfile was still there. I deleted it and puppet ran normally.
There was also a bug report (Puppet bug #5246) that suggested puppet sometimes does not remove its pidfile /var/lib/puppet/run/agent.pid
. Some of the testing suggests that this bug is confined to running puppet --onetime
(without other options). I don’t think this affected me: after removing the lockfile, puppet ran normally.
A much simpler solution is to use “puppetd –enable” (or “–disable”) or if you run newer versions “puppet agent –enable”.
Using it regularly to make the agent run with:
puppet agent –enable && puppet agent –test ; puppet agent –disable
still not working
couldn’t retrieve catalog from remote server
Alaa:
sudo service puppet stop
sudo rm /var/lib/puppet/state/agent_catalog_run.lock
sudo service puppet start
sudo puppet agent -vt