> Just started using PuppetDB (using the Puppetlabs' module) and getting
> issues with connection. First it was giving me server Not Found:
>
>> Error: Unable to connect to puppetdb server (puppet.internal:8081): [404]
>> Not Found
>> Notice: Failed to connect to puppetdb; sleeping 2 seconds before retry
>> ....
>> ....
>> Error: Unable to connect to puppetdb server (puppet.internal:8081): [404]
>> Not Found
>> Notice: Failed to connect to puppetdb within timeout window of 15 seconds;
>> giving up.
>> Error: Unable to connect to puppetdb server! (puppet.internal:8081)
>> Error:
>> /Stage[main]/Puppetdb::Master::Config/Puppetdb_conn_validator[puppetdb_conn]/ensure:
>> change from absent to present failed: Unable to connect to puppetdb server!
>> (puppet.internal:8081)

This has retried to connect a few times then given up because of ...

> since then, I'm still getting eventually the same error but with different
> Notice:
>
>> Warning: Puppet::Util::SUIDManager.run_and_capture is deprecated; please
>> use Puppet::Util::Execution.execute instead.
>>    (at
>> /vagrant/VagrantConf/modules/postgresql/lib/puppet/provider/postgresql_psql/ruby.rb:57:in
>> `run_sql_command')
>> Notice:
>> /Stage[main]/Puppetdb::Server::Jetty_ini/Ini_setting[puppetdb_sslhost]/value:
>> value changed '0.0.0.0' to 'puppet.internal'
>> Info: Class[Puppetdb::Server::Jetty_ini]: Scheduling refresh of
>> Service[puppetdb]
>> Notice: /Stage[main]/Puppetdb::Server/Service[puppetdb]: Triggered
>> 'refresh' from 1 events
>> Notice: Unable to connect to puppetdb server (puppet.internal:8081):
>> #<Errno::ECONNREFUSED: Connection refused - connect(2)>
>> Notice: Failed to connect to puppetdb; sleeping 2 seconds before retry
>> ....
>> ....
>> Notice: Unable to connect to puppetdb server (puppet.internal:8081):
>> #<Errno::ECONNREFUSED: Connection refused - connect(2)>
>> Notice: Failed to connect to puppetdb within timeout window of 15 seconds;
>> giving up.
>> Error: Unable to connect to puppetdb server! (puppet.internal:8081)
>> Error:
>> /Stage[main]/Puppetdb::Master::Config/Puppetdb_conn_validator[puppetdb_conn]/ensure:
>> change from absent to present failed: Unable to connect to puppetdb server!
>> (puppet.internal:8081)
>
>
> Can anyone explain to me what actually going on/wrong please? Why it was
> "Not Found" before and now "Unable to connect"? Any help/pointer would be
> much appreciated. Best!

... connection refused. This is the key error. Its a common TCP error,
and is something all administrators should know, because it doesn't
just affect PuppetDB.

What it means is that the hostname and port the client is trying to
connect to, in this case puppet.internal and 8081 respectively, is
either not the correct host or port, PuppetDB is not listening
correctly to this host or port because it is down or misconfigured or
some firewall is rejecting the connection (less likely, but worth
noting).

So what you need to check:

* From your puppet master try telnetting into the port and show your
results. "telnet puppet.internal 8081"
* Check that the PuppetDB instance is really listening on port 8081
and on a public interface on that host, you can usually check this
with netstat -anp | grep 8081 on the PDB host. Provide the results in
the thread if you can.
* Check the settings in your /etc/puppetdb/conf.d/jetty.ini, and
ensure that ssl-host is set to something like 0.0.0.0 to listen on all
interfaces. You can always refine this once you have it working, but
this is the recommend base setting. If you change it, restart
PuppetDB.
* Check that the PuppetDB java process is running also. "ps auxww |
grep java" is a good start, provide the results if you like in thread.
* Ensure that the hostname 'puppet.internal' resolves to what you
think it does. A large amount of these errors are due to assumptions
about what hostnames resolve to ... it must resolve to the IP that
PuppetDB is listening on. Check /etc/hosts on your puppet master ...

Let me know how you go.

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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAE4bNTkPLDBb7fNAhQBWvpFsn8%3Db6Z6gi2zKhyGddpZc18pJmQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to