Puppet7 代理无法从服务器找到目录
Puppet7 agent can't find catalog from server
我正在学习 Puppet。一切对我来说都是新的......在我的两个学习虚拟机上安装了 puppet7 服务器和代理之后--
192.168.160.131 puppet-mst.eisen #puppet服务器
192.168.160.140 sles12.eisen #傀儡代理
我已经成功地将节点“sles12.eisen”签名到服务器“puppet-mst.eisen”--
[root@puppet-mst manifests]# puppetserver --version
puppetserver version: 7.4.1
[root@puppet-mst manifests]# puppetserver ca list --all
Signed Certificates:
puppet-mst.eisen (SHA256) 0B:3F:DA:60:2F:2D:D3:91:94:58:E2:B6:32:28:50:8E:D4:1C:A0:8F:A0:CF:94:99:6E:EE:99:46:B4:1D:30:58 alt names: ["DNS:puppet-mst.eisen"] authorization extensions: [pp_cli_auth: true]
puppet-mst (SHA256) C8:89:47:D2:15:74:6E:49:E7:9A:27:B5:EA:10:9B:81:C4:DC:68:E8:B4:01:07:5D:63:34:5A:AF:B6:66:C9:EE alt names: ["DNS:puppet-mst"]
sles12.eisen (SHA256) C5:40:D7:8A:C6:64:BD:E8:BF:D3:BB:5D:01:24:66:03:57:96:84:31:84:42:DF:36:AA:D1:25:14:76:4D:A5:99 alt names: ["DNS:sles12.eisen"]
然后我写了一个测试模块--filetest1,希望能把文件放到/tmp/puppettest的agent节点--
[root@puppet-mst manifests]# cat /etc/puppetlabs/code/environments/production/modules/filetest1/manifests/init.pp
class filetest1{
file {'/tmp/puppettest/filetest1':
ensure => file,
content => 'Hello World!',
}
}
[root@puppet-mst manifests]# cat /etc/puppetlabs/code/environments/production/manifests/site.pp
node 'sles12.eisen'{
include filetest1
}
但是“puppet agent --test”无法运行,据说是服务器找不到代理节点,或者测试模块目录丢失--
sles12:/tmp/puppettest # puppet --version
7.12.0
sles12:/tmp/puppettest # hostname -f
sles12.eisen
sles12:/tmp/puppettest # puppet agent --test --verbose
Info: Using environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Failed when searching for node sles12.eisen: Failed to find sles12.eisen via exec: Execution of '/etc/puppetlabs/puppet/node.rb sles12.eisen' returned 1:
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
我不知道这里出了什么问题。请善意的帮助。谢谢
问候
艾森
错误消息表明您已将 Puppet 配置为使用 external node classifier (/etc/puppetlabs/puppet/node.rb
),并且执行它的尝试完全失败,或者它以失败状态终止,或者它没有输出任何东西。
您以后可能想探索 ENC,但现在可能不是这样做的时候。要禁用 ENC,请编辑 /etc/puppetlabs/puppet/puppet.conf
并删除 node_terminus
设置或将其值更改为 plain
。
我正在学习 Puppet。一切对我来说都是新的......在我的两个学习虚拟机上安装了 puppet7 服务器和代理之后-- 192.168.160.131 puppet-mst.eisen #puppet服务器 192.168.160.140 sles12.eisen #傀儡代理 我已经成功地将节点“sles12.eisen”签名到服务器“puppet-mst.eisen”--
[root@puppet-mst manifests]# puppetserver --version
puppetserver version: 7.4.1
[root@puppet-mst manifests]# puppetserver ca list --all
Signed Certificates:
puppet-mst.eisen (SHA256) 0B:3F:DA:60:2F:2D:D3:91:94:58:E2:B6:32:28:50:8E:D4:1C:A0:8F:A0:CF:94:99:6E:EE:99:46:B4:1D:30:58 alt names: ["DNS:puppet-mst.eisen"] authorization extensions: [pp_cli_auth: true]
puppet-mst (SHA256) C8:89:47:D2:15:74:6E:49:E7:9A:27:B5:EA:10:9B:81:C4:DC:68:E8:B4:01:07:5D:63:34:5A:AF:B6:66:C9:EE alt names: ["DNS:puppet-mst"]
sles12.eisen (SHA256) C5:40:D7:8A:C6:64:BD:E8:BF:D3:BB:5D:01:24:66:03:57:96:84:31:84:42:DF:36:AA:D1:25:14:76:4D:A5:99 alt names: ["DNS:sles12.eisen"]
然后我写了一个测试模块--filetest1,希望能把文件放到/tmp/puppettest的agent节点--
[root@puppet-mst manifests]# cat /etc/puppetlabs/code/environments/production/modules/filetest1/manifests/init.pp
class filetest1{
file {'/tmp/puppettest/filetest1':
ensure => file,
content => 'Hello World!',
}
}
[root@puppet-mst manifests]# cat /etc/puppetlabs/code/environments/production/manifests/site.pp
node 'sles12.eisen'{
include filetest1
}
但是“puppet agent --test”无法运行,据说是服务器找不到代理节点,或者测试模块目录丢失--
sles12:/tmp/puppettest # puppet --version
7.12.0
sles12:/tmp/puppettest # hostname -f
sles12.eisen
sles12:/tmp/puppettest # puppet agent --test --verbose
Info: Using environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Failed when searching for node sles12.eisen: Failed to find sles12.eisen via exec: Execution of '/etc/puppetlabs/puppet/node.rb sles12.eisen' returned 1:
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
我不知道这里出了什么问题。请善意的帮助。谢谢
问候 艾森
错误消息表明您已将 Puppet 配置为使用 external node classifier (/etc/puppetlabs/puppet/node.rb
),并且执行它的尝试完全失败,或者它以失败状态终止,或者它没有输出任何东西。
您以后可能想探索 ENC,但现在可能不是这样做的时候。要禁用 ENC,请编辑 /etc/puppetlabs/puppet/puppet.conf
并删除 node_terminus
设置或将其值更改为 plain
。