Ask Your Question
0

PuppetDB install gone wrong

asked 2017-06-02 00:18:41 -0500

andrew91 gravatar image

Hello newbie here. I'm trying to troubleshoot a puppetDB that I have just installed using the module puppetdb from the puppet forge.

puppet master = puppet-dev (has class puppetdb assigned to it)

puppetDB and PostgreSQL = puppetdb (has class puppetdb::master::config assigned)

showing DNS is resolving.

[root@puppet-dev puppetlabs]# host puppetdb

puppetdb.esxi.com has address 192.168.0.19

I can telnet into the server using port 8081 from the puppet master server:

[root@puppet-dev puppetlabs]# telnet puppetdb 8081 Trying 192.168.0.19... Connected to puppetdb. Escape character is '^]'. ^CConnection closed by foreign host.

I'm unable to run "puppet agent -t" when I have the puppet.conf file with the following contents and also puppetdb.conf in place.

puppet.conf:

[master] authsign = true

storeconfigs = true

storeconfigs_backend = puppetdb

puppetdb.conf

[main]

server_urls = https://puppetdb.esxi.com:8081

Running puppet agent -t

[root@puppet-dev puppetlabs]# 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 puppet-dev.esxi.com: Failed to find facts from PuppetDB at puppet:8140: Failed to execute '/pdb/query/v4/nodes/puppet-dev.esxi.com/facts' on at least 1 of the following 'serverurls': https://puppetdb.esxi.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=170d62f685eeacc8fffc76fac223918d72342c3d&version=5&certname=puppet-dev.esxi.com&command=replacefacts&producer-timestamp=1496377992' on at least 1 of the following 'server_urls': https://puppetdb.esxi.com:8081 Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run

edit retag flag offensive close merge delete

Comments

I think you are using wrong classes for the nodes https://docs.puppet.com/puppetdb/4.4/install_via_module.html

c4f4t0r gravatar imagec4f4t0r ( 2017-06-03 06:04:09 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2017-06-06 09:47:42 -0500

I'm trying to fix the same issue, I got since I updated my Puppet server.

I suspect Puppet master and PuppetDB are not compatible together :

[root@puppet ~]# rpm -qa puppet\* puppetserver-2.7.2-1.el7.noarch puppetdb-termini-4.4.0-1.el7.noarch puppetlabs-release-pc1-1.1.0-5.el7.noarch puppetdb-4.3.0-1.el7.noarch puppet-agent-1.10.1-1.el7.x86_64

I would like to have PuppetDB 4.4 instead of 4.3, so here what I did to fix this issue :

  • I downloaded the RPM (I'm working on CentOS 7.3)

[root@puppet ~]# cd /tmp

[root@puppet tmp]# curl -O https://yum.puppetlabs.com/el/7Server/PC1/x86_64/puppetdb-4.4.0-1.el7.noarch.rpm

  • I updated manually PuppetDB

[root@puppet tmp]# rpm -Uvh puppetdb-4.4.0-1.el7.noarch.rpm

And this issue was fixed !

edit flag offensive delete link more
0

answered 2017-06-03 07:37:55 -0500

andrew91 gravatar image

@c4f4t0r

I think I may have just accidentally put that in the wrong spot ( I was half asleep when putting this together lol). They are using the correct classes:

               node 'puppet-dev' {
class { 'puppetdb::master::config':
  puppetdb_server => 'puppetdb',
  puppetdb_port   => 8081,
  }
}

node 'puppetdb' {
class { 'puppetdb':
    listen_address => '0.0.0.0',
    open_listen_port => true,
  }
}

I believe the issue was something with the SSL (unable to successfully 'curl -k https://puppetdb.esxi.com:8081') - I did change my hostname after having the class applied, so maybe that had something to do with it. I also noticed that stopping iptables helped out a lot. I've started from scratch again and looks like everything went smooth this time except now I'm unable to get iptables to play nice with puppetdb - doesn't seem to want to open port 8081/tcp.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-06-02 00:18:41 -0500

Seen: 92 times

Last updated: Jun 06