我刚刚使用默认选项在Windows azure vm上创建了puppet labs enterprise master。我已成功访问PE控制台https://puppetmasterazure.cloudapp.net/。能够访问控制台,我认为主配置正确。
我现在在Azure中创建了一个新的Windows VM并将其链接到Puppet Master。但是,代理无法连接到主服务器(我也无法在Puppet控制台中看到签署新代理证书的请求)。我可以在Windows事件日志中看到以下错误消息。
Could not request certificate: getaddrinfo: No such host is known.
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/sys/ruby/lib/ruby/1.9.1/net/http.rb:763:in `initialize'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/sys/ruby/lib/ruby/1.9.1/net/http.rb:763:in `open'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/sys/ruby/lib/ruby/1.9.1/net/http.rb:763:in `block in connect'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/sys/ruby/lib/ruby/1.9.1/timeout.rb:69:in `timeout'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/sys/ruby/lib/ruby/1.9.1/timeout.rb:100:in `timeout'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/sys/ruby/lib/ruby/1.9.1/net/http.rb:763:in `connect'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/sys/ruby/lib/ruby/1.9.1/net/http.rb:756:in `do_start'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/sys/ruby/lib/ruby/1.9.1/net/http.rb:745:in `start'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/sys/ruby/lib/ruby/1.9.1/net/http.rb:1285:in `request'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/sys/ruby/lib/ruby/1.9.1/net/http.rb:1027:in `get'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/network/http/connection.rb:133:in `execute_request'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/network/http/connection.rb:80:in `block in request'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/network/http/connection.rb:79:in `times'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/network/http/connection.rb:79:in `request'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/network/http/connection.rb:58:in `get'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/indirector/rest.rb:84:in `http_request'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/indirector/rest.rb:63:in `http_get'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/indirector/rest.rb:97:in `block in find'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/indirector/rest.rb:178:in `block in do_request'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/indirector/request.rb:261:in `do_request'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/indirector/rest.rb:178:in `do_request'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/indirector/rest.rb:91:in `find'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/indirector/certificate/rest.rb:12:in `find'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/indirector/indirection.rb:201:in `find'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/ssl/host.rb:201:in `certificate'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/ssl/host.rb:36:in `localhost'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/ssl/validator/default_validator.rb:26:in `initialize'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/ssl/validator.rb:27:in `new'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/ssl/validator.rb:27:in `default_validator'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/network/http_pool.rb:27:in `http_instance'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/indirector/rest.rb:58:in `network'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/indirector/rest.rb:83:in `http_request'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/indirector/rest.rb:63:in `http_get'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/indirector/rest.rb:97:in `block in find'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/indirector/rest.rb:178:in `block in do_request'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/indirector/request.rb:261:in `do_request'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/indirector/rest.rb:178:in `do_request'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/indirector/rest.rb:91:in `find'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/indirector/certificate/rest.rb:12:in `find'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/indirector/indirection.rb:201:in `find'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/ssl/host.rb:201:in `certificate'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/ssl/host.rb:324:in `wait_for_cert'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/application/agent.rb:477:in `wait_for_certificates'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/application/agent.rb:318:in `run_command'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/application.rb:364:in `block (2 levels) in run'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/application.rb:470:in `plugin_hook'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/application.rb:364:in `block in run'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/util.rb:478:in `exit_on_fail'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/application.rb:364:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/util/command_line.rb:137:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/lib/puppet/util/command_line.rb:91:in `execute'
C:/Program Files (x86)/Puppet Labs/Puppet Enterprise/puppet/bin/puppet:4:in `<main>'
我已经验证过的事情,
任何想法如何让代理与主人沟通?
答案 0 :(得分:1)
我必须进行2次更改,从而导致从代理向主服务器发出证书签名请求。
打开cmd和telnet &#34; telnet puppetmaster.xxx.net 8140&#34; 这告诉我从傀儡到主人的沟通失败了。 D&#39;哦,应该记住在配置代理时打开端口(端点)。打开防火墙端口,puppet使用8140作为默认端口。
找到Puppet.conf文件,在Windows框中它是C:\ ProgramData \ PuppetLabs \ puppet \ etc。验证服务器名称的格式,我以前将其配置为https://puppetmaster.xxx.net它应该实际上没有https。
[main] server = puppetmasterazure.xxx.net pluginsync = true autoflush = true archive_files = true archive_file_server = puppetmasterazure.xxx.net graph = true environment = production
瞧!进行这些更改后,重新启动该服务。这将强制尝试连接到主服务器。您应该能够在Puppet企业控制台中看到证书签名请求。