[root@client1 puppet-2.7.14]# puppetd –mkusersCould not prepare for execution: Got 1 failure(s) while initializing: change from absent to present failed: Could not create user puppet: Execution of \’/usr/sbin/useradd -g puppet -M puppet\’ returned 3: useradd: invalid numeric argument \’puppet\'</p>
<p>[root@client1 puppet-2.7.14]# groupadd puppet;useradd -g puppet -M puppet[root@client1 puppet-2.7.14]# service puppet startStarting puppet: [ OK ]
测试解析与puppetmaster端口是否畅通
复制代码
代码如下:
[root@client1 puppet-2.7.14]# telnet puppetmaster.info.com 8140Trying 192.168.0.12…Connected to puppetmaster.info.com (192.168.0.12).Escape character is \’^]\’.</p>
<p>[root@client1 puppet-2.7.14]# puppetd –test –server puppetmaster.info.comwarning: peer certificate won\’t be verified in this SSL sessioninfo: Caching certificate for cawarning: peer certificate won\’t be verified in this SSL sessionwarning: peer certificate won\’t be verified in this SSL sessioninfo: Creating a new SSL certificate request for client1.info.cominfo: Certificate Request fingerprint (md5): 07:C9:D4:43:3C:3E:D6:D1:0A:B1:8B:71:DB:6B:9D:FEwarning: peer certificate won\’t be verified in this SSL sessionwarning: peer certificate won\’t be verified in this SSL sessionwarning: peer certificate won\’t be verified in this SSL sessionExiting; no certificate found and waitforcert is disabled# puppetd –test –server puppetmaster.info.com命令是指puppetd 从 puppetmaster.info.com去读取
[root@client1 puppet-2.7.14]# puppetd –test –server puppetmaster.info.comwarning: peer certificate won\’t be verified in this SSL sessioninfo: Caching certificate for client1.info.cominfo: Caching certificate_revocation_list for cainfo: Caching catalog for client1.info.cominfo: Applying configuration version \’1378188531
[root@puppetmaster ~]# service puppetmaster restartStopping puppetmaster: [ OK ]Starting puppetmaster: [ OK ]
客户端:
复制代码
代码如下:
[root@client1 puppet-2.7.14]# puppetd –test –server puppetmaster.info.cominfo: Caching catalog for client1.info.cominfo: Applying configuration version \’1378190404\’notice: /Stage[main]//Node[default]/File[/tmp/viong.txt]/ensure: defined content as \'{md5}4750aa5be82dae5db286a5859700dd51\’notice: Finished catalog run in 0.03 seconds
如果报错[root@client1 puppet-2.7.14]# puppetd –test –server puppetmaster.info.comerr: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not parse for environment production: Syntax error at end of file; expected \’}\’ at /etc/puppet/manifests/site.pp:4 on node client1.info.comwarning: Not using cache on failed catalogerr: Could not retrieve catalog; skipping run