<div dir="ltr">Hey Muhammad,<div><br></div><div>thank you for your prompt reply!</div><div><br></div><div>Any ideas how could it happen? I&#39;ve got following in my pgpool.conf:</div><div><br></div><div><div>backend_hostname0 = &#39;db1.tx.dev.mydomain&#39;</div><div>backend_port0 = 5432</div><div>backend_weight0 = 1</div><div>backend_data_directory0 = &#39;/var/lib/postgresql/9.4/main&#39;</div><div>backend_flag0 = &#39;ALLOW_TO_FAILOVER&#39;</div><div><br></div><div>backend_hostname1 = &#39;db2.tx.dev.mydomain&#39;</div><div>backend_port1 = 5432</div><div>backend_weight1 = 1</div><div>backend_data_directory1 = &#39;/var/lib/postgresql/9.4/main&#39;</div><div>backend_flag1 = &#39;ALLOW_TO_FAILOVER&#39;</div><div><br></div><div>fail_over_on_backend_error = on</div></div><div><br></div><div><div>Name:<span class="Apple-tab-span" style="white-space:pre">        </span>db1.tx.dev.mydomain</div><div>Address: 10.200.12.33</div></div><div><br></div><div><div>Name:<span class="Apple-tab-span" style="white-space:pre">        </span>db2.tx.dev.mydomain</div><div>Address: 10.200.12.34</div></div><div><br></div><div>Could you also please point a line from logs which leads you to this conclusion?</div><div><br></div><div>Thanks a lot!</div><div><br></div><div>Regards,</div><div>Max</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 30, 2015 at 12:36 PM, Muhammad Usama <span dir="ltr">&lt;<a href="mailto:m.usama@gmail.com" target="_blank">m.usama@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 Max<div><br></div><div>Thanks for sharing the logs. From the log it seems like both backend0 and backend1 are pointing to the same PostgreSQL server, so when that PG server goes down(which is actually both master and slave as per the configuration). pgpool-II is left with no valid PostgreSQL backend, As a result no new master node gets selected and eventually the failover.sh gets empty values for <span style="font-size:12.8000001907349px">new master hostname (%H) and database cluster path (%R) arguments.</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">Thanks and regards</span></div><div><span style="font-size:12.8000001907349px">Muhammad Usama</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 29, 2015 at 9:28 PM, Maksym Filenko <span dir="ltr">&lt;<a href="mailto:maksym.filenko@kreditech.com" target="_blank">maksym.filenko@kreditech.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">Hey Muhammad,<div><br></div><div>thank you for your reply!</div><div><br></div><div>Please, find gzipped logs attached below. pgpool-1 is for master, pgpool-2 is for standby. Master Postgres node was shutted down at 18:01:01. You can see a failover.sh call with insufficient parameters. It should be something like &#39;/srv/pgsql/bin/failover.sh 0 db2.tx.dev.mydomain&#39; (new master hostname).</div><div><br></div><div>Again, thank you!</div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 29, 2015 at 10:53 AM, Muhammad Usama <span dir="ltr">&lt;<a href="mailto:m.usama@gmail.com" target="_blank">m.usama@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<div><br></div><div>Can you please share the pgpool-II log with debug enabled.</div><div><br></div><div>Thanks </div><div>Best regards</div><div>Muhammad Usama</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Mon, Jul 27, 2015 at 8:18 PM, Maksym Filenko <span dir="ltr">&lt;<a href="mailto:maksym.filenko@kreditech.com" target="_blank">maksym.filenko@kreditech.com</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Hey everyone,<div><br></div><div>I&#39;ve set up exactly this configuration: <a href="http://www.pgpool.net/pgpool-web/contrib_docs/watchdog_master_slave_3.3/en.html" target="_blank">http://www.pgpool.net/pgpool-web/contrib_docs/watchdog_master_slave_3.3/en.html</a></div><div><br></div><div>I have two instances of pgpool-II version 3.3.4 (tokakiboshi) in front of two PostgreSQL 9.4.3.</div><div><br></div><div>I have following in my pgpool.conf:</div><div><br></div><div><div>failover_command = &#39;/var/lib/postgresql/9.4/main/failover.sh %d %P %H %R&#39;</div></div><div><br></div><div>When master goes down and failover occurs, pgpool passes nothing to failover.sh as the new master hostname (%H) and database cluster path (%R):</div><div><br></div><div>$ grep &#39;failover&#39; /var/log/messages</div><div><div>failover_handler: no valid DB node found</div><div>execute command: /var/lib/postgresql/9.4/main/failover.sh 0 0</div><div>failover: set new primary node: -1</div></div><div><br></div><div>If the slave fails, everything works as expected:</div><div><br></div><div><div>$ grep &#39;failover&#39; /var/log/messages<br></div><div>execute command: /var/lib/postgresql/9.4/main/failover.sh 1 0 <a href="http://db1.example.com" target="_blank">db1.example.com</a> /var/lib/postgresql/9.4/main</div><div>failover: set new primary node: 0</div><div>failover: set new master node: 0</div></div><div><br></div><div>Looks like pgpool doesn&#39;t see the slave to promote it.</div><div><br></div><div>Any clue would be extremely appreciated!</div><div><br></div><div>Best regards,</div><div>Max</div></div>
<br></div></div>_______________________________________________<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>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</blockquote></div><br></div>