I'm hitting the same issue with module version 3.4.1 and postgres version
9.3.
Looking at these selector statements:
$cmd_host = $database_host ? {
default => "-h ${database_host} ",
undef => "",
}
Shoudln't undef be before default?
On Tue, Jul 15, 2014 at 2:29 PM, Hunter Haugen <[email protected]>
wrote:
> The validate_db_connection would come from
> https://github.com/puppetlabs/puppetlabs-postgresql#resource-postgresqlvalidate_db_connection
> which is declared by the postgresql::server -> postgresql::server::service
> class
> https://github.com/puppetlabs/puppetlabs-postgresql/blob/master/manifests/server/service.pp#L29
> . The exec is
> https://github.com/puppetlabs/puppetlabs-postgresql/blob/master/manifests/validate_db_connection.pp#L51
>
> So it appears that the service tries to start but isn't accepting
> connections via the psql command? There isn't enough information in the
> pasted errors to tell why though. One thing that is weird is the "-h -U
> -p " arguments with double spaces, indicating that a
> hostname/user/password is blan, so that might be why (even though this code
> is supposed to guard against it
> https://github.com/puppetlabs/puppetlabs-postgresql/blob/master/manifests/validate_db_connection.pp#L23-L34
> ).
>
> What version of puppetlabs-postgresql is this?
>
>
>
>
>
> -Hunter
>
>
> On Tue, Jul 15, 2014 at 1:41 PM, Felix Frank <
> [email protected]> wrote:
>
>> Hi,
>>
>> it would be helpful to see the manifest that declares the Exec[validate
>> postgres connection for /postgres].
>>
>> For debugging, the easiest approach is pasting the failing commands to a
>> shell.
>>
>> Regards,
>> Felix
>>
>>
>> On 07/14/2014 08:35 AM, Rajesh Taneja wrote:
>>
>> While running puppet agent, I am getting following error. Can someone
>> help me understand what might be wrong.
>>
>> Warning: Exec[validate postgres connection for
>> /postgres](provider=posix): Cannot understand environment setting
>> "PGPASSWORD="
>> Warning: Exec[validate postgres connection for
>> /postgres](provider=posix): Cannot understand environment setting
>> "PGPASSWORD="
>> Notice:
>> /Stage[main]/Postgresql::Server::Service/Postgresql::Validate_db_connection[validate_service_is_running]/Exec[validate
>> postgres connection for /postgres]/returns: Unable to connect to defined
>> database using: /usr/bin/psql --tuples-only --quiet -h -U -p --dbname
>> postgres
>> Error: echo 'Unable to connect to defined database using: /usr/bin/psql
>> --tuples-only --quiet -h -U -p --dbname postgres ' && false returned 1
>> instead of one of [0]
>> Error:
>> /Stage[main]/Postgresql::Server::Service/Postgresql::Validate_db_connection[validate_service_is_running]/Exec[validate
>> postgres connection for /postgres]/returns: change from notrun to 0 failed:
>> echo 'Unable to connect to defined database using: /usr/bin/psql
>> --tuples-only --quiet -h -U -p --dbname postgres ' && false returned 1
>> instead of one of [0]
>> --
>> 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 [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/puppet-users/d4866842-9ae8-4ade-89c9-34aa9e82e074%40googlegroups.com
>> <https://groups.google.com/d/msgid/puppet-users/d4866842-9ae8-4ade-89c9-34aa9e82e074%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
>> 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 [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/puppet-users/53C591E8.5060003%40Alumni.TU-Berlin.de
>> <https://groups.google.com/d/msgid/puppet-users/53C591E8.5060003%40Alumni.TU-Berlin.de?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/CAJaQvGAU%3DE5Wr-iJ33VowKD5tvi37XwEZxn%3DYnfGDNCq16vV9g%40mail.gmail.com
> <https://groups.google.com/d/msgid/puppet-users/CAJaQvGAU%3DE5Wr-iJ33VowKD5tvi37XwEZxn%3DYnfGDNCq16vV9g%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>
--
Huaqing Zheng
Code Wrangler
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/CAKSYJTMFWWoEL-uCa1-qKNd7x2-o3OizPAHgKtQ3u96PR6EZLw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.