AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 521756
Accepted
Tuinslak
Tuinslak
Asked: 2013-07-09 15:09:43 +0800 CST2013-07-09 15:09:43 +0800 CST 2013-07-09 15:09:43 +0800 CST

Puppet:证书验证失败

  • 772

由于搞砸了,我必须重新生成客户端和服务器证书。

据我所知,主证书是自动生成的。

所以我在客户端生成了密钥:

MASTER # puppet cert clean --all
Notice: Revoked certificate with serial 2
Notice: Revoked certificate with serial 6
Notice: Removing file Puppet::SSL::Certificate puppet.x.com at '/var/lib/puppet/ssl/ca/signed/puppet.x.com.pem'
Notice: Removing file Puppet::SSL::Certificate puppet.x.com at '/var/lib/puppet/ssl/certs/puppet.x.com.pem'
Notice: Removing file Puppet::SSL::Key puppet.x.com at '/var/lib/puppet/ssl/private_keys/puppet.x.com.pem'
Notice: Removing file Puppet::SSL::Certificate efikamx-9ba3ab.x.com at '/var/lib/puppet/ssl/ca/signed/efikamx-9ba3ab.x.com.pem'
Notice: Removing file Puppet::SSL::Certificate efikamx-9ba3ab.x.com at '/var/lib/puppet/ssl/certs/efikamx-9ba3ab.x.com.pem'

puppet agent --no-daemonize  --onetime --verbose --waitforcert 60 
notice: Did not receive certificate
info: Caching certificate for efikamx-561a37.botnet.corp.flatturtle.com
err: Could not retrieve catalog from remote server: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed.  This is often because the time is out of sync on the server or client
notice: Using cached catalog
err: Could not retrieve catalog; skipping run
err: Could not send report: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed.  This is often because the time is out of sync on the server or client

MASTER # puppet cert sign --all
Notice: Signed certificate request for efikamx-9ba3ab.x.com
Notice: Removing file Puppet::SSL::CertificateRequest efikamx-9ba3ab.x.com at '/var/lib/puppet/ssl/ca/requests/efikamx-9ba3ab.x.com.pem'

CLIENT # puppet agent -t
info: Caching certificate for efikamx-9ba3ab.x.com
err: Could not retrieve catalog from remote server: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: 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: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed.  This is often because the time is out of sync on the server or client

在你问之前,是的,ntp 正在运行并且两个客户端都有正确的时间。

清除两端所有证书并正确重新生成所有内容的正确方法是什么?

我跑过:

find /var/lib/puppet -type f -print0 |xargs -0r rm

和

rm -rf /var/lib/puppet/ssl/*

在客户端上,但这并没有帮助。

顺便说一句,这是 Puppet 2 和 Puppet 3 的混合体。

puppet
  • 1 1 个回答
  • 22280 Views

1 个回答

  • Voted
  1. Best Answer
    Tuinslak
    2013-07-09T15:54:58+08:002013-07-09T15:54:58+08:00

    显然问题在于Apache仍在运行(因此通过Passenger产生了一个傀儡大师)。

    MASTER /etc/apache2/sites-enabled # /etc/init.d/apache2 stop
    [ ok ] Stopping web server: apache2 ... waiting .
    MASTER /etc/apache2/sites-enabled # puppet cert clean --all
    Notice: Revoked certificate with serial 2
    Notice: Removing file Puppet::SSL::Certificate puppet.x at '/var/lib/puppet/ssl/ca/signed/puppet.x.pem'
    Notice: Removing file Puppet::SSL::Certificate puppet.x at '/var/lib/puppet/ssl/certs/puppet.x.pem'
    Notice: Removing file Puppet::SSL::Key puppet.x at '/var/lib/puppet/ssl/private_keys/puppet.x.pem'
    MASTER /etc/apache2/sites-enabled # puppet master --no-daemonize --verbose
    Info: Creating a new SSL key for puppet.x
    Info: Creating a new SSL certificate request for puppet.x
    Info: Certificate Request fingerprint (SHA256): DB:8C:2D:71:54:C4:B7:03:79:38:E2:26:94:51:12:89:6F:E0:24:AC:F2:16:C0:5A:7A:B6:7D:4F:DD:6C:98:0D
    Notice: puppet.x has a waiting certificate request
    Notice: Signed certificate request for puppet.x
    Notice: Removing file Puppet::SSL::CertificateRequest puppet.x at '/var/lib/puppet/ssl/ca/requests/puppet.x.pem'
    Notice: Removing file Puppet::SSL::CertificateRequest puppet.x at '/var/lib/puppet/ssl/certificate_requests/puppet.x.pem'
    Notice: Starting Puppet master version 3.1.1
    ^CNotice: Caught INT; calling stop
    MASTER /etc/apache2/sites-enabled # /etc/init.d/apache2 restart
    [ ok ] Restarting web server: apache2.
    MASTER /etc/apache2/sites-enabled # puppet cert sign --all
    Notice: Signed certificate request for efikamx-561a37.x
    Notice: Removing file Puppet::SSL::CertificateRequest efikamx-561a37.x at '/var/lib/puppet/ssl/ca/requests/efikamx-561a37.x.pem'
    

    现在我可以在客户端上正确生成并签署密钥:

    CLIENT ~ # rm -rf /var/lib/puppet/ssl/*
    CLIENT ~ # puppet agent -t
    info: Creating a new SSL key for efikamx-9ba3ab.x.com
    info: Caching certificate for ca
    info: Creating a new SSL certificate request for efikamx-9ba3ab.x.com
    info: Certificate Request fingerprint (md5): 8C:9E:6E:95:B8:70:B9:A2:98:CB:A5:87:BC:66:33:A4
    Exiting; no certificate found and waitforcert is disabled
    CLIENT ~ # puppet agent --no-daemonize  --onetime --verbose --waitforcert 60
    info: Caching certificate for efikamx-9ba3ab.x.com
    info: Caching certificate_revocation_list for ca
    info: Caching catalog for efikamx-9ba3ab.x.com
    info: Applying configuration version '1373327419'
    notice: /Stage[essential]/Efikamx-repository/File[/etc/apt/sources.list.d/multistrap-stable.list]/content: content changed '{md5}fbba0743add1cb9e54f7484b2c7a1f59' to '{md5}5941829a1b3a18b02f5bd6367e36e635'
    [...]
    
    • 6

相关问题

  • 如何修复 Puppet 完全限定的参数路径错误?

  • puppet:修改配置文件后强制重启服务

  • 木偶模块资源

  • 傀儡主机名问题

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve