<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">返事してくださってありがとうございます。<div><br></div><div>Since there isn't any Debian package at the moment for pgpool 3.2.3, I will have to downgrade back to the official package (3.1) and try to use pgpool-ha instead of Watchdog. However, there doesn't seem to be any tutorial or user guide for pgpool-ha anywhere. &nbsp;Can anybody here point me to such a guide?</div><div><br></div><div>TIA,</div><div>Herouth</div><div><br><div><div>On 18/04/2013, at 10:23, Yugo Nagata wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>I see the pgpool's version is 3.2.2.<br><br><blockquote type="cite">Apr 17 13:00:27 pool01 pgpool: 2013-04-17 13:00:27 LOG: &nbsp;&nbsp;pid 13983: pgpool-II successfully started. version 3.2.2 (namameboshi)<br></blockquote><br>3.2.2 has a fatal problem with health checking and this is fixed at 3.2.3.<br><br>The release note of 3.2.3 is here.<br><a href="http://www.pgpool.net/docs/pgpool-II-3.2.3/NEWS.txt">http://www.pgpool.net/docs/pgpool-II-3.2.3/NEWS.txt</a><br><br>Could you please update your pgpool-II to 3.2.3?<br><br>On Wed, 17 Apr 2013 13:23:55 +0300<br>Herouth Maoz &lt;herouth@unicell.co.il&gt; wrote:<br><br><blockquote type="cite">Hello.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I am testing pgpool for high availability. I succeeded in setting up pgpool using the packages that come with current Debian (v 3.1), and streaming replication, and it worked well in the testing environment. <br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">However, now I want to set up two pgpools that use watchdog to connect to each other. To do this I upgraded the Debian packages to v. 3.2, and everything seemed OK - until I decided to test server failover again. That is, the watchdog setup works, but streaming replication with pgpool fails.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I then disabled the watchdog and tried to do what succeeded in version 3.1 - just control two servers with one pgpool and no watchdog. The test I'm trying to do is bring pgpool up when one of the servers is down, and the other is active. My goal is for pgpool to see that it has one active server, and then to allow me to do a base backup from the live server to the "dead" server and start replicating again.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">However, the main pgpool process dies immediately as I bring it up. All its subprocesses become attached to process #1.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">This is what I see in the log (I set debug_level to 5):<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Apr 17 13:00:27 pool01 pgpool: 2013-04-17 13:00:27 DEBUG: pid 14023: pool_initialize_private_backend_status: initialize backend status<br></blockquote><blockquote type="cite">Apr 17 13:00:27 pool01 pgpool: 2013-04-17 13:00:27 LOG: &nbsp;&nbsp;pid 13983: pgpool-II successfully started. version 3.2.2 (namameboshi)<br></blockquote><blockquote type="cite">Apr 17 13:00:27 pool01 pgpool: 2013-04-17 13:00:27 DEBUG: pid 14025: I am 14025<br></blockquote><blockquote type="cite">Apr 17 13:00:27 pool01 pgpool: 2013-04-17 13:00:27 DEBUG: pid 14025: pool_initialize_private_backend_status: initialize backend status<br></blockquote><blockquote type="cite">Apr 17 13:00:27 pool01 pgpool: 2013-04-17 13:00:27 DEBUG: pid 13983: pool_ssl: SSL requested but SSL support is not available<br></blockquote><blockquote type="cite">Apr 17 13:00:27 pool01 pgpool: 2013-04-17 13:00:27 ERROR: pid 13983: pool_flush_it: write failed to backend (0). reason: Connection refused offset: 0 wlen: 41<br></blockquote><blockquote type="cite">Apr 17 13:00:27 pool01 pgpool: 2013-04-17 13:00:27 LOG: &nbsp;&nbsp;pid 13983: degenerate_backend_set: 0 fail over request from pid 13983<br></blockquote><blockquote type="cite">Apr 17 13:00:27 pool01 pgpool: 2013-04-17 13:00:27 DEBUG: pid 14025: pool_ssl: SSL requested but SSL support is not available<br></blockquote><blockquote type="cite">Apr 17 13:00:27 pool01 pgpool: 2013-04-17 13:00:27 ERROR: pid 14025: pool_flush_it: write failed to backend (0). reason: Connection refused offset: 0 wlen: 41<br></blockquote><blockquote type="cite">Apr 17 13:00:27 pool01 pgpool: 2013-04-17 13:00:27 LOG: &nbsp;&nbsp;pid 14025: degenerate_backend_set: 0 fail over request from pid 14025<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">At this point, listing the processes, I see:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">UID &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PID &nbsp;PPID &nbsp;C STIME TTY &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TIME CMD<br></blockquote><blockquote type="cite">postgres 13984 &nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;0 13:00 pts/1 &nbsp;&nbsp;&nbsp;00:00:00 logger -t pgpool -p local0.info<br></blockquote><blockquote type="cite">postgres 13992 &nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;0 13:00 pts/1 &nbsp;&nbsp;&nbsp;00:00:00 pgpool: wait for connection request<br></blockquote><blockquote type="cite">postgres 13993 &nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;0 13:00 pts/1 &nbsp;&nbsp;&nbsp;00:00:00 pgpool: wait for connection request<br></blockquote><blockquote type="cite">postgres 13994 &nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;0 13:00 pts/1 &nbsp;&nbsp;&nbsp;00:00:00 pgpool: wait for connection request<br></blockquote><blockquote type="cite">postgres 13995 &nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;0 13:00 pts/1 &nbsp;&nbsp;&nbsp;00:00:00 pgpool: wait for connection request<br></blockquote><blockquote type="cite">postgres 13996 &nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;0 13:00 pts/1 &nbsp;&nbsp;&nbsp;00:00:00 pgpool: wait for connection request<br></blockquote><blockquote type="cite">postgres 13997 &nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;0 13:00 pts/1 &nbsp;&nbsp;&nbsp;00:00:00 pgpool: wait for connection request<br></blockquote><blockquote type="cite">postgres 13998 &nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;0 13:00 pts/1 &nbsp;&nbsp;&nbsp;00:00:00 pgpool: wait for connection request<br></blockquote><blockquote type="cite">postgres 13999 &nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;0 13:00 pts/1 &nbsp;&nbsp;&nbsp;00:00:00 pgpool: wait for connection request<br></blockquote><blockquote type="cite">postgres 14000 &nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;0 13:00 pts/1 &nbsp;&nbsp;&nbsp;00:00:00 pgpool: wait for connection request<br></blockquote><blockquote type="cite">postgres 14001 &nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;0 13:00 pts/1 &nbsp;&nbsp;&nbsp;00:00:00 pgpool: wait for connection request<br></blockquote><blockquote type="cite">postgres 14002 &nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;0 13:00 pts/1 &nbsp;&nbsp;&nbsp;00:00:00 pgpool: wait for connection request<br></blockquote><blockquote type="cite">postgres 14003 &nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;0 13:00 pts/1 &nbsp;&nbsp;&nbsp;00:00:00 pgpool: wait for connection request<br></blockquote><blockquote type="cite">postgres 14004 &nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;0 13:00 pts/1 &nbsp;&nbsp;&nbsp;00:00:00 pgpool: wait for connection request<br></blockquote><blockquote type="cite">postgres 14005 &nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;0 13:00 pts/1 &nbsp;&nbsp;&nbsp;00:00:00 pgpool: wait for connection request<br></blockquote><blockquote type="cite">postgres 14006 &nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;0 13:00 pts/1 &nbsp;&nbsp;&nbsp;00:00:00 pgpool: wait for connection request<br></blockquote><blockquote type="cite">postgres 14007 &nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;0 13:00 pts/1 &nbsp;&nbsp;&nbsp;00:00:00 pgpool: wait for connection request<br></blockquote><blockquote type="cite">postgres 14008 &nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;0 13:00 pts/1 &nbsp;&nbsp;&nbsp;00:00:00 pgpool: wait for connection request<br></blockquote><blockquote type="cite">postgres 14009 &nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;0 13:00 pts/1 &nbsp;&nbsp;&nbsp;00:00:00 pgpool: wait for connection request<br></blockquote><blockquote type="cite">postgres 14010 &nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;0 13:00 pts/1 &nbsp;&nbsp;&nbsp;00:00:00 pgpool: wait for connection request<br></blockquote><blockquote type="cite">postgres 14011 &nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;0 13:00 pts/1 &nbsp;&nbsp;&nbsp;00:00:00 pgpool: wait for connection request<br></blockquote><blockquote type="cite">postgres 14012 &nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;0 13:00 pts/1 &nbsp;&nbsp;&nbsp;00:00:00 pgpool: wait for connection request<br></blockquote><blockquote type="cite">postgres 14013 &nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;0 13:00 pts/1 &nbsp;&nbsp;&nbsp;00:00:00 pgpool: wait for connection request<br></blockquote><blockquote type="cite">postgres 14014 &nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;0 13:00 pts/1 &nbsp;&nbsp;&nbsp;00:00:00 pgpool: wait for connection request<br></blockquote><blockquote type="cite">postgres 14015 &nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;0 13:00 pts/1 &nbsp;&nbsp;&nbsp;00:00:00 pgpool: wait for connection request<br></blockquote><blockquote type="cite">postgres 14016 &nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;0 13:00 pts/1 &nbsp;&nbsp;&nbsp;00:00:00 pgpool: wait for connection request<br></blockquote><blockquote type="cite">postgres 14017 &nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;0 13:00 pts/1 &nbsp;&nbsp;&nbsp;00:00:00 pgpool: wait for connection request<br></blockquote><blockquote type="cite">postgres 14018 &nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;0 13:00 pts/1 &nbsp;&nbsp;&nbsp;00:00:00 pgpool: wait for connection request<br></blockquote><blockquote type="cite">postgres 14019 &nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;0 13:00 pts/1 &nbsp;&nbsp;&nbsp;00:00:00 pgpool: wait for connection request<br></blockquote><blockquote type="cite">postgres 14020 &nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;0 13:00 pts/1 &nbsp;&nbsp;&nbsp;00:00:00 pgpool: wait for connection request<br></blockquote><blockquote type="cite">postgres 14021 &nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;0 13:00 pts/1 &nbsp;&nbsp;&nbsp;00:00:00 pgpool: wait for connection request<br></blockquote><blockquote type="cite">postgres 14022 &nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;0 13:00 pts/1 &nbsp;&nbsp;&nbsp;00:00:00 pgpool: wait for connection request<br></blockquote><blockquote type="cite">postgres 14023 &nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;0 13:00 pts/1 &nbsp;&nbsp;&nbsp;00:00:00 pgpool: wait for connection request<br></blockquote><blockquote type="cite">postgres 14024 &nbsp;&nbsp;&nbsp;&nbsp;1 &nbsp;0 13:00 pts/1 &nbsp;&nbsp;&nbsp;00:00:00 pgpool: PCP: wait for connection request<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">As you can see, process 14025 has died, and all its children are now children of process 1.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Attempting to psql (pgpool is at port 5432 so I don't need to add parameters):<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">postgres@pool01:/etc/pgpool2$ psql<br></blockquote><blockquote type="cite">psql: postgres@pool01:/etc/pgpool2$ <br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">So it just prints "psql:" without newline and then dies. The exit status is 2.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">This gives me the following in the log:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Apr 17 13:14:20 pool01 pgpool: 2013-04-17 13:14:20 DEBUG: pid 14022: I am 14022 accept fd 6<br></blockquote><blockquote type="cite">Apr 17 13:14:20 pool01 pgpool: 2013-04-17 13:14:20 LOG: &nbsp;&nbsp;pid 14022: connection received: host=[local]<br></blockquote><blockquote type="cite">Apr 17 13:14:20 pool01 pgpool: 2013-04-17 13:14:20 DEBUG: pid 14022: read_startup_packet: application_name: psql<br></blockquote><blockquote type="cite">Apr 17 13:14:20 pool01 pgpool: 2013-04-17 13:14:20 DEBUG: pid 14022: Protocol Major: 3 Minor: 0 database: postgres user: postgres<br></blockquote><blockquote type="cite">Apr 17 13:14:20 pool01 pgpool: 2013-04-17 13:14:20 DEBUG: pid 14022: new_connection: connecting 0 backend<br></blockquote><blockquote type="cite">Apr 17 13:14:20 pool01 pgpool: 2013-04-17 13:14:20 DEBUG: pid 14022: new_connection: connecting 1 backend<br></blockquote><blockquote type="cite">Apr 17 13:14:20 pool01 pgpool: 2013-04-17 13:14:20 DEBUG: pid 14022: pool_ssl: SSL requested but SSL support is not available<br></blockquote><blockquote type="cite">Apr 17 13:14:20 pool01 pgpool: 2013-04-17 13:14:20 ERROR: pid 14022: pool_flush_it: write failed to backend (0). reason: Connection refused offset: 0 wlen: 84<br></blockquote><blockquote type="cite">Apr 17 13:14:20 pool01 pgpool: 2013-04-17 13:14:20 LOG: &nbsp;&nbsp;pid 14022: degenerate_backend_set: 0 fail over request from pid 14022<br></blockquote><blockquote type="cite">Apr 17 13:14:20 pool01 pgpool: 2013-04-17 13:14:20 ERROR: pid 14022: pool_flush_it: write failed to backend (0). reason: Broken pipe offset: 0 wlen: 5<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">And after this, process 14022 is also dead.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">What could be the problem here? Why doesn't it see that it has one backend and just connect to it? This is how it should work if in the past it had failed over to the second backend. By the way, here is what I get when I try to show the status of the backends:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">postgres@pool01:/etc/pgpool2$ /usr/sbin/pcp_node_info 10 localhost 9898 postgres pass123 0<br></blockquote><blockquote type="cite">pstgr01 5432 2 0.500000<br></blockquote><blockquote type="cite">postgres@pool01:/etc/pgpool2$ /usr/sbin/pcp_node_info 10 localhost 9898 postgres pass123 1<br></blockquote><blockquote type="cite">pstgr02 5432 2 0.500000<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">But this seems to say that he thinks both backends are OK!<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Can anybody explain what is happening or what I should look for?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thank you,<br></blockquote><blockquote type="cite">Herouth<br></blockquote><br>-- <br>Yugo Nagata &lt;nagata@sraoss.co.jp&gt;<br></div></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="direction: rtl; "><br class="Apple-interchange-newline">--</div><div style="direction: rtl; ">חרות מעוז</div><div style="direction: rtl; ">יוניסל פתרונות סלולריים מתקדמים</div><div style="direction: rtl; ">☎ 03-5181717 שלוחה 742</div></span>
</div>
<br></div></body></html>