Thursday, February 6, 2014

Puppet FAQ

Puppet FAQ

So you have setup your Puppet master and got few servers joined the show. Everything runs smooth and another happy man.

Wait, on the last node, when you almost done with the project, there is one node keep throwing this error
[root@ clinet]# puppet agent --test
err: Could not request certificate: Connection timed out - connect(2)
Exiting; failed to retrieve certificate and waitforcert is disabled

You very certain that you have open all the ports, other nodes talk to master, only this node. Restarting master and client 654 times but no luck.

After spending 2 hours Googling, no luck still.

Out of sudden, you realised that you have not defined puppet master server on node's puppet.conf file
[main]
    # The Puppet log directory.
    # The default value is '$vardir/log'.
    logdir = /var/log/puppet

    # Where Puppet PID files are kept.
    # The default value is '$vardir/run'.
    rundir = /var/run/puppet

    # Where SSL certificates are kept.
    # The default value is '$confdir/ssl'.
    ssldir = $vardir/ssl
    server  = puppetmaster.local 

Hope this post could save someone 120mins, repeating the same I went through.