2016-12-26 83 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