Ask Your Question
0

puppetdb Coult not retrieve facts [closed]

asked 2016-12-15 12:58:45 -0500

I have a new puppetserver and puppetdb on the same node.

I followed the instructions for puppetdb setup here: https://docs.puppet.com/puppetdb/4.0/...puppetmaster.html

I have also setup postgres backend as mentioned in the docs.

I have signed the certificates with

puppet cert --allow-dns-alt-names sign masternode.company.com

puppetdb ssl-setup -f

I have restarted the puppet server after the changes were made.

Questions:

    1) Why is the facts not retrieved from puppetdb?
    2) Why is the puppetdb dashboard not working? http://masternode.company.com:8080/pdb/dashboard/index.html
    3) When we are installing the puppet server and puppet db for the first time, is it something that is missing in the documentation?

Error:

#sudo puppet agent -t
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 masternode.company.com: Failed to find facts from PuppetDB at      masternode.company.com:8140: Failed to execute '/pdb/query/v4/nodes/ masternode.company.com/facts' on at least 1 of the following 'server_urls': https://masternode.company.com:8081
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Failed to execute '/pdb/cmd/v1?    checksum=9a9040e8262d915c5b49bef7a71fe1f6d4ca0946&version=5&certname= masternode.company.com&command=replace_facts' on at least 1 of the following 'server_urls': https:// masternode.company.com:8081
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Redsmile
close date 2016-12-15 17:07:03.005430

1 Answer

Sort by » oldest newest most voted
0

answered 2016-12-15 17:06:32 -0500

I got this working with the following troubleshooting steps:

Puppet master

Verify the pg_hba.conf contains md5 instead of ident for IPv4 and IPv6.

sudo vi /var/lib/pgsql/9.4/data/pg_hba.conf

Restart postgres-9.4 if there are any changes to the conf files.

sudo service postgresql-9.4 restart

Test connectivity

psql -h localhost puppetdb puppetdb

password: puppetdb

Restart puppet master

sudo service puppetserver restart

Certificate issues? Try these steps

sudo puppet cert --allow-dns-alt-names sign nodename.domain.com
sudo rm -rf /etc/puppetlabs/puppet/ssl/
sudo puppet cert sign
sudo service puppetserver restart
sudo puppet cert list –all

sudo rm -rf /etc/puppetlabs/puppetdb/ssl/
sudo puppetdb ssl-setup
sudo service puppetdb start
sudo puppet agent –t

Check the logs to make sure all is well

sudo vi /var/log/puppetlabs/puppetserver/puppetserver.log

On the Puppet agent side:

sudo rm -rf /etc/puppetlabs/puppet/ssl/
sudo puppet agent –t
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-12-15 12:58:45 -0500

Seen: 378 times

Last updated: Dec 15 '16