puppetdb module postgres connection failed

asked 2015-06-29 02:45:37 -0600

czerwe gravatar image

Hi,

i am running an puppetmaster 3.7.5 open source. I applied the puppetlabs-puppetdb module version 4.3.0 and puppetlabs-postgresql version 4.3.0.

I am including puppetdb like this:

  class{'puppetdb':
     ssl_set_cert_paths  => false,
     ssl_listen_address  => '0.0.0.0',
     ssl_deploy_certs    => false,
  }
  include puppetdb::master::config

the puppet run shows following error:

Notice: /Stage[main]/Postgresql::Server::Service/Postgresql::Validatedbconnection[validateserviceisrunning]/Exec[validate postgres connection for @:5432/postgres]/returns: Unable to connect to defined database using: /usr/bin/psql --tuples-only --quiet -p 5432 --dbname postgres Error: echo 'Unable to connect to defined database using: /usr/bin/psql --tuples-only --quiet -p 5432 --dbname postgres ' && false returned 1 instead of one of [0] Error: /Stage[main]/Postgresql::Server::Service/Postgresql::Validatedbconnection[validateserviceisrunning]/Exec[validate postgres connection for @:5432/postgres]/returns: change from notrun to 0 failed: echo 'Unable to connect to defined database using: /usr/bin/psql --tuples-only --quiet -p 5432 --dbname postgres ' && false returned 1 instead of one of [0] Notice: /Stage[main]/Postgresql::Server::Service/Postgresql::Validatedbconnection[validateserviceis_running]/Exec[validate postgres connection for @:5432/postgres]/returns: Unable to connect to defined database using: /usr/bin/psql --tuples-only --quiet -p 5432 --dbname postgres

If i enter the command showed there in the cwd i get following error

[root@puppetmaster 03_repo]# /usr/bin/psql --tuples-only --quiet    -p 5432  --dbname postgres
psql: FATAL:  Ident authentication failed for user "root"
[root@puppetmaster 03_repo]#

so i played with the file: /var/lib/pgsql/data/pg_hba.conf but the module is always switching it back to the original one.

I am not so experienced with the postgrsql. Does anybody have an clue how i can fix this issue?

edit retag flag offensive close merge delete

Comments

Same problem here, no updates?

toddcarr01 gravatar imagetoddcarr01 ( 2015-11-04 13:28:42 -0600 )edit

If you're installing PuppetDB on the same node with Puppet Server you should include it like this: class { 'puppetdb': } class { 'puppetdb::master::config': } It will be enough. At least, it works for me.

Dziki_Jam gravatar imageDziki_Jam ( 2016-12-19 07:02:31 -0600 )edit