免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4136 | 回复: 4
打印 上一主题 下一主题

[puppet] puppet奇怪的问题(服务器与客户端连通性测试) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-08-03 16:04 |只看该作者 |倒序浏览
朋友们好,最近在学习puppet,搭建了一个环境,遇到了个问题,纠结了很久

网络环境
192.168.199.3  puppetserver
192.168.199.5 client1
192.168.199.2 client2

系统环境
server=centos5_8x64
client=centos5_8x86

其中每台机器的hosts文件内均是相同的
[root@server /]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1                localhost.localdomain localhost
::1                localhost6.localdomain6 localhost6

192.168.199.3  puppetserver
192.168.199.5 client1
192.168.199.2 client2

软件包:
[root@server /]# rpm -qa | grep ruby
ruby-libs-1.8.5-24.el5
ruby-1.8.5-24.el5
ruby-libs-1.8.5-24.el5
ruby-shadow-1.4.1-7.el5

puppet-2.7.17.tar.gz
facter-1.6.10.tar.gz

在安装与部署的过程中没有明显报错,所有的客户端也装了ruby、facter、puppet 版本均相同
puppetmaster也 启动了,8140端口也监听了。
用ping和telnet 这几台机器的名字和端口也均可以。

目前遇到了两个问题
1.在两台客户端上测试  puppetd --test --server puppetserver  (#客户端client2/client1上运行)
err: Could not retrieve catalog from remote server: certificate verify failed.  This is often because the time is out of sync on the server or client
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run
err: Could not send report: certificate verify failed.  This is often because the time is out of sync on the server or client
google了一些资料,都说是服务器时间问题引起了。也在三台机器上对时了。可以保证时间都是一样的,秒数也没有差别。还是报这个错。

2. 在client上8140端口和8139端口都会起来,看资料客户端只用起来8139端口
我客户端的配置是这样配置的

Puppet client 设置
cd /software/puppet-2.7.17/conf
cp auth.conf namespaceauth.conf /etc/puppet/
cd redhat
cp puppet.conf /etc/puppet/
cp client.init /etc/init.d/puppet
chmod 755 /etc/init.d/puppet
chkconfig --add puppet
chkconfig puppet on
puppetmasterd –mkusers

vi /etc/puppet/puppet.conf
[agent]
   Listen = true
   Server = puppetserver

请朋友们帮忙看看,纠结了很久。

论坛徽章:
0
2 [报告]
发表于 2012-08-03 16:26 |只看该作者
err: Could not retrieve catalog from remote server: certificate verify failed.

这行看起来应该是客户端没有通过认证
可以看下服务端有没有客户端的证书,然后把客户端证书sign就好
puppet cert --sign example.com

论坛徽章:
0
3 [报告]
发表于 2012-08-06 17:06 |只看该作者
回复 2# voxye


看样子我puppet server下没有证书产生
[root@puppetserver puppet]# ll
total 24
-rw-r--r-- 1 root root 2552 Jul 29 17:26 auth.conf
-rw-r--r-- 1 root root  381 Jul 29 17:50 fileserver.conf
drwxr-xr-x 2 root root 4096 Jul 29 17:51 manifests
-rw-r--r-- 1 root root  354 Jul 29 17:50 namespaceauth.conf
-rw-r--r-- 1 root root  853 Jul 29 17:50 puppet.conf
-rw-r--r-- 1 root root  147 Jul 29 17:50 puppet-queue.conf
[root@puppetserver puppet]#

论坛徽章:
0
4 [报告]
发表于 2012-08-06 17:12 |只看该作者
回复 2# voxye



我用puppetca --list  查看有没有代签名的客户端报这个错误。
[root@puppetserver puppet]#  puppetca --list
Invalid method - to apply     

论坛徽章:
0
5 [报告]
发表于 2012-08-06 17:40 |只看该作者
搞定了。在两个客户端执行下面的命令
rm -rf $(puppet agent --configprint ssldir)
就是删除默认目录/var/lib/puppet/ssl里面的东西

然后在test和服务器之间的通信就OK了。谢谢大家了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP