Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed when searching for node puppet.myhost.com: Failed to find puppet.myhost.com via exec: Execution of '/etc/puppet/bin/node_classifier puppet.myhost.com' returned 1:
root@puppet:/etc/puppet# ./bin/node_classifier puppet.myhost.com
---
classes:
- apt
- common
- ntp
- puppet
- sudo
- users
parameters:
puppetserver: puppet.myhost.com
environment: production
root@puppet:/etc/puppet#
Have you tried to run the command with the same user the puppet master is running? (Usually puppet)
Regards,
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/d5056060-42ad-4807-8b47-7c9b204bc94e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
root@nexus:/home/vagrant# ps -ef | grep puppet
root 1480 1 0 11:01 ? 00:00:01 /usr/bin/ruby /usr/bin/puppet agent
The node classifier command is launched by the same user the runs puppet master, and normally it is the 'puppet' user.
You should try running the node classifier command in the puppet master with the same user it runs.
Regards
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/31cd8d4d-54bc-44dd-9ef6-73fc2409829d%40googlegroups.com.
root@puppet:/etc/puppet# ps -ef | grep puppet
root 1362 1 0 10:55 ? 00:00:02 /usr/bin/ruby /usr/bin/puppet agent
puppet 20719 1 0 11:31 ? 00:00:00 Passenger RackApp: /usr/share/puppet/rack/puppetmasterd
root@puppet:/etc/puppet# sudo -u puppet ./bin/node_classifier
/usr/lib/ruby/vendor_ruby/facter/util/directory_loader.rb:75:in `open': Permission denied - /root/.facter/facts.d (Errno::EACCES)
The work around I went with is to just avoid the "require 'puppet'" line in my external node classifier so I can avoid this issue completely. I just ignore the first line of the YAML file in /var/lib/puppet/yaml/facts/ and do YAML.load rather than YAML.load_file.