Trouble connect to PuppetDB

2,710 views
Skip to first unread message

Pablo Carranza

unread,
Aug 5, 2013, 3:34:47 PM8/5/13
to puppet...@googlegroups.com
Greetings:

I'm having trouble connecting to PuppetDB. When I execute sudo puppet agent --test on a client node, I receive the following:

Warning: Unable to fetch my node definition, but the agent run will continue:
Warning: Error 400 on SERVER: Could not retrieve facts for web1.mydomain.tld: Failed to find facts from PuppetDB at db1.mydomain.tld:8081: Connection refused - connect(2)
Info: Retrieving plugin
Info: Loading facts in /var/lib/puppet/lib/facter/concat_basedir.rb
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to submit 'replace facts' command for web1.mydomain.tld to PuppetDB at db1.mydomain.tld:8081: Connection refused - connect(2)
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

From my home computer (WinXP), I opened a command prompt and was unsuccessful in establishing a telnet connection; in trying to establish one via both the PuppetDB's FQDN and IP address.

Other than the UFW on db1, what else could be blocking access to port 8081?

Ken Barber

unread,
Aug 5, 2013, 3:41:13 PM8/5/13
to Puppet Users
Check your /etc/puppetdb/conf.d/jetty.ini file for the configuration
items ssl-host & host. These should both be set to the IP address you
want PuppetDB to listen on, or 0.0.0.0 for all IP addresses. This is
probably set to 127.0.0.1 or something now, which might explain why
PuppetDB is not listening on that external IP and port.

ken.
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users...@googlegroups.com.
> To post to this group, send email to puppet...@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Pablo Carranza

unread,
Aug 5, 2013, 4:26:54 PM8/5/13
to puppet...@googlegroups.com
Ken... you are a genius! I, for some reason, had entered the PuppetDB's FQDN in there. The manual, found here, reads:

host
This sets the hostname to listen on for unencrypted HTTP traffic. If not supplied, we bind to localhost, which will reject connections from anywhere but the PuppetDB server itself. To listen on all available interfaces, use 0.0.0.0.
...
ssl-host
This sets the hostname to listen on for encrypted HTTPS traffic. If not supplied, we bind to localhost. To listen on all available interfaces, use 0.0.0.0.

It'd probably be helpful to incorporate Ken's magical words "These should both be set to the IP address you want PuppetDB to listen on...."  (emphasis added.) Just a thought!

Thanks, again!

-Pablo
Reply all
Reply to author
Forward
0 new messages