<div dir="ltr">To add, if I execute query "<span style="font-family:arial,sans-serif;font-size:13px">SELECT pgpool_recovery('pg_1st_</span><span style="font-family:arial,sans-serif;font-size:13px">recovery', 'failed_node_ip_address', '/data/postgres/main/')" 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"><<a href="mailto:gingaz@gmail.com" target="_blank">gingaz@gmail.com</a>></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'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 'echo $PATH > /tmp/test ' 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="R", len=46<br>DEBUG: recv: tos="r", len=21, data=AuthenticationOK<br>DEBUG: send: tos="D", len=6<br>DEBUG: recv: tos="e", len=20, data=recovery failed<br>DEBUG: command failed. reason=recovery failed<br>

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