Exiting; no certificate found and waitforcert is disabled

现象:

[root@node ~]# puppetd --test --server pxeserver
Exiting; no certificate found and waitforcert is disabled

[root@node ~]# puppetd --test --server pxeserver --debug
debug: Puppet::Type::User::ProviderPw: file pw does not exist
debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dscl does not exist
debug: Puppet::Type::User::ProviderUser_role_add: file roleadd does not exist
debug: Failed to load library 'ldap' for feature 'ldap'
debug: Puppet::Type::User::ProviderLdap: feature ldap is missing
debug: /File[/var/lib/puppet/clientbucket]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/ssl/public_keys/node.pem]: Autorequiring File[/var/lib/puppet/ssl/public_keys]
debug: /File[/var/lib/puppet/ssl/certificate_requests]: Autorequiring File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/ssl/private_keys/node.pem]: Autorequiring File[/var/lib/puppet/ssl/private_keys]
debug: /File[/etc/puppet/puppet.conf]: Autorequiring File[/etc/puppet]
debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/ssl/public_keys]: Autorequiring File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/client_yaml]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/ssl/certs]: Autorequiring File[/var/lib/puppet/ssl]
debug: /File[/var/run/puppet/agent.pid]: Autorequiring File[/var/run/puppet]
debug: /File[/var/lib/puppet/ssl/private_keys]: Autorequiring File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/state/graphs]: Autorequiring File[/var/lib/puppet/state]
debug: /File[/var/lib/puppet/ssl]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/facts]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/ssl/private]: Autorequiring File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/ssl/certs/ca.pem]: Autorequiring File[/var/lib/puppet/ssl/certs]
debug: /File[/var/lib/puppet/client_data]: Autorequiring File[/var/lib/puppet]
debug: Finishing transaction 70035394015820
debug: /File[/var/lib/puppet/ssl/private_keys]: Autorequiring File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/ssl/certificate_requests]: Autorequiring File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/ssl/public_keys]: Autorequiring File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/ssl/private]: Autorequiring File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/ssl/private_keys/node.pem]: Autorequiring File[/var/lib/puppet/ssl/private_keys]
debug: /File[/var/lib/puppet/ssl/certs]: Autorequiring File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/ssl/public_keys/node.pem]: Autorequiring File[/var/lib/puppet/ssl/public_keys]
debug: /File[/var/lib/puppet/ssl]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/ssl/certs/ca.pem]: Autorequiring File[/var/lib/puppet/ssl/certs]
debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/facts]: Autorequiring File[/var/lib/puppet]
debug: Finishing transaction 70035392781780
debug: Using cached certificate for ca
debug: Using cached certificate_request for node
debug: Using cached certificate for ca
debug: Using cached certificate for ca
Exiting; no certificate found and waitforcert is disabled
[root@node ~]#tail -f /var/log/messages

Nov  9 16:04:21 node puppet-agent[1437]: Could not request certificate: No route to host - connect(2)
Nov  9 16:06:26 node puppet-agent[1437]: Could not request certificate: No route to host - connect(2)

原因:

SSL证书不正确,认证错误。

解决办法:

删除已有证书:

[root@node ~]# cd /var/lib/puppet/
[root@node puppet]# ls
clientbucket  client_data  client_yaml  facts  lib  ssl  state
[root@node puppet]# rm -rf /var/lib/puppet/
[root@node puppet]# ls
[root@node puppet]#

再次申请证书:

[root@node puppet]# puppetd --test --server pxeserver
/usr/lib/ruby/site_ruby/1.8/puppet/util/plugins.rb:49:in `expand_path': No such file or directory - getcwd (Errno::ENOENT)
        from /usr/lib/ruby/site_ruby/1.8/puppet/util/plugins.rb:49:in `look_in'
        from /usr/lib/ruby/site_ruby/1.8/puppet/util/plugins.rb:49:in `collect'
        from /usr/lib/ruby/site_ruby/1.8/puppet/util/plugins.rb:49:in `look_in'
        from /usr/lib/ruby/site_ruby/1.8/puppet/util/plugins.rb:54
        from /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:2:in `require'
        from /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:2
        from /usr/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:1:in `require'
        from /usr/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:1
        from /usr/sbin/puppetd:3:in `require'
        from /usr/sbin/puppetd:3
[root@node puppet]# cd
[root@node ~]# puppetd --test --server pxeserver
info: Creating a new SSL key for node
info: Caching certificate for ca
info: Creating a new SSL certificate request for node
info: Certificate Request fingerprint (md5): E3:10:B0:F1:EA:F1:20:62:66:75:9C:75:82:0F:22:FD
[root@node ~]#

证书申请成功。

 

你可能感兴趣的:(Puppet)