<div dir="ltr"><div><div>Hi Peng!<br></div>As in the configuration:<br>
<span style="color:rgb(0,0,255)">backend_hostname0 = '172.17.0.2'</span><br></div>
172.17.0.2 is primary by default, or does pgpool think otherwise? How can I check?<br><div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 3, 2023 at 4:29 PM Bo Peng <<a href="mailto:pengbo@sraoss.co.jp">pengbo@sraoss.co.jp</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
> I have tested local postgresql, and it is ok for psql works:<br>
> psql -h 127.0.0.1 -U checker -c '\l' template1<br>
> But as I add in `-p 9999` the pgpool is down:<br>
> psql -h 127.0.0.1 -p 9999 -U checker -c '\l' template1<br>
> And I have found the latest log with these lines repeating:<br>
<br>
You need to make sure PostgreSQL primary is running before pgpool starts.<br>
If pgpool can't find any running PostgreSQL primary within "search_primary_node_timeout",<br>
Pgpool believes all backend nodes are down and will not accepting any new connections.<br>
<br>
On Thu, 29 Jun 2023 15:04:17 +0800<br>
Zhaoxun Yan <<a href="mailto:yan.zhaoxun@gmail.com" target="_blank">yan.zhaoxun@gmail.com</a>> wrote:<br>
<br>
> I have also tested connecting postgres directly via ip address registered<br>
> as first backend in pgpool.conf<br>
> backend_hostname0 = '172.17.0.2'<br>
> <br>
> And it works:<br>
> # psql -h 172.17.0.2 -p 5432 -U checker -c '\l' template1<br>
> Password for user checker:<br>
> List of databases<br>
> Name | Owner | Encoding | Collate | Ctype | Access<br>
> privileges<br>
> -----------+----------+----------+-------------+-------------+-----------------------<br>
> postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |<br>
> template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres<br>
> +<br>
> | | | | |<br>
> postgres=CTc/postgres<br>
> template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres<br>
> +<br>
> | | | | |<br>
> postgres=CTc/postgres+<br>
> | | | | |<br>
> checker=CTc/postgres<br>
> (3 rows)<br>
> <br>
> while pgpool getsdozens of subprocess waiting for connection, it still<br>
> believes that all nodes are down:<br>
> <br>
> # ps aux|grep pgpool|grep -v grep<br>
> root 100949 0.0 17.5 149080 137180 ? Ss Jun28 0:00 pgpool<br>
> root 100950 0.0 0.3 15308 2932 ? S Jun28 0:00 pgpool:<br>
> PgpoolLogger<br>
> root 100953 0.0 0.3 149080 2784 ? S Jun28 0:00 pgpool:<br>
> wait for connection request<br>
> root 100955 0.0 0.3 149080 2784 ? S Jun28 0:00 pgpool:<br>
> wait for connection request<br>
> root 100956 0.0 0.3 149080 2784 ? S Jun28 0:00 pgpool:<br>
> wait for connection request<br>
> root 100958 0.0 0.3 149080 2784 ? S Jun28 0:00 pgpool:<br>
> wait for connection request<br>
> root 100959 0.0 0.3 149080 2784 ? S Jun28 0:00 pgpool:<br>
> wait for connection request<br>
> root 100960 0.0 0.3 149080 2784 ? S Jun28 0:00 pgpool:<br>
> wait for connection request<br>
> root 100961 0.0 0.3 149080 2784 ? S Jun28 0:00 pgpool:<br>
> wait for connection request<br>
> root 100962 0.0 0.3 149080 2784 ? S Jun28 0:00 pgpool:<br>
> wait for connection request<br>
> root 100963 0.0 0.3 149080 2784 ? S Jun28 0:00 pgpool:<br>
> wait for connection request<br>
> root 100964 0.0 0.3 149080 2784 ? S Jun28 0:00 pgpool:<br>
> wait for connection request<br>
> root 100966 0.0 0.3 149080 2784 ? S Jun28 0:00 pgpool:<br>
> wait for connection request<br>
> root 100967 0.0 0.3 149080 2784 ? S Jun28 0:00 pgpool:<br>
> wait for connection request<br>
> root 100969 0.0 0.3 149080 2784 ? S Jun28 0:00 pgpool:<br>
> wait for connection request<br>
> root 100970 0.0 0.3 149080 2784 ? S Jun28 0:00 pgpool:<br>
> wait for connection request<br>
> root 100971 0.0 0.3 149080 2788 ? S Jun28 0:00 pgpool:<br>
> wait for connection request<br>
> root 100972 0.0 0.3 149080 2788 ? S Jun28 0:00 pgpool:<br>
> wait for connection request<br>
> root 100973 0.0 0.3 149080 2788 ? S Jun28 0:00 pgpool:<br>
> wait for connection request<br>
> root 100974 0.0 0.3 149080 2788 ? S Jun28 0:00 pgpool:<br>
> wait for connection request<br>
> root 100975 0.0 0.3 149080 2788 ? S Jun28 0:00 pgpool:<br>
> wait for connection request<br>
> root 100977 0.0 0.3 149080 2788 ? S Jun28 0:00 pgpool:<br>
> wait for connection request<br>
> root 100978 0.0 0.3 149080 2788 ? S Jun28 0:00 pgpool:<br>
> wait for connection request<br>
> root 100981 0.0 0.3 149080 2788 ? S Jun28 0:00 pgpool:<br>
> wait for connection request<br>
> root 100982 0.0 0.3 149080 2788 ? S Jun28 0:00 pgpool:<br>
> wait for connection request<br>
> root 100983 0.0 0.3 149080 2788 ? S Jun28 0:00 pgpool:<br>
> wait for connection request<br>
> root 101010 0.0 0.1 149084 1352 ? S Jun28 0:00 pgpool:<br>
> PCP: wait for connection request<br>
> root 101011 0.0 0.1 149080 1352 ? S Jun28 0:00 pgpool:<br>
> worker process<br>
> <br>
> ---------- Forwarded message ---------<br>
> From: Zhaoxun Yan <<a href="mailto:yan.zhaoxun@gmail.com" target="_blank">yan.zhaoxun@gmail.com</a>><br>
> Date: Wed, Jun 28, 2023 at 4:47 PM<br>
> Subject: pgpool is not accepting connections<br>
> To: <<a href="mailto:pgpool-general@pgpool.net" target="_blank">pgpool-general@pgpool.net</a>><br>
> <br>
> <br>
> Hi guys!<br>
> <br>
> I have tested local postgresql, and it is ok for psql works:<br>
> psql -h 127.0.0.1 -U checker -c '\l' template1<br>
> But as I add in `-p 9999` the pgpool is down:<br>
> psql -h 127.0.0.1 -p 9999 -U checker -c '\l' template1<br>
> And I have found the latest log with these lines repeating:<br>
> <br>
> 2023-06-28 16:36:22.928: child pid 100980: FATAL: pgpool is not accepting<br>
> any new connections<br>
> 2023-06-28 16:36:22.928: child pid 100980: DETAIL: all backend nodes are<br>
> down, pgpool requires at least one valid node<br>
> 2023-06-28 16:36:22.928: child pid 100980: HINT: repair the backend nodes<br>
> and restart pgpool<br>
> 2023-06-28 16:36:22.928: main pid 100949: LOG: reaper handler<br>
> 2023-06-28 16:36:22.929: main pid 100949: LOG: child process with pid:<br>
> 100980 exited with success and will not be restarted<br>
> 2023-06-28 16:36:22.929: main pid 100949: LOG: reaper handler: exiting<br>
> normally<br>
> 2023-06-28 16:36:28.899: child pid 100976: FATAL: pgpool is not accepting<br>
> any new connections<br>
> <br>
> Attached is the current pgpool configuration.<br>
<br>
<br>
-- <br>
Bo Peng <<a href="mailto:pengbo@sraoss.co.jp" target="_blank">pengbo@sraoss.co.jp</a>><br>
SRA OSS LLC<br>
TEL: 03-5979-2701 FAX: 03-5979-2702<br>
URL: <a href="https://www.sraoss.co.jp/" rel="noreferrer" target="_blank">https://www.sraoss.co.jp/</a><br>
</blockquote></div>