puppet error 400

←手機掃碼閱讀     火星人 @ 2014-03-03 , reply:0

clientA:
/etc/hosts
172.18.21.136   test01.abc.com          test01
172.20.0.10     cluster01.abc.com     cluster01
172.20.0.13     desktop.abc.com       desktop
# hostname
cluster01.abc.com
# /etc/init.d/puppet start
Starting puppet:                                           [  OK  ]


serverB:
/etc/hosts
172.18.21.136   test01.abc.com          test01
172.20.0.10     cluster01.abc.com     cluster01
172.20.0.13     desktop.abc.com       desktop
# hostname
desktop.yihuacomputer.com
# /etc/init.d/puppetmaster start
Starting puppetmaster:                                     [  OK  ]

A和B的時間是一致的
=======================================================
實驗步驟:
1、A
# puppet agent --server=desktop.abc.com --no-daemonize --verbose --onetime
info: Creating a new SSL key for cluster01.abc.com
info: Caching certificate for ca
info: Creating a new SSL certificate request for cluster01.abc.com
info: Certificate Request fingerprint (md5): 9D:23:D6:8A:EB:6E:B3:3B:1B:BF:6F:9E:16:3C:0F:9C
Exiting; no certificate found and waitforcert is disabled
2、B
# puppetca -s -a
notice: Signed certificate request for cluster01.abc.com
notice: Removing file Puppet::SSL::CertificateRequest cluster01.abc.com at '/var/lib/puppet/ssl/ca/requests/cluster01.abc.com.pem'
3、A
# puppet agent --server=desktop.abc.com --no-daemonize --verbose --onetime
info: Caching certificate for cluster01.abc.com
info: Caching certificate_revocation_list for ca
err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find default node or by name with 'cluster01.abc.com, cluster01.abc, cluster01' on node cluster01.abc.com
notice: Using cached catalog
err: Could not retrieve catalog; skipping run

===========================================================
/var/log/message

B、
Nov  6 17:37:50 desktop puppet-master: desktop.abc.com has a waiting certificate request
Nov  6 17:37:50 desktop puppet-master: Signed certificate request for desktop.abc.com
Nov  6 17:37:50 desktop puppet-master: Removing file Puppet::SSL::CertificateRequest desktop.abc.com at '/var/lib/puppet/ssl/ca/requests/desktop.abc.com.pem'
Nov  6 17:37:50 desktop puppet-master: Removing file Puppet::SSL::CertificateRequest desktop.abc.com at '/var/lib/puppet/ssl/certificate_requests/desktop.abc.com.pem'
Nov  6 17:37:50 desktop puppet-master: Reopening log files
Nov  6 17:37:50 desktop puppet-master: Starting Puppet master version 2.6.18
Nov  6 17:38:16 desktop puppet-master: cluster01.abc.com has a waiting certificate request
Nov  6 17:39:04 desktop puppet-master: Could not find default node or by name with 'cluster01.abc.com, cluster01.abc, cluster01' on node cluster01.abc.com
Nov  6 17:39:04 desktop puppet-master: Could not find default node or by name with 'cluster01.abc.com, cluster01.abc, cluster01' on node cluster01.abc.com
Nov  6 17:48:57 desktop puppet-master: Caught TERM; calling stop
Nov  6 17:49:00 desktop puppet-master: Reopening log files
Nov  6 17:49:00 desktop puppet-master: Starting Puppet master version 2.6.18

A、
Nov  6 17:37:56 cluster01 puppet-agent: Reopening log files
Nov  6 17:37:56 cluster01 puppet-agent: Could not request certificate: getaddrinfo: Name or service not known
Nov  6 17:38:15 cluster01 puppet-agent: Caching certificate for ca
Nov  6 17:38:15 cluster01 puppet-agent: Creating a new SSL certificate request for cluster01.abc.com
Nov  6 17:38:15 cluster01 puppet-agent: Certificate Request fingerprint (md5): 44:88:2E:63:D2:11:8A:C2:C9:6A:FE:C5:EB:AC:2A:C5
Nov  6 17:39:01 cluster01 puppet-agent: Caching certificate for cluster01.abc.com
Nov  6 17:39:04 cluster01 puppet-agent: Caching certificate_revocation_list for ca
Nov  6 17:39:04 cluster01 puppet-agent: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find default node or by name with 'cluster01.abc.com, cluster01.abc, cluster01' on node cluster01.abc.com
Nov  6 17:39:04 cluster01 puppet-agent: Not using cache on failed catalog
Nov  6 17:39:04 cluster01 puppet-agent: Could not retrieve catalog; skipping run
Nov  6 17:39:56 cluster01 puppet-agent: Starting Puppet client version 2.6.18
Nov  6 17:39:58 cluster01 puppet-agent: Could not retrieve catalog from remote server: getaddrinfo: Name or service not known
Nov  6 17:39:58 cluster01 puppet-agent: Using cached catalog
Nov  6 17:39:58 cluster01 puppet-agent: Could not retrieve catalog; skipping run
Nov  6 17:48:23 cluster01 puppet-agent: Caught TERM; calling stop
Nov  6 17:48:26 cluster01 puppet-agent: Reopening log files
Nov  6 17:48:27 cluster01 puppet-agent: Starting Puppet client version 2.6.18
Nov  6 17:48:29 cluster01 puppet-agent: Could not retrieve catalog from remote server: getaddrinfo: Name or service not known
Nov  6 17:48:29 cluster01 puppet-agent: Using cached catalog
Nov  6 17:48:29 cluster01 puppet-agent: Could not retrieve catalog; skipping run
==========================================================================

問題:
1、軟體是否算安裝和運行成功?
2、為什麼第二次註冊的時候會出現那麼多的報錯?

Exiting; no certificate found and waitforcert is disabled?

處理方式:

在desktop上沒有定義node cluster01
可以在site.pp里定義
node cluster01 {
}

在/etc/puppet/manifests下放了site.app就行了。





[火星人 ] puppet error 400已經有522次圍觀

http://coctec.com/docs/service/show-post-124.html