<div dir="ltr"><div>Hi</div><div><br></div>You have not shared the pgpool.conf of second server, but as you mentioned that its same except (how I understand it) other_pgpool_hostname0 on that would be &quot;<a href="http://pgsql01.example.com">pgsql01.example.com</a>&quot;<div>if thats the case then I guess the problem is in the other_wd_port0  setting.</div><div>other_wd_port0 corresponds to the wd_port of the other node, are you using  is 9694 for wd_port on the second node? which is unlikely because you are using 9694 port for the heartbeat</div><div>most probably you need to change the other_wd_port0 to 9000 if wd_port on that node is same as on the one you shared pgpool.conf for.</div><div><br></div><div>Kind regards</div><div>Muhammad Usama</div><div><br></div><div><br></div><div><div><br><div class="gmail_quote"><div dir="ltr">On Fri, Aug 17, 2018 at 6:15 PM mjb2kmn &lt;<a href="mailto:mjb2kmn@gmail.com">mjb2kmn@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I am trying to deploy pgpool in native replication mode with watchdog<br>
to manage 2 nodes for Active-Standby.<br>
When I start pgpool2 on both servers, they each claim to be the only<br>
node alive and become master.<br>
<br>
I have lifecheck method of heartbeat and set the heartbeat<br>
destinations to the other host for each host. I confirmed that I can<br>
send UDP messages between hosts with nc. Am I missing or<br>
misunderstanding something?<br>
<br>
Also I don&#39;t understand what the watchdog port actually does, if the<br>
heartbeat port send and receive the health check and pcp has it&#39;s own<br>
port for management, what does the watchdog TCP socket do?<br>
<br>
Below is pgpool.conf from 1st server, second server&#39;s config is the<br>
same except for the 01/02 in the hostnames. Config has been trimmed<br>
down a little, mostly just comments and unrelated stuff removed for<br>
brevity (logging, cache)<br>
<br>
<br>
#------------------------------------------------------------------------------<br>
# CONNECTIONS<br>
#------------------------------------------------------------------------------<br>
<br>
# - pgpool Connection Settings -<br>
listen_addresses = &#39;*&#39;<br>
port = 6432<br>
socket_dir = &#39;/var/run/postgresql&#39;<br>
listen_backlog_multiplier = 2<br>
serialize_accept = off<br>
pcp_listen_addresses = &#39;*&#39;<br>
pcp_port = 9898<br>
pcp_socket_dir = &#39;/var/run/postgresql&#39;<br>
<br>
# - Backend Connection Settings -<br>
backend_hostname0 = &#39;<a href="http://pgsql01.example.com" rel="noreferrer" target="_blank">pgsql01.example.com</a>&#39;<br>
backend_port0 = 5432<br>
backend_weight0 = 1<br>
backend_data_directory0 = &#39;/var/lib/pgsql/data&#39;<br>
backend_flag0 = &#39;ALLOW_TO_FAILOVER&#39;<br>
backend_hostname1 = &#39;<a href="http://pgsql02.example.com" rel="noreferrer" target="_blank">pgsql02.example.com</a>&#39;<br>
backend_port1 = 5432<br>
backend_weight1 = 1<br>
backend_data_directory1 = &#39;/var/lib/pgsql/data&#39;<br>
backend_flag1 = &#39;ALLOW_TO_FAILOVER&#39;<br>
<br>
# - Authentication -<br>
enable_pool_hba = on<br>
pool_passwd = &#39;pool_passwd&#39;<br>
authentication_timeout = 60<br>
<br>
# - SSL Connections -<br>
ssl = off<br>
<br>
#------------------------------------------------------------------------------<br>
# POOLS<br>
#------------------------------------------------------------------------------<br>
<br>
# - Concurrent session and pool size -<br>
num_init_children = 32<br>
max_pool = 4<br>
# - Life time -<br>
child_life_time = 300<br>
child_max_connections = 0<br>
connection_life_time = 0<br>
client_idle_limit = 0<br>
<br>
#------------------------------------------------------------------------------<br>
# CONNECTION POOLING<br>
#------------------------------------------------------------------------------<br>
<br>
connection_cache = on<br>
reset_query_list = &#39;ABORT; DISCARD ALL&#39;<br>
<br>
<br>
#------------------------------------------------------------------------------<br>
# REPLICATION MODE<br>
#------------------------------------------------------------------------------<br>
<br>
replication_mode = on<br>
replicate_select = off<br>
insert_lock = on<br>
lobj_lock_table = &#39;&#39;<br>
# - Degenerate handling -<br>
replication_stop_on_mismatch = off<br>
failover_if_affected_tuples_mismatch = off<br>
<br>
<br>
#------------------------------------------------------------------------------<br>
# LOAD BALANCING MODE<br>
#------------------------------------------------------------------------------<br>
<br>
load_balance_mode = on<br>
ignore_leading_white_space = on<br>
white_function_list = &#39;&#39;<br>
black_function_list = &#39;nextval,setval,nextval,setval&#39;<br>
database_redirect_preference_list = &#39;&#39;<br>
app_name_redirect_preference_list = &#39;&#39;<br>
allow_sql_comments = on<br>
<br>
#------------------------------------------------------------------------------<br>
# MASTER/SLAVE MODE<br>
#------------------------------------------------------------------------------<br>
<br>
master_slave_mode = off<br>
master_slave_sub_mode = &#39;stream&#39;<br>
# - Streaming -<br>
sr_check_period = 0<br>
sr_check_user = &#39;nobody&#39;<br>
sr_check_password = &#39;&#39;<br>
sr_check_database = &#39;postgres&#39;<br>
delay_threshold = 0<br>
# - Special commands -<br>
follow_master_command = &#39;&#39;<br>
<br>
#------------------------------------------------------------------------------<br>
# HEALTH CHECK GLOBAL PARAMETERS<br>
#------------------------------------------------------------------------------<br>
<br>
health_check_period = 0<br>
health_check_timeout = 20<br>
health_check_user = &#39;nobody&#39;<br>
health_check_password = &#39;&#39;<br>
health_check_database = &#39;&#39;<br>
health_check_max_retries = 0<br>
health_check_retry_delay = 1<br>
connect_timeout = 10000<br>
<br>
#------------------------------------------------------------------------------<br>
# FAILOVER AND FAILBACK<br>
#------------------------------------------------------------------------------<br>
<br>
failover_command = &#39;&#39;<br>
failback_command = &#39;&#39;<br>
fail_over_on_backend_error = on<br>
search_primary_node_timeout = 300<br>
<br>
#------------------------------------------------------------------------------<br>
# ONLINE RECOVERY<br>
#------------------------------------------------------------------------------<br>
<br>
recovery_user = &#39;nobody&#39;<br>
recovery_password = &#39;&#39;<br>
recovery_1st_stage_command = &#39;&#39;<br>
recovery_2nd_stage_command = &#39;&#39;<br>
recovery_timeout = 90<br>
client_idle_limit_in_recovery = 0<br>
<br>
#------------------------------------------------------------------------------<br>
# WATCHDOG<br>
#------------------------------------------------------------------------------<br>
<br>
# - Enabling -<br>
use_watchdog = on<br>
trusted_servers =<br>
&#39;<a href="http://pgsql-test.example.com" rel="noreferrer" target="_blank">pgsql-test.example.com</a>,<a href="http://proxy.example.com" rel="noreferrer" target="_blank">proxy.example.com</a>,<a href="http://proxy01.example.com" rel="noreferrer" target="_blank">proxy01.example.com</a>,<a href="http://proxy02.example.com" rel="noreferrer" target="_blank">proxy02.example.com</a>&#39;<br>
ping_path = &#39;/bin&#39;<br>
# - Watchdog communication Settings -<br>
wd_hostname = &#39;<a href="http://pgsql01.example.com" rel="noreferrer" target="_blank">pgsql01.example.com</a>&#39;<br>
wd_port = 9000<br>
wd_priority = 2<br>
wd_authkey = &#39;Hunter1&#39;<br>
wd_ipc_socket_dir = &#39;/tmp&#39;<br>
<br>
# - Virtual IP control Setting -<br>
delegate_IP = &#39;10.10.10.92&#39;<br>
if_cmd_path = &#39;/sbin&#39;<br>
if_up_cmd = &#39;ip addr add $_IP_$/23 dev ens192 label ens192:0&#39;<br>
if_down_cmd = &#39;ip addr del $_IP_$/23 dev ens192&#39;<br>
arping_path = &#39;/usr/bin&#39;<br>
arping_cmd = &#39;arping -U $_IP_$ -w 1&#39;<br>
<br>
# - Behaivor on escalation Setting -<br>
clear_memqcache_on_escalation = on<br>
wd_escalation_command = &#39;&#39;<br>
wd_de_escalation_command = &#39;&#39;<br>
<br>
# - Watchdog consensus settings for failover -<br>
failover_when_quorum_exists = on<br>
failover_require_consensus = on<br>
allow_multiple_failover_requests_from_node = off<br>
<br>
# -- common --<br>
wd_monitoring_interfaces_list = &#39;&#39;  # Comma separated list of<br>
interfaces names to monitor.<br>
wd_lifecheck_method = &#39;heartbeat&#39;<br>
wd_interval = 5<br>
<br>
# -- heartbeat mode --<br>
wd_heartbeat_port = 9694<br>
wd_heartbeat_keepalive = 2<br>
wd_heartbeat_deadtime = 30<br>
heartbeat_destination0 = &#39;<a href="http://pgsql02.example.com" rel="noreferrer" target="_blank">pgsql02.example.com</a>&#39;<br>
heartbeat_destination_port0 = 9694<br>
heartbeat_device0 = &#39;&#39;<br>
<br>
# -- query mode --<br>
wd_life_point = 3<br>
wd_lifecheck_query = &#39;SELECT 1&#39;<br>
wd_lifecheck_dbname = &#39;template1&#39;<br>
wd_lifecheck_user = &#39;nobody&#39;<br>
wd_lifecheck_password = &#39;&#39;<br>
<br>
# - Other pgpool Connection Settings -<br>
other_pgpool_hostname0 = &#39;pgsql02&#39;<br>
other_pgpool_port0 = 6432<br>
other_wd_port0 = 9694<br>
_______________________________________________<br>
pgpool-general mailing list<br>
<a href="mailto:pgpool-general@pgpool.net" target="_blank">pgpool-general@pgpool.net</a><br>
<a href="http://www.pgpool.net/mailman/listinfo/pgpool-general" rel="noreferrer" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-general</a><br>
</blockquote></div></div></div></div>