简体   繁体   English

up:服务器主机名与服务器证书不匹配

[英]Puppet: Server hostname did not match server certificate

I installed Puppet Enterprise on two virtual machines (one master and one node). 我在两个虚拟机(一个主节点和一个节点)上安装了Puppet Enterprise。 When I try to run my agent manually with puppet agent -ti get the error 当我尝试使用人偶代理-ti手动运行代理时出现错误

Server hostname '192.168....' did not match server certificate; expected one of host-192-168-.....localdomain. 

If i run this by adding --server host-192-168.....localdomain it works, but this way i can do this manually and after its own runInterval it doesn't work so on my puppet console it says it is Unresponsive. 如果我通过添加--server host-192-168.....localdomain来运行它, --server host-192-168.....localdomain它可以工作,但是通过这种方式,我可以手动执行此操作,并且在运行runInterval自己的runInterval之后,它不起作用,因此在我的木偶控制台上它说反应迟钝。 I guess this is because on its own it gets the error i mentioned earlier so my master can't receive any reports from this node. 我猜这是因为它本身会收到我前面提到的错误,因此我的主服务器无法从该节点接收任何报告。

Can someone please help me with this? 有人可以帮我吗? How can i make so my node's agent is contacting the master with the proper server certificate name? 我该如何使节点的代理使用正确的服务器证书名称与主服务器联系?

puppet.conf from node: 来自节点的puppet.conf:

 [main] vardir = ... logdir = ... rundir = ... basemodulepath = ... user = ... group = ... archive_files = ... [agent] report = ... classfile = ... localconfig = ... graph = ... pluginsync = ... environment = ... server = 192.168.10.39 certname = 192.168.10.40 noop = true runinterval = 1800 

If i put server = host-... (in main) nothing changes. 如果我把server = host -...(主要)没有任何变化。 I think I can't change the server from [agent] part, because there should be the master ip (i believe) ... 我想我不能从[agent]部分更改服务器,因为应该有主ip(我相信)...

I tried what was on that link and now my puppet agent -t doesn't do anything anymore on my node. 我尝试了该链接上的内容,现在我的人偶代理-t在我的节点上不再执行任何操作。 For better understandig, i'm posting my puppet.conf from master: 为了更好地理解,我从master发布了我的puppet.conf:

 [main] certname = host-192-168-10-39.localdomain vardir = /var/opt/lib/pe-puppet logdir = /var/log/pe-puppet rundir = /var/run/pe-puppet basemodulepath = /opt/alu/deploy/puppet/modules:/etc/puppetlabs/puppet.... environmentpath = /opt/alu/deploy/puppet/environments server = 192.168.10.39 user = pe-puppet group = pe-puppet archive_files = true archive_files_server = 192.168.10.39 module_groups = base+pe_only dns_alt_names = puppet [agent] report = true classfile = $vardir/classes.txt localconfig = $vardir/localconfig graph = true pluginsync = true environment = production noop = true runinterval = 1800 [master] node_terminus = classfier ca_server = host-192-168-10-39.localdomain reports = console,puppetdb storeconfigs = true storeconfigs_backend = puppetdb certname = 192-168-10-39.localdomain server = 192.168.10.39 always_cache_features = true default_manifest = /opt/alu/deploy/puppet/manifests/default.pp 

Error from puppet agent -t : http://i62.tinypic.com/34ijlmu.png 来自人偶代理-t的错误: http : //i62.tinypic.com/34ijlmu.png

无需在命令行上发布--server ,只需在代理的puppet.conf文件的[main]部分中添加add server=...

There are a variety of causes for this problem, Please list your puppet.conf. 造成此问题的原因多种多样,请列出您的puppet.conf。

But from top, it looks like some mismatch between the name in the certificate generated by the master and the host name of the server. 但是从顶部看,主机生成的证书中的名称与服务器的主机名之间似乎有些不匹配。 Perhaps between when you generated the certificate and rebooted, the hostname had been changed, as hostname changes sometimes do not take affect until after a reboot. 也许在您生成证书并重新引导之间,主机名已经更改,因为有时主机名更改直到重新引导后才生效。

puppetlabs Offical documentaion helps to resolve this issue, please follow this link: https://docs.puppetlabs.com/guides/troubleshooting.html?_ga=1.110966791.343491524.1432986084#agents-are-failing-with-a-hostname-was-not-match-with-the-server-certificate-error-whats-wrong . puppetlabs官方文档可以帮助解决此问题,请点击以下链接: https ://docs.puppetlabs.com/guides/troubleshooting.html?_ga=1.110966791.343491524.1432986084#agents-are-failing-with-a-hostname-was- 与服务器证书错误不匹配是什么错误 It may be as simple as setting the certname value in /etc/puppet/conf and restarting the master. 它可能很简单,只需在/ etc / puppet / conf中设置certname值并重新启动主服务器即可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 安装Gem的Rails - 主机名与服务器证书不匹配 - Rails installing a Gem - hostname does not match the server certificate https URL 主机名与客户端信任库中服务器证书上的通用名称 (CN) 不匹配 - The https URL hostname does not match the Common Name (CN) on the server certificate in the client's truststore 如何验证服务器主机名 - How to verify server hostname 安全证书上的名称无效或与服务器名称不匹配 - The name on the security certificate is invalid or does not match the name of the server Azure:即使有证书,也没有证书与所选主机名匹配 - Azure : No certificates match the selected hostname even it has the certificate 自定义域证书错误•服务器的证书(heroku)与URL www.app.com不匹配 - Custom domain certificate error • Server's certificate (heroku) does not match the URL www.app.com 组合 scep 和 mdm 有效负载时出错 - 注册服务器未提供有效的身份证书 - Error when combining scep and mdm payloads - enrollment server did not provision valid identity certificate 主机名/IP 与证书的别名不匹配:POSTMAN - Hostname/IP does not match certificate's altnames: POSTMAN 将证书导入 VisualSVN 服务器 - Import certificate into VisualSVN Server 在构建服务器上安装证书 - Install Certificate on Build Server
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM