【问题标题】:Unable to sign certificate.无法签署证书。
【发布时间】:2015-07-13 19:06:49
【问题描述】:

我正在尝试使用木偶。我启动了 2 个在 linuxmint 17 上运行的 VM。我打算将一个作为 puppetmaster,一个作为 puppetclient。我按照这个指南https://help.ubuntu.com/12.04/serverguide/puppet.html

在 /etc/主机名中 在 /etc/hosts 掌握: 127.0.0.1 localhost /// 没有机会 127.0.1.1 傀儡师 // 192.168.75.141 puppetclient //这个客户端在nm-tool搜索后的ip地址。

客户: 127.0.0.1 本地主机 127.0.1.1 puppetclient 192.168.75.142 puppetmaster //这是master的ip地址

在客户端和主机中,我在 etc/puppet/manifests/site.pp 中创建了一个文件

package {
    'apache2':
        ensure => installed
}

service {
    'apache2':
        ensure => true,
        enable => true,
        require => Package['apache2']
}

在 master 中,我在 /etc/puppet/manifests/nodes.pp 中创建了一个文件

  node 'meercat02.example.com' {
         include apache2
}

在客户端中,我创建了一个文件 /etc/default/puppet 并放入 START=yes。 以下是我认为有问题的地方。在指南中,该文件应该已经存在,但就我而言,我必须创建它。

然后我按照指南中的所有内容签署了客户端证书。我在 puppetmaster 的终端中输入了sudo puppetca --sign puppetclient。那没有用,我在另一篇文章中找到了解决方案。 https://serverfault.com/questions/457349/installed-puppetmaster-but-why-do-i-get-puppetca-command-not-found。所以在阅读完帖子后,我输入了sudo puppet cert list --sign 'puppetclient'。然后它给了我这个

Notice: Signed certificate request for ca
Error: Could not find certificates request for list

在谷歌搜索的前五页之后,我最终来到这里寻求帮助。 =) 任何人都可以帮我解决这个问题吗?谢谢。

【问题讨论】:

    标签: puppet linux-mint


    【解决方案1】:

    在有证书请求之前,您不能签署证书。

    你必须先建立代理/主通信。

    找出你的主人的证书名称

    puppet master --configprint certname
    

    在代理节点上,确保名称解析为主节点的 IP 地址(您当前为此使用了 puppetmaster,这可能就足够了)。

    向master发送初始请求

    在代理节点上执行此操作。

    puppet agent --test --master=<name you just registered>
    

    代理生成一个 CSR,并打印一条它无法接收证书的消息。

    签署证书

    在主人身上:

    puppet cert list
    

    找到您的代理的 CSR,然后

    puppet cert sign <agent>
    

    下一个puppet agent --test 调用将收到证书。

    【讨论】:

    • ^ 谢谢。我对应该放置 puppet agent --test --master= 有点困惑。我输入了 puppet agent --test --puppetmaster.localdomain。还是不行。
    • --master=puppetmaster.localdomain.
    【解决方案2】:

    试试这个

    puppet agent --test master="name you just register"
    

    它对我有用。

    【讨论】:

      猜你喜欢
      • 2017-12-24
      • 1970-01-01
      • 2016-11-24
      • 2017-11-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-11-27
      • 2010-11-05
      相关资源
      最近更新 更多