puppdb connection refused

209 views
Skip to first unread message

Raj kumar V

unread,
Nov 15, 2013, 11:31:42 AM11/15/13
to puppet...@googlegroups.com
Agent fails with the following error. I changed the jetty.ini file to 0.0.0.0 and still the same. I restart puppetdb alone after this...what am i missing?

[root@nfaxen-cent1 ~]# puppet agent --test
Warning: Unable to fetch my node definition, but the agent run will continue:
Warning: Error 400 on SERVER: Could not retrieve facts for nfaxen-cent1: Failed to find facts from PuppetDB at nfaxen-ubu1:8081: Connection refused - connect(2)
Info: Retrieving plugin
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/windows.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/iptables_persistent_version.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/facter_dot_d.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/ip6tables_version.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/pe_version.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/custom_auth_conf.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/iptables_version.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/puppet_vardir.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/postgres_default_version.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/root_home.rb
Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/puppetdb_server_status.rb
Info: Loading facts in /var/opt/lib/pe-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 nfaxen-cent1 to PuppetDB at nfaxen-ubu1:8081: Connection refused - connect(2)
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
[root@nfaxen-cent1 ~]# 

[jetty]
# Hostname or IP address to listen for clear-text HTTP.  Default is localhost
# host = <host>
host = 0.0.0.0

# Port to listen on for clear-text HTTP.
port = 8080


# The following are SSL specific settings. They can be configured
# automatically with the tool puppetdb-ssl-setup, which is normally
# ran during package installation.

# The host or IP address to listen on for HTTPS connections
ssl-host = 0.0.0.0

# The port to listen on for HTTPS connections
ssl-port = 8081

# Private key path
ssl-key = /etc/puppetlabs/puppetdb/ssl/private.pem

# Public certificate path
ssl-cert = /etc/puppetlabs/puppetdb/ssl/public.pem

# Certificate authority path
ssl-ca-cert = /etc/puppetlabs/puppetdb/ssl/ca.pem
certificate-whitelist = /etc/puppetlabs/puppetdb/certificate-whitelist
~                                                      


 

Ken Barber

unread,
Nov 15, 2013, 11:37:54 AM11/15/13
to Puppet Users
Is the process running?

# ps auxw | grep java

And is it listening?

# netstat -anp | grep 8081

The output of both of those commands would be helpful to see.

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 view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/6f3a646f-b40c-4960-a12a-da5963151f60%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Raj kumar V

unread,
Nov 15, 2013, 11:45:19 AM11/15/13
to puppet...@googlegroups.com
yes it is.

cp6       0      0 :::8081                 :::*                    LISTEN      3187/java   

Actually do you how to re initilize puppet db ssl.

Some old post says:  we solved the problem. removed all files from /etc/puppetdb/ssl and 
> ran /usr/sbin/puppetdb-ssl-setup. 

But I cannot find  /usr/sbin/puppetdb-ssl-setup. Mine is Ubuntu.

Ken Barber

unread,
Nov 15, 2013, 11:52:38 AM11/15/13
to Puppet Users
> yes it is.
>
> cp6 0 0 :::8081 :::* LISTEN
> 3187/java

Okay ... so lets delve deeper into the original error then:

> Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to submit 'replace facts' command for nfaxen-cent1 to PuppetDB at nfaxen-ubu1:8081: Connection refused - connect(2)

The problem is that its trying to connect to nfaxen-ubu1 on port 8081.
So does this address resolve correctly to localhost or the IP address
of the PuppetDB instance? The results of this would help:

# telnet nfaxen-ubu1 8081
# host nfaxen-ubu1

To me it seems like your process is running and listening, but that
hostname might not resolve to what you think it does - hence the
connection refused message. Double check your DNS and/or /etc/hosts.

> Actually do you how to re initilize puppet db ssl.
>
> Some old post says: we solved the problem. removed all files from
> /etc/puppetdb/ssl and
>> ran /usr/sbin/puppetdb-ssl-setup.
>
> But I cannot find /usr/sbin/puppetdb-ssl-setup. Mine is Ubuntu.

# /usr/sbin/puppetdb-ssl-setup -f

If it can't be found, either a) the package isn't installed correctly
or b) you're on the wrong box. We definitely package that script in
our package: dpkg -L puppetdb | grep ssl-setup might help you here.

ken.

Raj kumar V

unread,
Nov 16, 2013, 3:38:28 AM11/16/13
to puppet...@googlegroups.com
2 things. I dont know which one solved it.

I dont know why I have to give the fqdn name in the jetty.ini file for the ssl host

I ran the puppetdb ssl from /opt/puppet/sbin/puppetdb-ssl-setup . Dont know why it is in opt dir
Reply all
Reply to author
Forward
0 new messages