Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am trying to setup repmgr using the autofailover quick setup tutorial provided on Github Link

But I am kind of stuck on the witness section, when trying to create the witness with repmgr -d repmgr -U repmgr -h [MASTERIP] -D /var/lib/postgresql/9.1/witness -f /var/lib/postgresql/9.1/repmgr/repmgr.conf witness create

I get the following error:

Connection to database failed: fe_sendauth: no password supplied

I am not sure which database the error is talking about? Is it the master's DB or the witness'?

Also, I haven't been able to find a password parameter to pass to repmgr yet, is there even one?

Below are the repmgr.conf files for each server:

Witness:

cluster=main
node=3
node_name=witness
conninfo='host=[WITNESS IP] dbname=witness user=witness password=witness  port=5499'
master_response_timeout=60
reconnect_attempts=6
reconnect_interval=10
failover=automatic
promote_command='promote_command.sh'
follow_command='/usr/lib/postgresql/9.1/bin/repmgr standby follow -f /etc/repmgr/repmgr.conf'

Standby:

cluster=main
node=2
node_name=node2
conninfo='host=[STANDBY IP] dbname=[DB NAME] user=[DB USER NAME] password=[PASSWORD]'
master_response_timeout=60
reconnect_attempts=6
reconnect_interval=10
failover=automatic
promote_command='promote_command.sh'
follow_command='/usr/lib/postgresql/9.1/bin/repmgr standby follow -f /etc/repmgr/repmgr.conf'

Master:

cluster=main
node=1
node_name=node1
conninfo='host=[MASTER IP] dbname=[MASTER DB] user=[MASTER DB USER] password=[PASSWORD]'
master_response_timeout=60
reconnect_attempts=6
reconnect_interval=10
failover=automatic
promote_command='promote_command.sh'
follow_command='/usr/lib/postgresql/9.1/bin/repmgr standby follow -f /etc/repmgr/repmgr.conf'
share|improve this question
    
Interesting issue. Looks like we could make some improvements to error reporting there. repmgr version? –  Craig Ringer May 15 '13 at 17:09
    
Sorry completely forgot to delete the post on SO I have deleted it now though. To answer your other question the version is 2.0beta1 from the repmgr website –  Mackwerk May 15 '13 at 17:21
    
Appreciated. Re passwords have you tried using a .pgpass file (see pg docs) instead of trying to specify passwords in the conninfo strings? –  Craig Ringer May 15 '13 at 17:22
    
did you ever get a solution for this? Facing the same problem here.... –  byrnedo 50 mins ago
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.