2016-12-26 85 views
1

我在CentOS Linux 7(Core)上安装了Puppet服务器。无法使用Windows代理连接到Enterprise Puppet服务器

# /opt/puppetlabs/bin/puppetserver --version 
puppetserver version: 2016.5.0.11 

我在Win Server 2008 R2 Enterprise(64位)上安装了Enterprise Puppet代理。

C:\Users\Administrator>puppet --version 
4.8.1 

当我尝试连接到木偶服务器,我只得到了以下的输出:

C:\Windows\system32>puppet agent --test 
Exiting; no certificate found and waitforcert is disabled 

在服务器上,如果我检查任何未决的证书签名请求,我什么也看不到:

# puppet cert --list 

我已验证我能够从我的Win代理程序框远程登录到端口8140上的Puppet服务器。

下面还显示了以本地系统用户身份运行的Puppet服务。

enter image description here

我的木偶服务器已经在/etc/puppetlabs/puppet/puppet.conf

[main] 
certname = gc.abc.com 
server = gc.abc.com 
user = pe-puppet 
group = pe-puppet 
environment_timeout = 0 
app_management = true 
module_groups = base+pe_only 
environmentpath = /etc/puppetlabs/code/environments 
codedir = /etc/puppetlabs/code 

[agent] 
graph = true 

[master] 
node_terminus = classifier 
storeconfigs = true 
storeconfigs_backend = puppetdb 
reports = puppetdb 
certname = gc.abc.com 
always_cache_features = true 

以下条目在Win剂,我已经在主机文件中指定的木偶服务器名称:

xx.yy.zz.zzz puppet-server 

在Win剂,我刚才也提到在C服务器名称:\ ProgramData \ PuppetLabs \木偶\等\ puppet.conf文件

[main] 
server=puppet-server 
autoflush=true 
environment=production 

任何指针?

+0

当你从服务器运行'sudo puppet cert list'时,你会看到什么? https://docs.puppet.com/puppet/latest/man/cert.html – ferventcoder

+0

我没有看到上述命令的任何输出。 – Technext

+0

由于它没有工作,所以我想到尝试企业设置。但是,这个问题仍然存在。我想只有从客户端实例访问端口8140是连接的先决条件,对吗? – Technext

回答

1

从IRC(@ binford2k),我得到了以下建议:

“退出;没有证书发现waitforcert被禁用”是指该客户端已生成的CSR。如果它有CSR,那么它不会尝试产生另一个CSR。然而,如果企业社会责任没有把它交给主人,那么主人就不会知道,而且代理人也不会再尝试,因为它已经有了企业社会责任。要解决上述问题,请删除代理上的SSL目录,然后再次尝试运行puppet。

当我根据上述建议删除SSL目录(C:\ ProgramData \ PuppetLabs \ puppet \ etc \ ssl)并再次运行puppet命令时,它工作。 :)

C:\Windows\system32>puppet agent --test --server=puppet-server 
Info: Creating a new SSL key for gc.abc.com 
Info: Caching certificate for ca 
Info: csr_attributes file loading from C:/ProgramData/PuppetLabs/puppet/etc/csr_ 
attributes.yaml 
Info: Creating a new SSL certificate request for gc.abc.com 
Info: Certificate Request fingerprint (SHA256): 99:02:46:D1:A4:32:6F:A5:CE:06:39 
:3E:A4:35:D2:88:C1:9A:D1:2E:58:27:B0:ED:24:F9:DC:77:D9 
Info: Caching certificate for ca 
Exiting; no certificate found and waitforcert is disabled