Puppet 资料整理

Android SDK下载异常(hostname in certificate didn't match) 对于Android开发者来说,每次下载更新 Android SDK 都是一次痛苦的经历,因为 google 被墙,每次我们都要想尽办法来更新 SDK, 以前我是通过 VPN 来下载 SDK,但是也只能保证稍微稳定一点的下载速度,每次更新还是要耗费很长的时间来等待,上星期我的同事发现通过修改 hosts 文件并将下载地址域名指向 203.208.46.146 即可加快速度,而且下载速度基本上都是4, 阅读详情

查找错误原因及其修改方法:

http://bitcube.co.uk/content/puppet-errors-explained

https://docs.puppetlabs.com/guides/troubleshooting.html#agents-are-failing-with-a-hostname-was-not-match-with-the-server-certificate-error-whats-wrong

https://mramahi.wordpress.com/2014/05/25/unable-to-connect-puppet-agent-to-master/


打印log:

node default {
  notice("try to run this script with -v and -d to see difference between log levels")
  notice("function documentation is available here: http://docs.puppetlabs.com/references/latest/function.html")
  notice("--------------------------------------------------------------------------")

  debug("this is debug. visible only with -d or --debug")
  info("this is info. visible only with -v or --verbose or -d or --debug")
  alert("this is alert. always visible")
  crit("this is crit. always visible")
  emerg("this is emerg. always visible")
  err("this is err. always visible")
  warning("and this is warning. always visible")
  notice("this is notice. always visible")
  #fail will break execution
  fail("this is fail. always visible. fail will break execution process")

}

错误1.hostname was not match with the server certificate”
Error: Could not request certificate: Server hostname 'bbq-24.ttt.ttt.com' did not match server certificate; expected bbq-24:
1. $sudo puppet master --configprint certname

2. Re-generate the puppet master’s certificate:

$ sudo find $(puppet master --configprint ssldir) -name "$(puppet master --configprint certname).pem" -delete

Edit the certname setting in the puppet master’s/etc/puppet/puppet.conf file 

$ sudo puppet master --no-daemonize --verbose

Problem

When trying to connect a Puppet node to a Master by running “puppet agent -t” or “puppet agent -t –server masterhostname.domain“, you may get variety of error messages that indicate the node is failing to connect or authenticate to the Puppet master. This situation can occur as a result of the following:

  • Re-imaging a previously configured node: When a node is re-imaged, it gets a new SSL certificate for Puppet. Unfortunately this means that the existing certificate stored on the Master’s end becomes invalid, and therefore the Master rejects the connection
  • Redirecting the agent to new Master: Every Agent/Master connection gets its own SSL certificates on the agent and master. When redirecting the agent to connect to another master, the certificates need to be regenerated to the new connection.
  • Setting up new node: Some of the issues can be experienced when setting up a new node,

This document lists a number of potential solutions in logical order to attempt to resolve the issue:

Resolution

There are number of resolutions, based on the root cause of the issue. The following is logical order of the most common solutions:

Solution #1: Command not run as root or using sudo

The “puppet agent -t” command needs to be run either as “root” or by using “sudo puppet agent -t”, otherwise it won’t run properly.

Solution #2: Configuration file (puppet.conf) does not contain proper entries

The file “/etc/puppet/puppet.conf” contains critical configurations needed by Puppet agent to connect to the Master, including the hostname. A standard puppet.conffor Linux file will look as follows:

[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
templatedir=$confdir/templates
server=puppet.domain
[agent]
report=true
[master]
# These are needed when the puppetmaster is run by passenger
# and can safely be removed if webrick is used.
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY

A standard puppet.conf file for Windows will look like:

[main]
server=puppet.domain
pluginsync=true
autoflush=true
environment=production
 
[agent]
report=true
 
[master]
# These are needed when the puppetmaster is run by passenger
# and can safely be removed if webrick is used.
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY

The hostname in “server=hostname.domain” entry under “[main]” must match the server name the Puppet Master used to generate its certificate. Some Masters include the domain in their certificates, and others don’t. Some use the hostname, and others use the alias (like in the above example).

Solution #3: Puppet Agent and Master versions do not match

It is highly recommended that Puppet agents and Masters have the same major version (like 3.x.x), and preferably same minor version (like 3.4.x). You can find the version of each by running the following command:

puppet agent --version
Solution #4: Puppet Agent and Master clocks are out of Sync

For security reasons, Puppet Master refuses to sign certificates of the Agent clock is out of sync. In BlackBerry’s environment, Puppet Master has NTP package installed, and configured. therefore the same need to be done to the nodes, where the NTP package must be installed, and the following lines added to it:

sudo apt-get install -y ntp
nano /etc/ntp.conf
###### Begin file edit
## Remove existing "server xxxx" entries
## Replace with the following:
server ntpserver.domain
server ntpserver2.domain
###### End of edit
# Run the following command to start NTP service
sudo /etc/init.d/ntpd start
# Force the initial clock sync
sudo ntpdate ntpserver.domain

Solution #5: Master Certificate is invalid and needs to be regenerated

This is usually the case when either re-imaging the node, so it gets a new certificate, causing the Master-stored one invalid, or when the agent is redirected to new Master. The resolution is two parts: Clean the certificates on the Master, and delete the existing certificate files on the Agent, and start all over:

On the Puppet Master server:

  • Login as root, or using an account with sudo access, and switch to root (sudo su)
  • Run the following command:

    puppet cert clean 'nodename.domain'
  • This should clean up the existing certificate from the Master

On Ubuntu Puppet Node:

  • Login as root, or using and account with sudo access, and switch to root (sudo su)
  • Run the following command to delete the old certificate files, and regenerate a new one:

    ## For Linux run this command:
    find /var/lib/puppet -type f -print0 |xargs -0r rm
     
    ## For Windows run this command:
    del /q C:\ProgramData\PuppetLabs\puppet\etc\ssl\certs\*
     
    ## For Both Windows and Linux run the following:
    puppet agent -t
Solution #6: Error “SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed..”

When running the following command on Puppet node, you get the error below, where puppetmaster.rim.net is replaced by the actual address of the Puppet Master server that the agent connects to:

# puppet agent -t
Warning: Unable to fetch my node definition, but the agent run will continue:
Warning: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed: [unable to get certificate CRL for /CN=puppetmaster.rim.net]
Info: Retrieving plugin
Error: /File[/var/lib/puppet/lib]: Failed to generate additional resources using 'eval_generate': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed: [unable to get certificate CRL for /CN=puppetmaster.domain]
Error: /File[/var/lib/puppet/lib]: Could not evaluate: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed: [unable to get certificate CRL for /CN=puppetmaster.domain] Could not retrieve file metadata for puppet://puppetmaster.rim.net/plugins: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed: [unable to get certificate CRL for /CN=puppetmaster.domain]
Error: Could not retrieve catalog from remote server: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed: [unable to get certificate CRL for /CN=puppetmaster.domain]
Warning: Not using cache on failed catalog

On Puppet Node:

  • Login as root, or using and account with sudo access, and switch to root (sudo su)
  • Run the following command to delete the old certificate files, and regenerate a new one:

    find /etc/puppet/ssl -type f -print0 |xargs -0r rm
    puppet agent -t
  • If the Master is configured to auto-sign certificates, then you are done. Otherwise you need to login back to Puppet Master and run the command:

    puppet cert sign 'nodename.domain'

    replacing ‘nodename’ with the actual server name where Puppet agent is installed.



Multisim实现555计时器模拟简易电子琴 一. 元器件介绍 这里用到的元器件有: DIgital power(VCC)数字电源 频率计数器(XFC) 示波器(XSC) ground 数字地 Capacitan 电容器 Resistor 电阻器 555_VIRTUAL 555计时器 触发按键(DIPSW)(DPST)(SPST) 阅读详情

相关推荐

GD32F450以太网(1):ETH 外设接口简介

GD32F450以太网ETH MAC外设接口简介

Zhichao_Zhang的博客 1万+

https 出现host name not match 问题

'www.xxx.com' does not match the certificate subject provided by the peer 出现这个问题的原因是你访问的域名和你访问服务器的证书的机构(域名)不一致导致的,比如,你的证书是为域名 sss.com注册的,而你访问的时候的域名是xxx.com,这个时候就会报这种错误,解决办法是重写httpclient的HostnameVerif

sonycong的专栏 4万+

Opencv学习-仿射变换与透视变换(几何变换)1

• 一、定义 变换是指对图像进行拉伸、收缩、扭曲和旋转等几何操作。对于平面区域有两种方式的几何转换:一种是基于23矩阵进行的变换,被称为仿射变换;一种是基于33矩阵进行的变换,被称为透视变换。也可被称为平面变换和空间变换。因为仿射变换需要找到3个映射点,三点确定一个平面。而透视变换需要确定四个映射点,四点确定一个三维空间。 • 二、Opencv中的函数定义 由于Opencv中都已封装好函数,变换的...

勉強 583

Subversion客户端接受服务器证书出现“The certificate hostname does not match”的问题

当使用https://形式的URL连接Apache时,Subversion客户端将会受到两个类型的响应: 1、一个服务器证书 2、一个针对客户端证书的请求 在本人的应用场景主要涉及SVN仓库迁移的操作,需要将大量的远程仓库集中迁移到本地仓库进行管理。所以这里主要描述服务器证书相关的问题,因为需要使用脚本执行Subversion的svnrdump命令,在执行的过程中碰到如下提示信息: Error v...

weixin_34235105的博客 1万+

机器人C++开源库The Robotics Library (RL)使用手册(三)

进入VS工程,我们先看看这些功能函数及其依赖库的分布关系:rl命名空间下,主要有八大模块。搞定VS后将逐个拆解。

qq_34839823的博客 1736

STM32H743+YT8512C以太网通信实战:CubeMX与LWIP配置详解

本文详细解析了基于STM32H743微控制器与YT8512C PHY芯片的以太网通信实战方案。通过CubeMX工具进行RMII接口、MPU、时钟树等关键硬件配置,并重点阐述了如何修改LWIP协议栈驱动代码以适配YT8512C芯片,解决了LAN8742驱动不兼容的问题。文章提供了从工程创建、代码适配到调试验证的完整步骤,帮助开发者快速实现稳定可靠的嵌入式网络连接。

weixin_29190573的博客 559

hostname in certificate didn't match

加上这句就ok了 inal String url = strings[0]; //得到httpclient对象 DefaultHttpClient client = new DefaultHttpClient(); //封装get请求 HttpGet hg=new HttpGet(url); ...

bobo的博客 3605

100天精通Python(爬虫篇)——第118天:selenium自动化操作浏览器基础大总结

一、Selenium框架环境搭建 1. 下载模块 2. 安装浏览器驱动WebDriver 二、基础操作 1. 打开浏览器 2. 无界面模式 3. 元素定位 4. 元素操作 5. 前进后退 6. 执行js 7.页面等待 隐式等待(常用) 显式等待(了解) 三、进阶操作 1. 使用代理ip 2. 修改请求头 3. 隐藏指纹特征.....................

努力让自己发光,对的人才能迎着光而来 10万+

爬取https页面遇到“SSLError: hostname ‘xxx‘ doesn‘t match either of”的解决方法

爬取https页面遇到“SSLError: hostname 'xxx' doesn't match either of”的解决方法

w36680130的博客 2153

【unity小技巧】新输入系统InputSystem游戏运行中改键重新绑定控制按键(最全最完美解决方案)

在游戏开发中,控制输入是至关重要的一环。Unity的新输入系统(Input System)为开发者提供了强大的工具来管理和处理用户输入,不仅支持各种平台上的多种输入设备,还能轻松处理复杂的输入操作和映射。本文将深入探讨如何使用Unity的新输入系统重新绑定控制按键,为开发者提供一套全面且完善的解决方案。

向宇的博客,专注php/web全栈 unity游戏开发,欢迎大家评论纠错 7357

解决RabbitMq登录时报出Not management user(Login failed)错误以及rabbitmqctl(RabbitMq)新增用户和用户角色权限

解决RabbitMq登录时报出Not management user(Login failed)错误以及rabbitmqctl(RabbitMq)查看用户权限、新增用户和用户角色权限。

念兮为美 7479

Puppet基础篇1-编写此系列文档的目的

2019独角兽企业重金招聘Python工程师标准>>> ...

weixin_34378969的博客 110

域适应分类:MCD论文笔记——Maximum Classifier Discrepancy for Unsupervised Domain Adaptation

域适应分类:MCD论文笔记——Maximum Classifier Discrepancy for Unsupervised Domain Adaptation

qq_50001789的博客 1005

运维最新自动化运维文章大合集_网络自动化运维文章(5),2024年最新2024年阿里Linux运维面试题精选

最近很多小伙伴找我要Linux学习资料,于是我翻箱倒柜,整理了一些优质资源,涵盖视频、电子书、PPT等共享给大家!

2401_83739821的博客 722

SIMATIC S7-1200, S7-1500 PID 控制[手册]

SIMATIC S7-1200, S7-1500 PID 控制[手册]

C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片

基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正

自动化运维工具,Linux运维线程池基础入门和简单实践以及使用技巧

最近很多小伙伴找我要Linux学习资料,于是我翻箱倒柜,整理了一些优质资源,涵盖视频、电子书、PPT等共享给大家!

2401_84140006的博客 430

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

自动化运维工具—puppet详解_puppet自动化运维(1),2024年最新你会的还只有初级Linux运维工程师的技术吗

资源定义通过向资源类型的属性赋值来实现,可称为资源类型实例化;定义了资源实例的文件即清单,manifest;……注意:type必须使用小写字符;title是一个字符串,在同一类型中必须惟一;每一个属性之间需要用“,”隔开,最后一个“,”可省略。例如,可以同时有名为nginx 的“service”资源和“package”资源,但在“package” 类型的资源中只能有一个名为“nginx”的资源。1)查看资源我们可以使用来打印有关Puppet资源类型,提供者和元参数的帮助。

2401_83620690的博客 1487

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

Puppet编程入门:详解Puppet安装步骤,零基础入门到精通,收藏这篇就够了

通过本文的详细讲解,相信您已经掌握了Puppet的安装方法。接下来,您可以进一步学习Puppet的配置和使用,提升您的DevOps技能。

Python_paipai的博客 1412

openstack资料-陈沙克整理

http://www.chenshake.com/openstack-information/ 这些资料基本都是英文,不过整理一下,方便深入研究的朋友。下面的链接,估计不翻墙,基本是看不到。网站肯定是可以访问的。改天把这些资料放到国内的网盘上,给大家下载。 Openstack最好的资料肯定是英文,推荐几个blog,这基本是我每周必看 http://www.mirantis.com/blog/...

NeverSayNever 858

puppet运维自动化原创50多个pdf分享(网站全部资料全部奉献)

puppet运维自动化50多个pdf分享(网站全部资料全部奉献)技术源于分享,懂得分享技术的人才能够学到更多的技术。为了让大家能够更好的学习和使用Puppet,本人将博客文章全部整理成PDF,方便大家学习查阅!一、 Puppet介绍2014年新增Puppet微信公众平台,欢迎各位大神交流学习如何将Puppet模块生成带有箭头关系依赖图如何从互联网获取Puppet的各项特殊资源Puppet——Luk...

weixin_34064653的博客 245

puppet 之 入门实验学习

由于在使用openstack自动化部署工具mirantis fuel的过程中,老是出现一些无缘无故的失败,比如我使用fuel 9 安装mitaka版本openstack的时候,正常安装3节点(1个controller、1个compute、1个cinder)、5节点HA(3个controller、1个compute、1个cinder),都没有问题。但是灵活部署硬件复用的...

weixin_34160277的博客 109

从角色解构到同人创作:深度解析《Re:0》暴食if线Pip Puppet形态

角色解构与同人创作是二次创作领域的核心实践,其本质在于对原有角色设定进行深度分析与重构。这一过程不仅涉及叙事逻辑的重组,更关乎角色内在动机与外在表现的统一。从技术原理上看,成功的角色解构需要建立在对原型角色核心特征的透彻理解之上,通过对比、象征与细节刻画等手法,实现角色异化后的逻辑自洽与情感张力。这种创作方法在黑暗幻想、悲剧美学等题材中具有极高的技术价值,能够极大拓展叙事的深度与表现力。在实际应用场景中,无论是文学创作、视觉设计还是多媒体制作,系统化的角色解析与创作指南都能为创作者提供清晰的路径与实用的工具

weixin_30644369的博客 309

puppet组织架构

树结构如下: |-- puppet.conf #主配置配置文件 |-- fileserver.conf #文件服务器配置文件 |-- auth.conf #认证配置文件 |-- autosign.conf # 自动验证配置文件 |-- tagmail.conf #邮件配置文件(将错误信息发...

weixin_30654583的博客 166

批量部署管理服务器的成熟方案Puppet,Func,cfengine汇总贴

http://dadloveu.blog.51cto.com/715500/659517 多台linux服务器的集中统一批量布署管理, 用什么工具最好呢? 由Linux系统中文网(Linux521.com)编辑收集整理,除Linux521注明原创文章外,其版权归原作者所有。如果您在学习中遇到问题欢迎在下面的评论中留言,我们会尽全力解答您的问题。 cfengine、 puppet、 func

ak47mig的网志(自家用,谢绝无聊斗鸡) 2500
上一篇: Restore openstack after ip address changed
下一篇: Openstack development trend
BlueSy2008
博客等级 码龄20年 26粉丝 26原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值