免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4280 | 回复: 1

puppet无法从远程服务器检索目录:主机名不匹配的服务 [复制链接]

论坛徽章:
0
发表于 2011-05-11 15:54 |显示全部楼层
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文件,
  1. node default{
  2.         file {"/tmp/temp":
  3.                 content=>"This is Test line!";
  4.         }
  5. }
复制代码
在客户端使用命令连接主机
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端口了
请问这个要怎么处理,是什么问题导致这样的错误信息?

论坛徽章:
0
发表于 2011-05-11 15:56 |显示全部楼层
原因是我的master的主机名设置错了。少写了一个c。重新对master设置了主机名,删掉puppet-server和puppet客户端。还好只有几台在测试。。。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP