<div dir="ltr">To add, if I execute query &quot;<span style="font-family:arial,sans-serif;font-size:13px">SELECT pgpool_recovery(&#39;pg_1st_</span><span style="font-family:arial,sans-serif;font-size:13px">recovery&#39;, &#39;failed_node_ip_address&#39;, &#39;/data/postgres/main/&#39;)&quot; directly, it works just fine and returns:</span><div>
<span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">pgpool_recovery = </span><span style="font-family:arial,sans-serif;font-size:13px">t</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Gintas</span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Sat, Mar 29, 2014 at 7:35 PM, Gintautas Sulskus <span dir="ltr">&lt;<a href="mailto:gingaz@gmail.com" target="_blank">gingaz@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi Yugo,<div><br></div><div>thanks for clarifying! Set up is working.<div class=""><br><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<span style="font-family:arial,sans-serif;font-size:13px">I guess that a environment variable defiend in /etc/enviromment is reffered<br></span><span style="font-family:arial,sans-serif;font-size:13px">in pg_ni_up.sh but this doesn&#39;t work well, right?</span> </blockquote>

</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">How about to try &#39;echo $PATH &gt; /tmp/test &#39; in pg_ni_up.sh?<br>
</span></div><span style="font-family:arial,sans-serif;font-size:13px">Is the $PATH (or other value) defined in /etc/environment output to<br></span><span style="font-family:arial,sans-serif;font-size:13px">/tmp/test or not?</span></blockquote>

<div><br></div><div> Even $PATH was not displayed correctly. I presume it was issue with permissions, although it is not entirely clear to me what has caused this issue.</div></div><div><br></div><div><br></div><div>I am still struggling with pgpool configuration though. Hopefully it is the last question. Could please anyone give any clues on this problem:</div>

<div><br></div><div>I have tested my online recovery steps (1st and 2nd recovery) by manually running scripts. They work just fine. Everything gets logged properly.</div><div><br></div><div>However, when I try to run pcp_recovery_node -d I get:</div>

DEBUG: send: tos=&quot;R&quot;, len=46<br>DEBUG: recv: tos=&quot;r&quot;, len=21, data=AuthenticationOK<br>DEBUG: send: tos=&quot;D&quot;, len=6<br>DEBUG: recv: tos=&quot;e&quot;, len=20, data=recovery failed<br>DEBUG: command failed. reason=recovery failed<br>

BackendError<br>DEBUG: send: tos=&quot;X&quot;, len=4<div><br></div><div><b>pgpool log output:</b></div><div>(pgpool started in debug mode with debug_level=10)<br>CHECKPOINT in the 1st stage done<br>starting recovery command: &quot;SELECT pgpool_recovery(&#39;pg_1st_recovery&#39;, &#39;failed_node_ip_address&#39;, &#39;/data/postgres/main/&#39;)&quot;<br>

exec_recovery: pg_1st_recovery command failed at 1st stage</div><div><br></div><div><b>pg_1st_recovery logs:</b><br><div>none</div><div><br></div><div><b>my pgpool configuration:</b></div>recovery_1st_stage_command=pg_1st_recovery </div>

<div>(I expect $1 $2 $3 parameters from pgpool as in examples)</div><div><br></div><div>Could you please give me any hints what could be wrong? </div><div>Even a rough direction instead of &quot;BackendError&quot; would be extremely valuable. </div>

<div><div><br></div></div><div>Thanks,</div><div>Gintas</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Mar 26, 2014 at 7:02 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,<br>
<br>
On Fri, 21 Mar 2014 00:55:51 +0000<br>
<div>Gintautas Sulskus &lt;<a href="mailto:gingaz@gmail.com" target="_blank">gingaz@gmail.com</a>&gt; wrote:<br>
<br>
&gt; Hello,<br>
&gt;<br>
</div><div>&gt; more problems regarding watchdog:<br>
&gt; On one of the servers I see a log entry: &quot;wd_create_hb_send_socket:<br>
&gt; setsockopt(SO_BINDTODEVICE) requies root privilege&quot;.<br>
&gt; Any clues what this may be related to? I assume it&#39;s permission problem.<br>
<br>
</div>You can ignore this message because SO_BINDTODEVICE is not necessary.<br>
<div><br>
&gt;<br>
&gt; Much appreciated!<br>
&gt;<br>
&gt; Gintautas<br>
&gt;<br>
&gt;<br>
&gt; On Fri, Mar 21, 2014 at 12:48 AM, Gintautas Sulskus &lt;<a href="mailto:gingaz@gmail.com" target="_blank">gingaz@gmail.com</a>&gt;wrote:<br>
&gt;<br>
&gt; &gt; Hello,<br>
&gt; &gt;<br>
&gt; &gt; ifconfig_path = &#39;/home/ubuntu/apps/scripts&#39;<br>
&gt; &gt; PgpoolAdmin description of ifconfig_path is: The path of a command to<br>
&gt; &gt; switch the IP address. I understand it as the path for if_up_cmd<br>
&gt; &gt; and if_down_cmd commands.<br>
&gt; &gt;<br>
&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; if_down_cmd = &#39;pg_ni_up.sh down eth0:1&#39;<br>
<br>
</div>I guess that a environment variable defiend in /etc/enviromment is reffered<br>
in pg_ni_up.sh but this doesn&#39;t work well, right?<br>
<br>
How about to try &#39;echo $PATH &gt; /tmp/test &#39; in pg_ni_up.sh?<br>
Is the $PATH (or other value) defined in /etc/enviroment output to<br>
/tmp/test or not?<br>
<div><br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; PS. Is this mailing list the right place to discuss about PgpoolAdmin?<br>
</div><div>&gt; &gt; In the latest PgpoolAdmin version &quot;if_*up*_cmd &quot; is described as &quot;The<br>
</div>&gt; &gt; command to bring *down* the virtual IP&quot; and &quot;if_*down*_cmd&quot; as &quot;The<br>
&gt; &gt; command to bring *up* the virtual IP&quot;. Clearly descriptions are mixed up.<br>
<div><div>&gt; &gt;<br>
&gt; &gt; Gintautas<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; On Mon, Mar 10, 2014 at 2:46 AM, Yugo Nagata &lt;<a href="mailto:nagata@sraoss.co.jp" target="_blank">nagata@sraoss.co.jp</a>&gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt;&gt; Hi,<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; On Sun, 9 Mar 2014 03:00:52 +0000<br>
&gt; &gt;&gt; Gintautas Sulskus &lt;<a href="mailto:gingaz@gmail.com" target="_blank">gingaz@gmail.com</a>&gt; wrote:<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; &gt; Hello,<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt; I am trying to set up pgpool watchdog. For virtual IP control my plan<br>
&gt; &gt;&gt; is to<br>
&gt; &gt;&gt; &gt; use bash scripts (if_up_cmd/if_down_cmd). In my script I use some<br>
&gt; &gt;&gt; &gt; environment variables.<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt; A strange thing occurs here. No matter under what user I run pgpool,<br>
&gt; &gt;&gt; script<br>
&gt; &gt;&gt; &gt; can&#39;t pick up my custom environment variables from /etc/environment<br>
&gt; &gt;&gt; &gt; (including customised PATH). It still sees standard binaries like<br>
&gt; &gt;&gt; ifconfig<br>
&gt; &gt;&gt; &gt; though.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; How do you configure pgpool.conf about if_up_cmd, if_down_cmd,<br>
&gt; &gt;&gt; ifconfig_path?<br>
&gt; &gt;&gt; pgpool see ifconfig commands on the path specified by these options.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt; Same script, when run manually by me, works under all users. Any ideas<br>
&gt; &gt;&gt; what<br>
&gt; &gt;&gt; &gt; can be wrong?<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt; The only solution I have come up is to redefine env variables in the<br>
&gt; &gt;&gt; script.<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt; Thanks.<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt; Best Regards,<br>
&gt; &gt;&gt; &gt; Gintas<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; --<br>
&gt; &gt;&gt; Yugo Nagata &lt;<a href="mailto:nagata@sraoss.co.jp" target="_blank">nagata@sraoss.co.jp</a>&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; --<br>
&gt; &gt; Best Regards,<br>
&gt; &gt; Gintautas Sulskus<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><font color="#888888">--<br>
Yugo Nagata &lt;<a href="mailto:nagata@sraoss.co.jp" target="_blank">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>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Best Regards,<br>Gintautas Sulskus
</div>