puppet无法从远程服务器检索目录:主机名不匹配的服务
puppet无法从远程服务器检索目录:主机名不匹配的服务
系统Linux master 2.6.18-194.el5 #1 SMP Fri Apr 2 14:58:35 EDT 2010 i686 i686 i386 GNU/Linux
centos 5.5
我的安装过程
在vmware上安装centos 5.5.
主机配置:master 192.168.2.128
客户机配置:client2 192.168.2.129
在master以及client主机中的/etc/hosts文件写入
192.168.2.128 master
192.168.2.129 client2
在安装puppet之前先修改master跟client1主机名。修改的文件有/etc/hosts、/etc/sysconfig/network两个文件
修改好后重启主机,然后使用yum -y install puppet puppet-server安装工具
在master上启动puppet程序
service puppet start
service puppetmaster start
在/etc/puppet/manifests下建立site.pp文件,
- node default{
- file {"/tmp/temp":
- content=>"This is Test line!";
- }
- }
复制代码在客户端使用命令连接主机
puppetd --server master --test
warning: peer certificate won't be verified in this SSL session
info: Caching certificate for ca
warning: peer certificate won't be verified in this SSL session
warning: peer certificate won't be verified in this SSL session
info: Creating a new SSL certificate request for client2.localdomain
warning: peer certificate won't be verified in this SSL session
warning: peer certificate won't be verified in this SSL session
warning: peer certificate won't be verified in this SSL session
Exiting; no certificate found and waitforcert is disabled
服务器端使用puppetca --all 可以看到client,名称是client2.localdomain
使用puppet -s -a client2.localdomain认证客户端
提示 puppetca -a -s client2.localdomain
notice: Signed certificate request for client2.localdomain
notice: Removing file Puppet::SSL::CertificateRequest client2.localdomain at'/var/lib/puppet/ssl/ca/requests/client2.localdomain.pem'
在客户端再次使用puppetd --server master --test
提示
[root@client2 ~]# puppetd --server master --test
warning: peer certificate won't be verified in this SSL session
info: Caching certificate for client2.localdomain
err: Could not retrieve catalog from remote server: hostname not match with the server certificate
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run
master跟client2没有开启防火墙,用netstat-an|grep "^tcp"可以看到master上有开启了8140端口了
请问这个要怎么处理,是什么问题导致这样的错误信息?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
原因是我的master的主机名设置错了。少写了一个c。重新对master设置了主机名,删掉puppet-server和puppet客户端。还好只有几台在测试。。。