PuppetDB配置不工作

PuppetDB配置不工作,puppet,Puppet,我正在尝试在同一个puppet主服务器上配置puppetDB。我遵循puppet文档,安装了数据库,并将puppet配置为使用数据库 当我运行puppet代理--test命令时,会给出下面的错误消息 我没有看到任何进程在端口8081上运行,我看到puppet java进程在端口8140上运行 如何解决此错误 Warning: Unable to fetch my node definition, but the agent run will continue: Warning: Error 50

我正在尝试在同一个puppet主服务器上配置puppetDB。我遵循puppet文档,安装了数据库,并将puppet配置为使用数据库

当我运行
puppet代理--test
命令时,会给出下面的错误消息

我没有看到任何进程在端口8081上运行,我看到puppet java进程在端口8140上运行

如何解决此错误

Warning: Unable to fetch my node definition, but the agent run will continue:
Warning: Error 500 on SERVER: Server Error: Could not retrieve facts for webserver: Failed to find facts from PuppetDB at puppet:8140: Failed to execute '/pdb/query/v4/nodes/webserver/facts' on at least 1 of the following 'server_urls': https://puppetdb:8081
Info: Retrieving pluginfacts
Info: Retrieving plugin
Warning: Error connecting to puppetdb on 8081 at route /pdb/query/v4/nodes/webserver/facts, error message received was 'Connection refused - connect(2) for "puppetdb" port 8081'. Failing over to the next PuppetDB server_url in the 'server_urls' list
Error: Cached facts for webserver failed: Failed to find facts from PuppetDB at puppet:8140: Failed to execute '/pdb/query/v4/nodes/webserver/facts' on at least 1 of the following 'server_urls': https://puppetdb:8081
Info: Loading facts
Info: Caching facts for webserver
Warning: Error connecting to puppetdb on 8081 at route /pdb/cmd/v1?checksum=039e22c7bf98e9cbf2f08169047d288c9b451c73&version=5&certname=webserver&command=replace_facts, error message received was 'Connection refused - connect(2) for "puppetdb" port 8081'. Failing over to the next PuppetDB server_url in the 'server_urls' list
Error: Failed to execute '/pdb/cmd/v1?checksum=039e22c7bf98e9cbf2f08169047d288c9b451c73&version=5&certname=webserver&command=replace_facts' on at least 1 of the following 'server_urls': https://puppetdb:8081
Error: Could not retrieve local facts: Failed to execute '/pdb/cmd/v1?checksum=039e22c7bf98e9cbf2f08169047d288c9b451c73&version=5&certname=webserver&command=replace_facts' on at least 1 of the following 'server_urls': https://puppetdb:8081
Error: Failed to apply catalog: Could not retrieve local facts: Failed to execute '/pdb/cmd/v1?checksum=039e22c7bf98e9cbf2f08169047d288c9b451c73&version=5&certname=webserver&command=replace_facts' on at least 1 of the following 'server_urls': https://puppetdb:8081

由于某种原因,puppetdb进程停止运行,这就是为什么端口8081上没有进程运行的原因。我重新启动了puppetdb进程,然后
agent-test
命令声明连接到Web服务器

以下是centos 7中puppetdb服务的输出

# systemctl status puppetdb
● puppetdb.service - puppetdb Service
   Loaded: loaded (/usr/lib/systemd/system/puppetdb.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2017-03-28 18:26:58 EDT; 1h 20min ago
 Main PID: 5503 (java)
   CGroup: /system.slice/puppetdb.service
           └─5503 /usr/bin/java -Xmx192m -Djava.security.egd=/dev/urandom -XX:OnOutOfMemoryError=kill -9 %p -cp /opt/puppetlabs/...

希望您检查了存储在
/etc/puppetlabs/puppetdb/SSL
中的SSL证书是否与
/etc/puppetlabs/puppet/SSL/certs/
匹配

这可以通过以下方式进行验证:

puppetdb ssl设置 样本条目

puppetdb ssl-setup

PEM files in /etc/puppetlabs/puppetdb/ssl already exists, checking integrity.
Setting ssl-host in /etc/puppetlabs/puppetdb/conf.d/jetty.ini already correct.
Setting ssl-port in /etc/puppetlabs/puppetdb/conf.d/jetty.ini already correct.
Setting ssl-key in /etc/puppetlabs/puppetdb/conf.d/jetty.ini already correct.
Setting ssl-cert in /etc/puppetlabs/puppetdb/conf.d/jetty.ini already correct.
如果您还有其他问题,请告诉我。我也遇到了同样的问题,并通过删除
/etc/puppetlabs/puppetdb/ssl
目录并重新运行“
puppetdb ssl setup
”命令进行了纠正