<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Thanks Yugo,</div><div class="gmail_default" style="font-family:verdana,sans-serif">there was some inconsistencies in my network configuration.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Bye.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Meph</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 9 April 2015 at 07:34, Yugo Nagata <span dir="ltr">&lt;<a href="mailto:nagata@sraoss.co.jp" target="_blank">nagata@sraoss.co.jp</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Second pgpool-II tried to become active and bring up VIP,<br>
but the VIP was brought up by the first pgpool-II, then failed<br>
to start up.<br>
<br>
Can postgres-1 and postgres-2 servers comunicate with each other<br>
on 9000 port? The second pgpool-II might fail to find the other<br>
pgpool.<br>
<br>
If there is no problem with network comunication, starting the<br>
second pgpool-II with a few seconds interval might resolve this.<br>
When the inteval is too short, the first pgpool-II&#39;s watchdog<br>
can not be ready to accept standby pgpool-II.<br>
<div class="HOEnZb"><div class="h5"><br>
On Wed, 8 Apr 2015 14:13:45 +0200<br>
Mephysto &lt;<a href="mailto:mephystoonhell@gmail.com">mephystoonhell@gmail.com</a>&gt; wrote:<br>
<br>
&gt; Hi there,<br>
&gt; I&#39;m still testing pgpool 3.4.1 watchdog. I resolved permission issue for<br>
&gt; ifup and ifdown, but now I am some issues in starting phase of stanby<br>
&gt; pgpool instance.<br>
&gt;<br>
&gt; When I start master pgpool I receive this output:<br>
&gt;<br>
&gt; 2015-04-08 12:10:01: pid 10402: LOG:  watchdog bringing up delegate IP,<br>
&gt; &#39;ifconfig up&#39; succeeded<br>
&gt; 2015-04-08 12:10:01: pid 10402: DEBUG:  watchdog standing for master<br>
&gt; 2015-04-08 12:10:01: pid 10402: DETAIL:  send the packet to declare the new<br>
&gt; master<br>
&gt; 2015-04-08 12:10:01: pid 10402: LOG:  watchdog escalation successful,<br>
&gt; escalated to master pgpool<br>
&gt; 2015-04-08 12:10:01: pid 10402: LOG:  watchdog started<br>
&gt; 2015-04-08 12:10:01: pid 10402: LOG:  pgpool-II successfully started.<br>
&gt; version 3.4.1 (tataraboshi)<br>
&gt;<br>
&gt; But, when I star secondary instance, I receive this error:<br>
&gt;<br>
&gt; 2015-04-08 14:08:21: pid 19376: DEBUG:  watchdog executing ping<br>
&gt; 2015-04-08 14:08:21: pid 19376: DETAIL:  succeed to ping 192.168.56.249<br>
&gt; 2015-04-08 14:08:21: pid 19376: DEBUG:  watchdog ping<br>
&gt; 2015-04-08 14:08:21: pid 19376: DETAIL:  ping data: PING 192.168.56.249<br>
&gt; (192.168.56.249) 56(84) bytes of data.<br>
&gt;<br>
&gt;         --- 192.168.56.249 ping statistics ---<br>
&gt;         3 packets transmitted, 3 received, 0% packet loss, time 2003ms<br>
&gt;         rtt min/avg/max/mdev = 0.412/1.106/1.799/0.566 ms<br>
&gt;<br>
&gt; 2015-04-08 14:08:21: pid 19376: FATAL:  failed to initialize watchdog,<br>
&gt; delegate_IP &quot;192.168.56.249&quot; already exists<br>
&gt;<br>
&gt;<br>
&gt; This is configuration of master instance:<br>
&gt;<br>
&gt; #------------------------------------------------------------------------------<br>
&gt; # WATCHDOG<br>
&gt; #------------------------------------------------------------------------------<br>
&gt;<br>
&gt; # - Enabling -<br>
&gt;<br>
&gt; use_watchdog = on<br>
&gt;                                     # Activates watchdog<br>
&gt;                                     # (change requires restart)<br>
&gt;<br>
&gt; # -Connection to up stream servers -<br>
&gt;<br>
&gt; trusted_servers = &#39;&#39;<br>
&gt;                                     # trusted server list which are used<br>
&gt;                                     # to confirm network connection<br>
&gt;                                     # (hostA,hostB,hostC,...)<br>
&gt;                                     # (change requires restart)<br>
&gt; ping_path = &#39;/bin&#39;<br>
&gt;                                     # ping command path<br>
&gt;                                     # (change requires restart)<br>
&gt;<br>
&gt; # - Watchdog communication Settings -<br>
&gt;<br>
&gt; wd_hostname = &#39;postgres-1&#39;<br>
&gt;                                     # Host name or IP address of this<br>
&gt; watchdog<br>
&gt;                                     # (change requires restart)<br>
&gt; wd_port = 9000<br>
&gt;                                     # port number for watchdog service<br>
&gt;                                     # (change requires restart)<br>
&gt; wd_authkey = &#39;&#39;<br>
&gt;                                     # Authentication key for watchdog<br>
&gt; communication<br>
&gt;                                     # (change requires restart)<br>
&gt;<br>
&gt; # - Virtual IP control Setting -<br>
&gt;<br>
&gt; delegate_IP = &#39;192.168.56.249&#39;<br>
&gt;                                     # delegate IP address<br>
&gt;                                     # If this is empty, virtual IP never<br>
&gt; bring up.<br>
&gt;                                     # (change requires restart)<br>
&gt; ifconfig_path = &#39;/opt/postgres/pgpool-II/scripts&#39;<br>
&gt;                                     # ifconfig command path<br>
&gt;                                     # (change requires restart)<br>
&gt; if_up_cmd = &#39;ifup.sh $_IP_$&#39;<br>
&gt;                                     # startup delegate IP command<br>
&gt;                                     # (change requires restart)<br>
&gt; if_down_cmd = &#39;ifdown.sh&#39;<br>
&gt;                                     # shutdown delegate IP command<br>
&gt;                                     # (change requires restart)<br>
&gt;<br>
&gt; arping_path = &#39;/usr/sbin&#39;           # arping command path<br>
&gt;                                     # (change requires restart)<br>
&gt;<br>
&gt; arping_cmd = &#39;sudo arping -U $_IP_$ -w 1&#39;<br>
&gt;                                     # arping command<br>
&gt;                                     # (change requires restart)<br>
&gt;<br>
&gt; # - Behaivor on escalation Setting -<br>
&gt;<br>
&gt; clear_memqcache_on_escalation = on<br>
&gt;                                     # Clear all the query cache on shared<br>
&gt; memory<br>
&gt;                                     # when standby pgpool escalate to<br>
&gt; active pgpool<br>
&gt;                                     # (= virtual IP holder).<br>
&gt;                                     # This should be off if client connects<br>
&gt; to pgpool<br>
&gt;                                     # not using virtual IP.<br>
&gt;                                     # (change requires restart)<br>
&gt; wd_escalation_command = &#39;&#39;<br>
&gt;                                     # Executes this command at escalation<br>
&gt; on new active pgpool.<br>
&gt;                                     # (change requires restart)<br>
&gt;<br>
&gt; # - Lifecheck Setting -<br>
&gt;<br>
&gt; # -- common --<br>
&gt;<br>
&gt; wd_lifecheck_method = &#39;query&#39;<br>
&gt;                                     # Method of watchdog lifecheck<br>
&gt; (&#39;heartbeat&#39; or &#39;query&#39;)<br>
&gt;                                     # (change requires restart)<br>
&gt; wd_interval = 10<br>
&gt;                                     # lifecheck interval (sec) &gt; 0<br>
&gt;                                     # (change requires restart)<br>
&gt;<br>
&gt; # -- heartbeat mode --<br>
&gt;<br>
&gt; wd_heartbeat_port = 9694<br>
&gt;                                     # Port number for receiving heartbeat<br>
&gt; signal<br>
&gt;                                     # (change requires restart)<br>
&gt; wd_heartbeat_keepalive = 2<br>
&gt;                                     # Interval time of sending heartbeat<br>
&gt; signal (sec)<br>
&gt;                                     # (change requires restart)<br>
&gt; wd_heartbeat_deadtime = 30<br>
&gt;                                     # Deadtime interval for heartbeat<br>
&gt; signal (sec)<br>
&gt;                                     # (change requires restart)<br>
&gt; heartbeat_destination0 = &#39;postgres-2&#39;<br>
&gt;                                     # Host name or IP address of<br>
&gt; destination 0<br>
&gt;                                     # for sending heartbeat signal.<br>
&gt;                                     # (change requires restart)<br>
&gt; heartbeat_destination_port0 = 9694<br>
&gt;                                     # Port number of destination 0 for<br>
&gt; sending<br>
&gt;                                     # heartbeat signal. Usually this is the<br>
&gt;                                     # same as wd_heartbeat_port.<br>
&gt;                                     # (change requires restart)<br>
&gt; heartbeat_device0 = &#39;&#39;<br>
&gt;                                     # Name of NIC device (such like &#39;eth0&#39;)<br>
&gt;                                     # used for sending/receiving heartbeat<br>
&gt;                                     # signal to/from destination 0.<br>
&gt;                                     # This works only when this is not empty<br>
&gt;                                     # and pgpool has root privilege.<br>
&gt;                                     # (change requires restart)<br>
&gt;<br>
&gt; #heartbeat_destination1 = &#39;host0_ip2&#39;<br>
&gt; #heartbeat_destination_port1 = 9694<br>
&gt; #heartbeat_device1 = &#39;&#39;<br>
&gt;<br>
&gt; # -- query mode --<br>
&gt;<br>
&gt; wd_life_point = 3<br>
&gt;                                     # lifecheck retry times<br>
&gt;                                     # (change requires restart)<br>
&gt; wd_lifecheck_query = &#39;SELECT 1&#39;<br>
&gt;                                     # lifecheck query to pgpool from<br>
&gt; watchdog<br>
&gt;                                     # (change requires restart)<br>
&gt; wd_lifecheck_dbname = &#39;template1&#39;<br>
&gt;                                     # Database name connected for lifecheck<br>
&gt;                                     # (change requires restart)<br>
&gt; wd_lifecheck_user = &#39;postgres&#39;<br>
&gt;                                     # watchdog user monitoring pgpools in<br>
&gt; lifecheck<br>
&gt;                                     # (change requires restart)<br>
&gt; wd_lifecheck_password = &#39;&#39;<br>
&gt;                                     # Password for watchdog user in<br>
&gt; lifecheck<br>
&gt;                                     # (change requires restart)<br>
&gt;<br>
&gt; # - Other pgpool Connection Settings -<br>
&gt;<br>
&gt; other_pgpool_hostname0 = &#39;postgres-2&#39;<br>
&gt;                                     # Host name or IP address to connect to<br>
&gt; for other pgpool 0<br>
&gt;                                     # (change requires restart)<br>
&gt; other_pgpool_port0 = 9999<br>
&gt;                                     # Port number for othet pgpool 0<br>
&gt;                                     # (change requires restart)<br>
&gt; other_wd_port0 = 9000<br>
&gt;                                     # Port number for othet watchdog 0<br>
&gt;                                     # (change requires restart)<br>
&gt; #other_pgpool_hostname1 = &#39;host1&#39;<br>
&gt; #other_pgpool_port1 = 5432<br>
&gt; #other_wd_port1 = 9000<br>
&gt;<br>
&gt;<br>
&gt; And this is configuration for secondary instance:<br>
&gt;<br>
&gt; #------------------------------------------------------------------------------<br>
&gt; # WATCHDOG<br>
&gt; #------------------------------------------------------------------------------<br>
&gt;<br>
&gt; # - Enabling -<br>
&gt;<br>
&gt; use_watchdog = on<br>
&gt;                                     # Activates watchdog<br>
&gt;                                     # (change requires restart)<br>
&gt;<br>
&gt; # -Connection to up stream servers -<br>
&gt;<br>
&gt; trusted_servers = &#39;&#39;<br>
&gt;                                     # trusted server list which are used<br>
&gt;                                     # to confirm network connection<br>
&gt;                                     # (hostA,hostB,hostC,...)<br>
&gt;                                     # (change requires restart)<br>
&gt; ping_path = &#39;/bin&#39;<br>
&gt;                                     # ping command path<br>
&gt;                                     # (change requires restart)<br>
&gt;<br>
&gt; # - Watchdog communication Settings -<br>
&gt;<br>
&gt; wd_hostname = &#39;postgres-2&#39;<br>
&gt;                                     # Host name or IP address of this<br>
&gt; watchdog<br>
&gt;                                     # (change requires restart)<br>
&gt; wd_port = 9000<br>
&gt;                                     # port number for watchdog service<br>
&gt;                                     # (change requires restart)<br>
&gt; wd_authkey = &#39;&#39;<br>
&gt;                                     # Authentication key for watchdog<br>
&gt; communication<br>
&gt;                                     # (change requires restart)<br>
&gt;<br>
&gt; # - Virtual IP control Setting -<br>
&gt;<br>
&gt; delegate_IP = &#39;192.168.56.249&#39;<br>
&gt;                                     # delegate IP address<br>
&gt;                                     # If this is empty, virtual IP never<br>
&gt; bring up.<br>
&gt;                                     # (change requires restart)<br>
&gt; ifconfig_path = &#39;/opt/postgres/pgpool-II/scripts&#39;<br>
&gt;                                     # ifconfig command path<br>
&gt;                                     # (change requires restart)<br>
&gt; if_up_cmd = &#39;ifup.sh $_IP_$&#39;<br>
&gt;                                     # startup delegate IP command<br>
&gt;                                     # (change requires restart)<br>
&gt; if_down_cmd = &#39;ifdown.sh&#39;<br>
&gt;                                     # shutdown delegate IP command<br>
&gt;                                     # (change requires restart)<br>
&gt;<br>
&gt; arping_path = &#39;/usr/sbin&#39;           # arping command path<br>
&gt;                                     # (change requires restart)<br>
&gt;<br>
&gt; arping_cmd = &#39;arping -U $_IP_$ -w 1&#39;<br>
&gt;                                     # arping command<br>
&gt;                                     # (change requires restart)<br>
&gt;<br>
&gt; # - Behaivor on escalation Setting -<br>
&gt;<br>
&gt; clear_memqcache_on_escalation = on<br>
&gt;                                     # Clear all the query cache on shared<br>
&gt; memory<br>
&gt;                                     # when standby pgpool escalate to<br>
&gt; active pgpool<br>
&gt;                                     # (= virtual IP holder).<br>
&gt;                                     # This should be off if client connects<br>
&gt; to pgpool<br>
&gt;                                     # not using virtual IP.<br>
&gt;                                     # (change requires restart)<br>
&gt; wd_escalation_command = &#39;&#39;<br>
&gt;                                     # Executes this command at escalation<br>
&gt; on new active pgpool.<br>
&gt;                                     # (change requires restart)<br>
&gt;<br>
&gt; # - Lifecheck Setting -<br>
&gt;<br>
&gt; # -- common --<br>
&gt;<br>
&gt; wd_lifecheck_method = &#39;query&#39;<br>
&gt;                                     # Method of watchdog lifecheck<br>
&gt; (&#39;heartbeat&#39; or &#39;query&#39;)<br>
&gt;                                     # (change requires restart)<br>
&gt; wd_interval = 10<br>
&gt;                                     # lifecheck interval (sec) &gt; 0<br>
&gt;                                     # (change requires restart)<br>
&gt;<br>
&gt; # -- heartbeat mode --<br>
&gt;<br>
&gt; wd_heartbeat_port = 9694<br>
&gt;                                     # Port number for receiving heartbeat<br>
&gt; signal<br>
&gt;                                     # (change requires restart)<br>
&gt; wd_heartbeat_keepalive = 2<br>
&gt;                                     # Interval time of sending heartbeat<br>
&gt; signal (sec)<br>
&gt;                                     # (change requires restart)<br>
&gt; wd_heartbeat_deadtime = 30<br>
&gt;                                     # Deadtime interval for heartbeat<br>
&gt; signal (sec)<br>
&gt;                                     # (change requires restart)<br>
&gt; heartbeat_destination0 = &#39;postgres-1&#39;<br>
&gt;                                     # Host name or IP address of<br>
&gt; destination 0<br>
&gt;                                     # for sending heartbeat signal.<br>
&gt;                                     # (change requires restart)<br>
&gt; heartbeat_destination_port0 = 9694<br>
&gt;                                     # Port number of destination 0 for<br>
&gt; sending<br>
&gt;                                     # heartbeat signal. Usually this is the<br>
&gt;                                     # same as wd_heartbeat_port.<br>
&gt;                                     # (change requires restart)<br>
&gt; heartbeat_device0 = &#39;&#39;<br>
&gt;                                     # Name of NIC device (such like &#39;eth0&#39;)<br>
&gt;                                     # used for sending/receiving heartbeat<br>
&gt;                                     # signal to/from destination 0.<br>
&gt;                                     # This works only when this is not empty<br>
&gt;                                     # and pgpool has root privilege.<br>
&gt;                                     # (change requires restart)<br>
&gt;<br>
&gt; #heartbeat_destination1 = &#39;host0_ip2&#39;<br>
&gt; #heartbeat_destination_port1 = 9694<br>
&gt; #heartbeat_device1 = &#39;&#39;<br>
&gt;<br>
&gt; # -- query mode --<br>
&gt;<br>
&gt; wd_life_point = 3<br>
&gt;                                     # lifecheck retry times<br>
&gt;                                     # (change requires restart)<br>
&gt; wd_lifecheck_query = &#39;SELECT 1&#39;<br>
&gt;                                     # lifecheck query to pgpool from<br>
&gt; watchdog<br>
&gt;                                     # (change requires restart)<br>
&gt; wd_lifecheck_dbname = &#39;template1&#39;<br>
&gt;                                     # Database name connected for lifecheck<br>
&gt;                                     # (change requires restart)<br>
&gt; wd_lifecheck_user = &#39;postgres&#39;<br>
&gt;                                     # watchdog user monitoring pgpools in<br>
&gt; lifecheck<br>
&gt;                                     # (change requires restart)<br>
&gt; wd_lifecheck_password = &#39;&#39;<br>
&gt;                                     # Password for watchdog user in<br>
&gt; lifecheck<br>
&gt;                                     # (change requires restart)<br>
&gt;<br>
&gt; # - Other pgpool Connection Settings -<br>
&gt;<br>
&gt; other_pgpool_hostname0 = &#39;postgres-1&#39;<br>
&gt;                                     # Host name or IP address to connect to<br>
&gt; for other pgpool 0<br>
&gt;                                     # (change requires restart)<br>
&gt; other_pgpool_port0 = 9999<br>
&gt;                                     # Port number for othet pgpool 0<br>
&gt;                                     # (change requires restart)<br>
&gt; other_wd_port0 = 9000<br>
&gt;                                     # Port number for othet watchdog 0<br>
&gt;                                     # (change requires restart)<br>
&gt; #other_pgpool_hostname1 = &#39;host1&#39;<br>
&gt; #other_pgpool_port1 = 5432<br>
&gt; #other_wd_port1 = 9000<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Can you help to resolve my issue?<br>
&gt;<br>
&gt; Thanks in advance.<br>
&gt;<br>
&gt; Best regards.<br>
&gt;<br>
&gt; Meph<br>
<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Yugo Nagata &lt;<a href="mailto:nagata@sraoss.co.jp">nagata@sraoss.co.jp</a>&gt;<br>
</font></span></blockquote></div><br></div>