Обсуждение: repmgr auto-failover not happening.

Поиск
Список
Период
Сортировка

repmgr auto-failover not happening.

От
jacob ndinkwa
Дата:
Hello gurus,

I'm running Postgres 15 with repmgr 5. 
I set up repmgr, tested switchover and manual failover successfully but automatic failover is not working. I wish to know if I'm missing out something. See the repmgr.conf file below and advise please.

priority=100
node_name=LP1

conninfo='host=group.com user=repmgr dbname=repmgr connect_timeout=10'

data_directory='/pgdata/'

pg_bindir='/usr/pgsql-15/bin/'

repmgr_bindir='/usr/pgsql-15/bin/'

repmgrd_pid_file='/run/repmgr/repmgrd-15.pid'

monitor_interval_secs=2
reconnect_attempts=6
reconnect_interval=10
connection_check_type=connection

failover=automatic

promote_command='/usr/pgsql-15/bin/repmgr standby promote -f /etc/repmgr/15/repmgr.conf --siblings-follow --log-to-file'

follow_command='/usr/pgsql-15/bin/repmgr standby follow -f /etc/repmgr/15/repmgr.conf --log-to-file --upstream-node-id=%n'


primary_visibility_consensus=true
standby_disconnect_on_failover=true
repmgrd_service_start_command='sudo /usr/bin/systemctl start repmgr-15.service'
repmgrd_service_stop_command='sudo /usr/bin/systemctl stop repmgr-15.service'
service_start_command='sudo /usr/bin/systemctl start postgresql-15.service'
service_stop_command='sudo /usr/bin/systemctl stop postgresql-15.service'
service_restart_command='sudo /usr/bin/systemctl restart postgresql-15.service'
service_reload_command='sudo /usr/bin/systemctl reload postgresql-15.service'
monitoring_history=yes
log_level='INFO'
log_facility='STDERR'
log_file='/var/log/repmgr/repmgr.log'
log_status_interval=60

Thank you,
Jake

Re: repmgr auto-failover not happening.

От
Nikhil Shetty
Дата:
Hi,

Check if repmgrd process is running on both primary and secondary

You can set the log file parameter for repmgrd in repmgr.conf on both primary and secondary 
to check if it is running fine

Thanks,
Nikhil

On Sun, 4 Feb 2024 at 17:12, jacob ndinkwa <jndinkwa@gmail.com> wrote:
Hello gurus,

I'm running Postgres 15 with repmgr 5. 
I set up repmgr, tested switchover and manual failover successfully but automatic failover is not working. I wish to know if I'm missing out something. See the repmgr.conf file below and advise please.

priority=100
node_name=LP1

conninfo='host=group.com user=repmgr dbname=repmgr connect_timeout=10'

data_directory='/pgdata/'

pg_bindir='/usr/pgsql-15/bin/'

repmgr_bindir='/usr/pgsql-15/bin/'

repmgrd_pid_file='/run/repmgr/repmgrd-15.pid'

monitor_interval_secs=2
reconnect_attempts=6
reconnect_interval=10
connection_check_type=connection

failover=automatic

promote_command='/usr/pgsql-15/bin/repmgr standby promote -f /etc/repmgr/15/repmgr.conf --siblings-follow --log-to-file'

follow_command='/usr/pgsql-15/bin/repmgr standby follow -f /etc/repmgr/15/repmgr.conf --log-to-file --upstream-node-id=%n'


primary_visibility_consensus=true
standby_disconnect_on_failover=true
repmgrd_service_start_command='sudo /usr/bin/systemctl start repmgr-15.service'
repmgrd_service_stop_command='sudo /usr/bin/systemctl stop repmgr-15.service'
service_start_command='sudo /usr/bin/systemctl start postgresql-15.service'
service_stop_command='sudo /usr/bin/systemctl stop postgresql-15.service'
service_restart_command='sudo /usr/bin/systemctl restart postgresql-15.service'
service_reload_command='sudo /usr/bin/systemctl reload postgresql-15.service'
monitoring_history=yes
log_level='INFO'
log_facility='STDERR'
log_file='/var/log/repmgr/repmgr.log'
log_status_interval=60

Thank you,
Jake

Re: repmgr auto-failover not happening.

От
jacob ndinkwa
Дата:
Yes, repmgrd daemon is running on both nodes but still auto-failover is not happening. 

On Sun, Feb 4, 2024, 8:11 AM Nikhil Shetty <nikhil.dba04@gmail.com> wrote:
Hi,

Check if repmgrd process is running on both primary and secondary

You can set the log file parameter for repmgrd in repmgr.conf on both primary and secondary 
to check if it is running fine

Thanks,
Nikhil

On Sun, 4 Feb 2024 at 17:12, jacob ndinkwa <jndinkwa@gmail.com> wrote:
Hello gurus,

I'm running Postgres 15 with repmgr 5. 
I set up repmgr, tested switchover and manual failover successfully but automatic failover is not working. I wish to know if I'm missing out something. See the repmgr.conf file below and advise please.

priority=100
node_name=LP1

conninfo='host=group.com user=repmgr dbname=repmgr connect_timeout=10'

data_directory='/pgdata/'

pg_bindir='/usr/pgsql-15/bin/'

repmgr_bindir='/usr/pgsql-15/bin/'

repmgrd_pid_file='/run/repmgr/repmgrd-15.pid'

monitor_interval_secs=2
reconnect_attempts=6
reconnect_interval=10
connection_check_type=connection

failover=automatic

promote_command='/usr/pgsql-15/bin/repmgr standby promote -f /etc/repmgr/15/repmgr.conf --siblings-follow --log-to-file'

follow_command='/usr/pgsql-15/bin/repmgr standby follow -f /etc/repmgr/15/repmgr.conf --log-to-file --upstream-node-id=%n'


primary_visibility_consensus=true
standby_disconnect_on_failover=true
repmgrd_service_start_command='sudo /usr/bin/systemctl start repmgr-15.service'
repmgrd_service_stop_command='sudo /usr/bin/systemctl stop repmgr-15.service'
service_start_command='sudo /usr/bin/systemctl start postgresql-15.service'
service_stop_command='sudo /usr/bin/systemctl stop postgresql-15.service'
service_restart_command='sudo /usr/bin/systemctl restart postgresql-15.service'
service_reload_command='sudo /usr/bin/systemctl reload postgresql-15.service'
monitoring_history=yes
log_level='INFO'
log_facility='STDERR'
log_file='/var/log/repmgr/repmgr.log'
log_status_interval=60

Thank you,
Jake

Re: repmgr auto-failover not happening.

От
Nikhil Shetty
Дата:
What is the error in log file of repmgrd?

On Mon, 5 Feb 2024 at 03:36, jacob ndinkwa <jndinkwa@gmail.com> wrote:
Yes, repmgrd daemon is running on both nodes but still auto-failover is not happening. 

On Sun, Feb 4, 2024, 8:11 AM Nikhil Shetty <nikhil.dba04@gmail.com> wrote:
Hi,

Check if repmgrd process is running on both primary and secondary

You can set the log file parameter for repmgrd in repmgr.conf on both primary and secondary 
to check if it is running fine

Thanks,
Nikhil

On Sun, 4 Feb 2024 at 17:12, jacob ndinkwa <jndinkwa@gmail.com> wrote:
Hello gurus,

I'm running Postgres 15 with repmgr 5. 
I set up repmgr, tested switchover and manual failover successfully but automatic failover is not working. I wish to know if I'm missing out something. See the repmgr.conf file below and advise please.

priority=100
node_name=LP1

conninfo='host=group.com user=repmgr dbname=repmgr connect_timeout=10'

data_directory='/pgdata/'

pg_bindir='/usr/pgsql-15/bin/'

repmgr_bindir='/usr/pgsql-15/bin/'

repmgrd_pid_file='/run/repmgr/repmgrd-15.pid'

monitor_interval_secs=2
reconnect_attempts=6
reconnect_interval=10
connection_check_type=connection

failover=automatic

promote_command='/usr/pgsql-15/bin/repmgr standby promote -f /etc/repmgr/15/repmgr.conf --siblings-follow --log-to-file'

follow_command='/usr/pgsql-15/bin/repmgr standby follow -f /etc/repmgr/15/repmgr.conf --log-to-file --upstream-node-id=%n'


primary_visibility_consensus=true
standby_disconnect_on_failover=true
repmgrd_service_start_command='sudo /usr/bin/systemctl start repmgr-15.service'
repmgrd_service_stop_command='sudo /usr/bin/systemctl stop repmgr-15.service'
service_start_command='sudo /usr/bin/systemctl start postgresql-15.service'
service_stop_command='sudo /usr/bin/systemctl stop postgresql-15.service'
service_restart_command='sudo /usr/bin/systemctl restart postgresql-15.service'
service_reload_command='sudo /usr/bin/systemctl reload postgresql-15.service'
monitoring_history=yes
log_level='INFO'
log_facility='STDERR'
log_file='/var/log/repmgr/repmgr.log'
log_status_interval=60

Thank you,
Jake

Re: repmgr auto-failover not happening.

От
jacob ndinkwa
Дата:
There no error message. 
That's why it so difficult for me to troubleshoot. 
I was wondering if repmgr v is still supported on postgres 15.

On Mon, Feb 5, 2024, 12:37 AM Nikhil Shetty <nikhil.dba04@gmail.com> wrote:
What is the error in log file of repmgrd?

On Mon, 5 Feb 2024 at 03:36, jacob ndinkwa <jndinkwa@gmail.com> wrote:
Yes, repmgrd daemon is running on both nodes but still auto-failover is not happening. 

On Sun, Feb 4, 2024, 8:11 AM Nikhil Shetty <nikhil.dba04@gmail.com> wrote:
Hi,

Check if repmgrd process is running on both primary and secondary

You can set the log file parameter for repmgrd in repmgr.conf on both primary and secondary 
to check if it is running fine

Thanks,
Nikhil

On Sun, 4 Feb 2024 at 17:12, jacob ndinkwa <jndinkwa@gmail.com> wrote:
Hello gurus,

I'm running Postgres 15 with repmgr 5. 
I set up repmgr, tested switchover and manual failover successfully but automatic failover is not working. I wish to know if I'm missing out something. See the repmgr.conf file below and advise please.

priority=100
node_name=LP1

conninfo='host=group.com user=repmgr dbname=repmgr connect_timeout=10'

data_directory='/pgdata/'

pg_bindir='/usr/pgsql-15/bin/'

repmgr_bindir='/usr/pgsql-15/bin/'

repmgrd_pid_file='/run/repmgr/repmgrd-15.pid'

monitor_interval_secs=2
reconnect_attempts=6
reconnect_interval=10
connection_check_type=connection

failover=automatic

promote_command='/usr/pgsql-15/bin/repmgr standby promote -f /etc/repmgr/15/repmgr.conf --siblings-follow --log-to-file'

follow_command='/usr/pgsql-15/bin/repmgr standby follow -f /etc/repmgr/15/repmgr.conf --log-to-file --upstream-node-id=%n'


primary_visibility_consensus=true
standby_disconnect_on_failover=true
repmgrd_service_start_command='sudo /usr/bin/systemctl start repmgr-15.service'
repmgrd_service_stop_command='sudo /usr/bin/systemctl stop repmgr-15.service'
service_start_command='sudo /usr/bin/systemctl start postgresql-15.service'
service_stop_command='sudo /usr/bin/systemctl stop postgresql-15.service'
service_restart_command='sudo /usr/bin/systemctl restart postgresql-15.service'
service_reload_command='sudo /usr/bin/systemctl reload postgresql-15.service'
monitoring_history=yes
log_level='INFO'
log_facility='STDERR'
log_file='/var/log/repmgr/repmgr.log'
log_status_interval=60

Thank you,
Jake