我已经在 Ubuntu 14.04 系统上安装了 puppet。
当我使用时它工作正常:
sudo puppet agent -t
但:
puppet agent -t
返回:
Warning: Unable to fetch my node definition, but the agent run will continue:
Warning: SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read finished A
Info: Retrieving pluginfacts
Error: /File[/home/rescue/.puppet/var/facts.d]: Failed to generate additional resources using 'eval_generate': SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read finished A
Error: /File[/home/rescue/.puppet/var/facts.d]: Could not evaluate: Could not retrieve file metadata for puppet://puppet/pluginfacts: Connection reset by peer - SSL_connect
Info: Retrieving plugin
Error: /File[/home/rescue/.puppet/var/lib]: Failed to generate additional resources using 'eval_generate': SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read finished A
Error: /File[/home/rescue/.puppet/var/lib]: Could not evaluate: Could not retrieve file metadata for puppet://puppet/plugins: SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read finished A
Info: Loading facts
Error: Could not retrieve catalog from remote server: SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read finished A
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
Error: Could not send report: SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read finished A
我尝试让 Puppet 成为超级用户,sudo usermod -aG sudo puppet
但仍然得到相同的结果。
答案1
这个答案在某种程度上是一种解决方法。
我上面遇到的核心问题是,当 Puppet 每 30 分钟自动运行(检查 master)时,它总是会失败。
我停止了在 ubuntu 上运行的服务,而是使用service puppet start
了sudo service puppet start
。
答案2
据我所知,开源版的 puppet-agent 需要使用 root 权限运行。你可以在这里阅读更多内容(针对企业版): https://puppet.com/blog/new-support-for-non-root-agents-puppet-enterprise