<div dir="ltr">Hello guys,<br><br>pgpool-II version 4.3.5 (tamahomeboshi)<br>PostgreSQL version 15.4<br><br>I have 3 node PgPool-2 configured on Ubuntu 20.04.2 LTS.<br>Server1 is PRIMARY<br>Server2,3 STANDBY nodes. I also use watchdog for IP delegation during failover. <br>I followed up configuration from <a href="https://www.pgpool.net/docs/43/en/html/example-cluster.html">https://www.pgpool.net/docs/43/en/html/example-cluster.html</a><br>* some steps required small adjustment for ubuntu (especially failover,escalation,follow_primary and other scripts that are used for online recovery and failover)<br><br>Regarding failover operations. Everything run smoothly without issue.<br>What is going wrong is VIP address delegation. <br>When I test failover scenario (e.g. stop primary instance) failover occured but VIP address stay on previous/failed primary instance.<br>I checked escalation.sh content, privileges on execute, sudo privileges for postgres user on arping and ip. <br><div>Everything checked few times but I can't find problem. Only thing that helped was stop pgpool2 on 
previous/failed primary instance too.</div><div>Then VIP was delegated to another node.<br></div><br>What I found in pgpool.log (verbose logging) is:<br><br>2023-09-13 14:24:22.935: watchdog_utility pid 901050: LOG:  watchdog escalation successful<br>2023-09-13 14:24:22.935: watchdog_utility pid 901050: LOCATION:  wd_escalation.c:119<br>2023-09-13 14:24:24.059: watchdog_utility pid 901050: LOG:  failed to acquire the delegate IP address<br>2023-09-13 14:24:24.059: watchdog_utility pid 901050: DETAIL:  'if_up_cmd' failed<br>2023-09-13 14:24:24.059: watchdog_utility pid 901050: LOCATION:  wd_if.c:182<br>2023-09-13 14:24:24.059: watchdog_utility pid 901050: WARNING:  watchdog escalation failed to acquire delegate IP<br>2023-09-13 14:24:24.060: watchdog_utility pid 901050: LOCATION:  wd_escalation.c:140<br>2023-09-13 14:24:24.062: watchdog pid 899237: LOG:  watchdog escalation process with pid: 901050 exit with SUCCESS.<br><br>This is pgpool.conf (same on all sevrers) <br><br>backend_clustering_mode = 'streaming_replication'<br>listen_addresses = '*'<br>port = 9999<br>pcp_listen_addresses = '*'<br>backend_hostname0 = 'server1'<br>backend_port0 = 5432<br>backend_weight0 = 1<br>backend_data_directory0 = '/var/lib/postgresql/15/main'<br>backend_flag0 = 'ALLOW_TO_FAILOVER'<br>backend_application_name0 = 'server1'<br>backend_hostname1 = 'server2'<br>backend_port1 = 5432<br>backend_weight1 = 1<br>backend_data_directory1 = '/var/lib/postgresql/15/main'<br>backend_flag1 = 'ALLOW_TO_FAILOVER'<br>backend_application_name1 = 'server2'<br>backend_hostname2 = 'server3'<br>backend_port2 = 5432<br>backend_weight2 = 1<br>backend_data_directory2 = '/var/lib/postgresql/15/main'<br>backend_flag2 = 'ALLOW_TO_FAILOVER'<br>backend_application_name2 = 'server3'<br>enable_pool_hba = on<br>log_destination = 'stderr'<br>log_connections = off<br>logging_collector = on<br>log_directory = '/var/log/postgresql'<br>log_filename = 'pgpool-%Y-%m-%d_%H%M%S.log'<br>log_truncate_on_rotation = on<br>log_rotation_age = 1d<br>log_rotation_size = 10MB<br>sr_check_user = 'pgpool'<br>sr_check_password = ''<br>follow_primary_command = '/etc/pgpool2/follow_primary.sh %d %h %p %D %m %H %M %P %r %R'<br>health_check_period = 5<br>health_check_timeout = 30<br>health_check_user = 'pgpool'<br>health_check_password = ''<br>health_check_max_retries = 3<br>failover_command = '/etc/pgpool2/failover.sh %d %h %p %D %m %H %M %P %r %R %N %S'<br>recovery_user = 'postgres'<br>recovery_password = 'pgpool'<br>recovery_1st_stage_command = 'recovery_1st_stage'<br>use_watchdog = on<br>hostname0 = 'server1'<br>wd_port0 = 9000<br>pgpool_port0 = 9999<br>hostname1 = 'server2'<br>wd_port1 = 9000<br>pgpool_port1 = 9999<br>hostname2 = 'server3'<br>wd_port2 = 9000<br>pgpool_port2 = 9999<br>delegate_IP = 'XXX.XXX.XXX.XXX' -- #mocked <br>if_cmd_path = '/sbin'<br>if_up_cmd = '/usr/bin/sudo /sbin/ip addr add $_IP_$/24 dev ens160 label ens160:0'<br>if_down_cmd = '/usr/bin/sudo /sbin/ip addr del $_IP_$/24 dev ens160'<br>arping_path = '/usr/sbin'<br>arping_cmd = '/usr/bin/sudo /usr/sbin/arping -U $_IP_$ -w 1 -I ens160'<br>wd_escalation_command = '/etc/pgpool2/escalation.sh'<br>wd_lifecheck_method = 'heartbeat'<br>wd_interval = 10<br>heartbeat_hostname0 = 'server1'<br>heartbeat_port0 = 9694<br>heartbeat_device0 = ''<br>heartbeat_hostname1 = 'server2'<br>heartbeat_port1 = 9694<br>heartbeat_device1 = ''<br>heartbeat_hostname2 = 'server3'<br>heartbeat_port2 = 9694<br>heartbeat_device2 = ''<br>wd_heartbeat_keepalive = 2<br>wd_heartbeat_deadtime = 30<br><br>Could anyone experience similar problem and solve it ?<br><br>Thanks!<br>Marian </div>