>> When I have a look at the logs  I see that I'm getting password
>> authentication failures for the puppetdb user:
>>
>> [root@puppet:/etc/puppet] #tail -30 /var/log/puppetdb/puppetdb.log
>> 2014-10-05 16:25:36,339 ERROR [c.j.b.h.AbstractConnectionHook] Failed to
>> acquire connection Sleeping for 7000ms and trying again. Attempts left: 1.
>> Exception: null
>> 2014-10-05 16:25:43,340 ERROR [c.j.b.PoolWatchThread] Error in trying to
>> obtain a connection. Retrying in 7000ms
>> org.postgresql.util.PSQLException: FATAL: password authentication failed for
>> user "puppetdb"
>>
>> .........
>>
>>
>> This is what I have in my /etc/puppetdb/conf.d/database.ini
>>
>> [database]
>> classname = org.postgresql.Driver
>> subprotocol = postgresql
>> subname = //127.0.0.1:5432/puppetdb
>> username = puppetdb
>> password = secret
>> log-slow-statements = 10
>>
>>
>> Yet when I try to log into the postgres database using those credentials I
>> get no error:
>>
>> [root@puppet:~] #su - postgres
>> -bash-4.1$ psql -h 127.0.0.1 -p 5432 -U puppetdb -W puppetdb
>> Password for user puppetdb:
>> psql (8.4.20)
>> Type "help" for help.
>>
>> puppetdb=>
>
> So this might potentially be a problem with your pg_hba.conf, I'm
> guessing though.
>
> Try the above again, but as the root user, not as postgres, and show
> us the results.
>
> Here is my pg_hba.conf fwiw:
> https://gist.github.com/kbarber/0fd98ec424687c1bea9d. Send us yours
> and we can take a look.

Having said this, and actually tested my theory myself, I don't
believe this is the case - but worth looking into. When I tested
'breaking' my pg_hba.conf I get this result specifically:

2014-10-04 11:52:53,300 ERROR [c.j.b.h.AbstractConnectionHook] Failed
to acquire connection Sleeping for 7000ms and trying again. Attempts
left: 5. Exception: null
2014-10-04 11:53:00,310 ERROR [c.j.b.h.AbstractConnectionHook] Failed
to acquire connection Sleeping for 7000ms and trying again. Attempts
left: 4. Exception: null
2014-10-04 11:53:07,320 ERROR [c.j.b.h.AbstractConnectionHook] Failed
to acquire connection Sleeping for 7000ms and trying again. Attempts
left: 3. Exception: null
2014-10-04 11:53:14,330 ERROR [c.j.b.h.AbstractConnectionHook] Failed
to acquire connection Sleeping for 7000ms and trying again. Attempts
left: 2. Exception: null
2014-10-04 11:53:21,341 ERROR [c.j.b.h.AbstractConnectionHook] Failed
to acquire connection Sleeping for 7000ms and trying again. Attempts
left: 1. Exception: null
2014-10-04 11:53:28,347 ERROR [c.j.b.PoolWatchThread] Error in trying
to obtain a connection. Retrying in 7000ms
org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for
host "192.168.182.132", user "puppetdb", database "puppetdb", SSL off
at 
org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:398)
~[puppetdb.jar:na]
at 
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:173)
~[puppetdb.jar:na]
at 
org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:64)
~[puppetdb.jar:na]
at 
org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:136)
~[puppetdb.jar:na]

Which is very specific, and definitely not a password auth error. Hmm.
Of course this is with 9.3, there is a chance the protocol has
changed.

I know it probably seems very dumb at this point, but have you tried
changing your password for the puppetdb user to something simple ...
and trying again?

http://www.postgresql.org/docs/8.4/static/sql-alteruser.html

I'm not saying you're typing the password incorrectly or anything, but
the process of changing the password for the `puppetdb` pg user might
shake something up. I'm really grasping at straws, an incorrect
password error is usually just that ... but your tests don't align
with this potentiality :-). I guess what I'm saying is that it feels
like something really silly that we are missing.

Still, try the `psql` auth test as root as I mentioned, pass us your
pg_hba.conf, you never know it might also shake something up that we
didn't notice before.

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/CAE4bNTkzErKhRLjVPqB%3D_tp%2BLm5TkudiyAWrJ0OsFypQ6fmNiw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to