<div dir="ltr">Hello <span style="font-family:arial,sans-serif;font-size:13px;white-space:nowrap">Yugo,</span><div><span style="font-family:arial,sans-serif;font-size:13px;white-space:nowrap"><br></span></div><div><font face="arial, sans-serif"><span style="white-space:nowrap">no worries, your replies are much appreciated :)</span></font></div>

<div><font face="arial, sans-serif"><span style="white-space:nowrap"><br></span></font></div><div><font face="arial, sans-serif"><span style="white-space:nowrap">The problem was in the recovery process on a remotely failed node. If I can remember clearly, scp operation asked for </span></font></div>

<div><span style="white-space:nowrap;font-family:arial,sans-serif">host authorisation (&quot;yes/no&quot;) and hung the script. </span><span style="white-space:nowrap;font-family:arial,sans-serif">A more verbose message providing clues to pinpoint the problem quickly </span></div>

<div><span style="white-space:nowrap;font-family:arial,sans-serif">would be really great.</span></div><div><span style="white-space:nowrap;font-family:arial,sans-serif"><br></span></div><div><span style="white-space:nowrap;font-family:arial,sans-serif">I updated to pgpoolAdmin 3.3.1 and pgpool 3.3.3. and have noticed an issue:</span></div>

<div><span style="white-space:nowrap;font-family:arial,sans-serif">1. If I update pgpool.conf via pgpoolAdmin, it erases </span>wd_lifecheck_method, wd_interval, wd_heartbeat_port, wd_heartbeat_keepalive entries. </div><div>
<div><span style="background-color:rgb(248,248,255);color:rgb(0,0,0);font-family:monospace;font-size:x-small">2014-04-11 10:38:59 ERROR: pid 32410: pool_config: wd_lifecheck_method must be either &quot;heartbeat&quot; or &quot;query&quot;</span></div>
<span style="color:rgb(0,0,0);font-family:monospace;font-size:x-small;background-color:rgb(248,248,255)">2014-04-11 10:38:59 ERROR: pid 32410: Unable to get configuration. Exiting...</span><br></div><div>I have to go to edit them in file. Does it occur to anyone else?</div>
<div><span style="white-space:nowrap;font-family:arial,sans-serif"><br></span></div><div><font face="arial, sans-serif"><span style="white-space:nowrap">pgpoolAdmin questions:</span></font></div><div><font face="arial, sans-serif"><span style="white-space:nowrap">1. Could you please explain me, what disconnect/return button should do? I assumed, that it would invoke failover/failback functionality. </span></font></div>
<div><font face="arial, sans-serif"><span style="white-space:nowrap">E.g. I could &quot;disconnect&quot; server and then on &quot;return&quot; it would resynchronise with the cluster automatically (cia pcp_recovery_node).</span></font></div>
<div><font face="arial, sans-serif"><span style="white-space:nowrap"><br></span></font></div><div><font face="arial, sans-serif"><span style="white-space:nowrap">If my assumptions are wrong, is it possible to call pcp_recovery_node via interface?</span></font></div>
<div><font face="arial, sans-serif"><span style="white-space:nowrap"><br></span></font></div><div><font face="arial, sans-serif"><span style="white-space:nowrap">2. I could not find any documentation how to enable stop/start/restart buttons in pgpoolAdmin. Currently they are disabled. </span></font></div>
<div><font face="arial, sans-serif"><span style="white-space:nowrap">I am not certain what settings should enable this.</span></font></div><div><font face="arial, sans-serif"><span style="white-space:nowrap"><br>
</span></font></div><div>Thanks for your patience! :)</div><div><br></div><div>Cheers,</div><div>Gintautas</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Apr 10, 2014 at 8:38 AM, 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 Gintautas,<br>
<br>
I&#39;m sorry for replying late.<br>
<br>
Recovery scripts are executed by PostgreSQL, so clues would be in log outputs<br>
of backend server. Does the scripts have the permission to be executed by<br>
postgres user?<br>
<div class=""><br>
On Sat, 29 Mar 2014 19:35:32 +0000<br>
Gintautas Sulskus &lt;<a href="mailto:gingaz@gmail.com">gingaz@gmail.com</a>&gt; wrote:<br>
<br>
&gt; Hi Yugo,<br>
&gt;<br>
&gt; thanks for clarifying! Set up is working.<br>
&gt;<br>
&gt; I guess that a environment variable defiend in /etc/enviromment is reffered<br>
&gt; &gt; in pg_ni_up.sh but this doesn&#39;t work well, right?<br>
&gt;<br>
&gt;<br>
&gt; &gt; How about to try &#39;echo $PATH &gt; /tmp/test &#39; in pg_ni_up.sh?<br>
&gt; &gt; Is the $PATH (or other value) defined in /etc/environment output to<br>
&gt; &gt; /tmp/test or not?<br>
&gt;<br>
&gt;<br>
&gt;  Even $PATH was not displayed correctly. I presume it was issue with<br>
&gt; permissions, although it is not entirely clear to me what has caused this<br>
&gt; issue.<br>
&gt;<br>
&gt;<br>
&gt; I am still struggling with pgpool configuration though. Hopefully it is the<br>
&gt; last question. Could please anyone give any clues on this problem:<br>
&gt;<br>
&gt; I have tested my online recovery steps (1st and 2nd recovery) by manually<br>
&gt; running scripts. They work just fine. Everything gets logged properly.<br>
&gt;<br>
&gt; However, when I try to run pcp_recovery_node -d I get:<br>
&gt; DEBUG: send: tos=&quot;R&quot;, len=46<br>
&gt; DEBUG: recv: tos=&quot;r&quot;, len=21, data=AuthenticationOK<br>
&gt; DEBUG: send: tos=&quot;D&quot;, len=6<br>
&gt; DEBUG: recv: tos=&quot;e&quot;, len=20, data=recovery failed<br>
&gt; DEBUG: command failed. reason=recovery failed<br>
&gt; BackendError<br>
&gt; DEBUG: send: tos=&quot;X&quot;, len=4<br>
&gt;<br>
</div>&gt; *pgpool log output:*<br>
<div class="">&gt; (pgpool started in debug mode with debug_level=10)<br>
&gt; CHECKPOINT in the 1st stage done<br>
&gt; starting recovery command: &quot;SELECT pgpool_recovery(&#39;pg_1st_recovery&#39;,<br>
&gt; &#39;failed_node_ip_address&#39;, &#39;/data/postgres/main/&#39;)&quot;<br>
&gt; exec_recovery: pg_1st_recovery command failed at 1st stage<br>
&gt;<br>
</div>&gt; *pg_1st_recovery logs:*<br>
&gt; none<br>
&gt;<br>
&gt; *my pgpool configuration:*<br>
<div class="HOEnZb"><div class="h5">&gt; recovery_1st_stage_command=pg_1st_recovery<br>
&gt; (I expect $1 $2 $3 parameters from pgpool as in examples)<br>
&gt;<br>
&gt; Could you please give me any hints what could be wrong?<br>
&gt; Even a rough direction instead of &quot;BackendError&quot; would be extremely<br>
&gt; valuable.<br>
&gt;<br>
&gt; Thanks,<br>
&gt; Gintas<br>
&gt;<br>
&gt;<br>
&gt; On Wed, Mar 26, 2014 at 7:02 AM, Yugo Nagata &lt;<a href="mailto:nagata@sraoss.co.jp">nagata@sraoss.co.jp</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; Hi,<br>
&gt; &gt;<br>
&gt; &gt; On Fri, 21 Mar 2014 00:55:51 +0000<br>
&gt; &gt; Gintautas Sulskus &lt;<a href="mailto:gingaz@gmail.com">gingaz@gmail.com</a>&gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt; &gt; Hello,<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; more problems regarding watchdog:<br>
&gt; &gt; &gt; On one of the servers I see a log entry: &quot;wd_create_hb_send_socket:<br>
&gt; &gt; &gt; setsockopt(SO_BINDTODEVICE) requies root privilege&quot;.<br>
&gt; &gt; &gt; Any clues what this may be related to? I assume it&#39;s permission problem.<br>
&gt; &gt;<br>
&gt; &gt; You can ignore this message because SO_BINDTODEVICE is not necessary.<br>
&gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Much appreciated!<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Gintautas<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; On Fri, Mar 21, 2014 at 12:48 AM, Gintautas Sulskus &lt;<a href="mailto:gingaz@gmail.com">gingaz@gmail.com</a><br>
&gt; &gt; &gt;wrote:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Hello,<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; ifconfig_path = &#39;/home/ubuntu/apps/scripts&#39;<br>
&gt; &gt; &gt; &gt; PgpoolAdmin description of ifconfig_path is: The path of a command to<br>
&gt; &gt; &gt; &gt; switch the IP address. I understand it as the path for if_up_cmd<br>
&gt; &gt; &gt; &gt; and if_down_cmd commands.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; if_up_cmd = &#39;pg_ni_up.sh up eth0:1 10.0.1.244 255.255.255.0&#39;<br>
&gt; &gt; &gt; &gt; if_down_cmd = &#39;pg_ni_up.sh down eth0:1&#39;<br>
&gt; &gt;<br>
&gt; &gt; I guess that a environment variable defiend in /etc/enviromment is reffered<br>
&gt; &gt; in pg_ni_up.sh but this doesn&#39;t work well, right?<br>
&gt; &gt;<br>
&gt; &gt; How about to try &#39;echo $PATH &gt; /tmp/test &#39; in pg_ni_up.sh?<br>
&gt; &gt; Is the $PATH (or other value) defined in /etc/enviroment output to<br>
&gt; &gt; /tmp/test or not?<br>
&gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; PS. Is this mailing list the right place to discuss about PgpoolAdmin?<br>
&gt; &gt; &gt; &gt; In the latest PgpoolAdmin version &quot;if_*up*_cmd &quot; is described as &quot;The<br>
&gt; &gt; &gt; &gt; command to bring *down* the virtual IP&quot; and &quot;if_*down*_cmd&quot; as &quot;The<br>
&gt; &gt; &gt; &gt; command to bring *up* the virtual IP&quot;. Clearly descriptions are mixed<br>
&gt; &gt; up.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Gintautas<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; On Mon, Mar 10, 2014 at 2:46 AM, Yugo Nagata &lt;<a href="mailto:nagata@sraoss.co.jp">nagata@sraoss.co.jp</a>&gt;<br>
&gt; &gt; wrote:<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;&gt; Hi,<br>
&gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt;&gt; On Sun, 9 Mar 2014 03:00:52 +0000<br>
&gt; &gt; &gt; &gt;&gt; Gintautas Sulskus &lt;<a href="mailto:gingaz@gmail.com">gingaz@gmail.com</a>&gt; wrote:<br>
&gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt;&gt; &gt; Hello,<br>
&gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt;&gt; &gt; I am trying to set up pgpool watchdog. For virtual IP control my<br>
&gt; &gt; plan<br>
&gt; &gt; &gt; &gt;&gt; is to<br>
&gt; &gt; &gt; &gt;&gt; &gt; use bash scripts (if_up_cmd/if_down_cmd). In my script I use some<br>
&gt; &gt; &gt; &gt;&gt; &gt; environment variables.<br>
&gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt;&gt; &gt; A strange thing occurs here. No matter under what user I run pgpool,<br>
&gt; &gt; &gt; &gt;&gt; script<br>
&gt; &gt; &gt; &gt;&gt; &gt; can&#39;t pick up my custom environment variables from /etc/environment<br>
&gt; &gt; &gt; &gt;&gt; &gt; (including customised PATH). It still sees standard binaries like<br>
&gt; &gt; &gt; &gt;&gt; ifconfig<br>
&gt; &gt; &gt; &gt;&gt; &gt; though.<br>
&gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt;&gt; How do you configure pgpool.conf about if_up_cmd, if_down_cmd,<br>
&gt; &gt; &gt; &gt;&gt; ifconfig_path?<br>
&gt; &gt; &gt; &gt;&gt; pgpool see ifconfig commands on the path specified by these options.<br>
&gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt;&gt; &gt; Same script, when run manually by me, works under all users. Any<br>
&gt; &gt; ideas<br>
&gt; &gt; &gt; &gt;&gt; what<br>
&gt; &gt; &gt; &gt;&gt; &gt; can be wrong?<br>
&gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt;&gt; &gt; The only solution I have come up is to redefine env variables in the<br>
&gt; &gt; &gt; &gt;&gt; script.<br>
&gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt;&gt; &gt; Thanks.<br>
&gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt;&gt; &gt; Best Regards,<br>
&gt; &gt; &gt; &gt;&gt; &gt; Gintas<br>
&gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt;&gt; --<br>
&gt; &gt; &gt; &gt;&gt; Yugo Nagata &lt;<a href="mailto:nagata@sraoss.co.jp">nagata@sraoss.co.jp</a>&gt;<br>
&gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; --<br>
&gt; &gt; &gt; &gt; Best Regards,<br>
&gt; &gt; &gt; &gt; Gintautas Sulskus<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; --<br>
&gt; &gt; &gt; Best Regards,<br>
&gt; &gt; &gt; Gintautas Sulskus<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; --<br>
&gt; &gt; Yugo Nagata &lt;<a href="mailto:nagata@sraoss.co.jp">nagata@sraoss.co.jp</a>&gt;<br>
&gt; &gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Best Regards,<br>
&gt; Gintautas Sulskus<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><br clear="all"><div><br></div>-- <br>Best Regards,<br>Gintautas Sulskus
</div>