Puppet – err: Could not retrieve catalog from remote server: Error 400 on SERVER

Puppet – err: Could not retrieve catalog from remote server: Error 400 on SERVER

While I was deploying a simple Puppet setup, I faced the above error whenever I tried to execute the following the Puppet client:

[root@puppetclient ~]# puppet agent --test --noop
info: Retrieving plugin
info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
info: Loading facts in /var/lib/puppet/lib/facter/oracle_database_homes.rb
info: Loading facts in /var/lib/puppet/lib/facter/concat_basedir.rb
info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb
err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find default node or by name with 'puppetclient.local, puppetclient' on node puppetclient.local
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run

I tried the PuppetLabs troubleshooting guide, however I still could not find the root cause. I also tried to “cleanup” the Puppet SSL certifications.

[root@puppetclient ~]# rm -f /var/lib/puppet/ssl/certs/puppetclient.local.pem
[root@puppetmaster ~]# puppet cert clean puppetclient.local

After further investigation, it was yet another silly mistake! In the Puppet-Master, puppetclient.local was not defined in the nodes.pp. After adding the node definition, it was resolved!

node 'puppetnewclient.local' {
 include ntp
 include sysctl
 }

Regards,
Wei Shan

 

 

Advertisements
  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: