<div dir="ltr"><div dir="ltr">Hello<div><br></div><div>I am following this link, which is pgpool2 v4.1. </div><div><br></div><div><a href="https://www.pgpool.net/docs/41/en/html/example-cluster.html">https://www.pgpool.net/docs/41/en/html/example-cluster.html</a><br></div><div><br></div><div>On my Ubuntu setup also that is the latest I can get: <b>4.1.4-3.pgdg20.04+2</b></div><div><br></div><div>If you still insist, I will try to set it up, but I guess you are quoting from this link: </div><div><br></div><div><a href="https://www.pgpool.net/docs/latest/en/html/example-cluster.html#EXAMPLE-CLUSTER-PGPOOL-NODE-ID">https://www.pgpool.net/docs/latest/en/html/example-cluster.html#EXAMPLE-CLUSTER-PGPOOL-NODE-ID</a><br></div><div><br></div><div>It is a more recent version of pgpool2 than what I have.</div><div><br></div><div>-Nirav</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Oct 30, 2021 at 7:03 PM Luca Maranzano <<a href="mailto:liuk001@gmail.com">liuk001@gmail.com</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"><div dir="ltr"><div style="font-size:small">Hello,</div><div style="font-size:small">I think that the pgpool_node_id file is mandatory since it is used by every server to identify itself in the cluster with its node id.</div><div style="font-size:small">Where is it documented that it is not necessary?<br></div><div style="font-size:small"><br></div><div style="font-size:small">Try to configure it</div><div style="font-size:small"><br></div><div style="font-size:small">HTH</div><div style="font-size:small">Regards</div><div style="font-size:small">Luca</div><div style="font-size:small"><br></div><div style="font-size:small"><br></div><div style="font-size:small"><br></div><div style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Oct 30, 2021 at 5:42 PM Nirav Bhatt <<a href="mailto:niravbhatt.cpp@gmail.com" target="_blank">niravbhatt.cpp@gmail.com</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"><div dir="ltr"><div>Hello</div><div>Sorry for the late answer.</div><div><br></div>I now made pgpool.conf identical on all 3 servers, then restarted postgresql and pgpool2 services.<div><br></div><div>I opened ports on each server: 22, 9999/tcp, 9898/tcp, 9000/tcp, 9694/udp, 5433, 5432</div><div><br><div>Yet the problem persists on server2 and server3 - it can not connect to 9000 port (on themselves)</div><div>Server1 pgpool seems to be running without problem.<div><br></div><div>I am attaching my pgpool.conf file. Also, I am attaching pgpool2 service logs from all 3 servers.</div><div><br></div><div>10.192.10.10 server1<br>10.192.11.20 server2<br>10.192.12.30 server3<br></div><div><br></div><div>Virtual IP is 20.20.20.20</div><div><br></div><div>I am running the following pgpool2 version so I do not think I need pgpool_node_id file.</div><div><br></div><div>4.1.4-3.pgdg20.04+2<br></div><div><br></div><div>Thanks for the support,</div><div>-Nirav</div><div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 27, 2021 at 8:48 AM Luca Maranzano <<a href="mailto:liuk001@gmail.com" target="_blank">liuk001@gmail.com</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"><div dir="ltr"><div style="font-size:small">Hi, still not clear to me, from the doc:</div><div style="font-size:small"><br></div><div style="font-size:small"><h2><a name="m_1767960571698190553_m_-4340367351515201548_m_-36142555867749866_m_37919857654363922_EXAMPLE-CLUSTER-PGPOOL-NODE-ID">8.2.5. Create pgpool_node_id</a></h2><p>    From <span>Pgpool-II</span> 4.2, now all configuration parameters are identical on all hosts.
    If <tt>watchdog</tt> feature is enabled, to distingusish which host is which,
    a <tt>pgpool_node_id</tt> file is required.
    You need to create a <tt>pgpool_node_id</tt> file and specify the pgpool (watchdog) node number
    (e.g. 0, 1, 2 ...) to identify pgpool (watchdog) host. <br></p><p>In our systems the pgpool.conf are *identical *</p><p><br></p></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 26, 2021 at 8:09 PM Nirav Bhatt <<a href="mailto:niravbhatt.cpp@gmail.com" target="_blank">niravbhatt.cpp@gmail.com</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"><div><div dir="auto">The difference lies in “other” server host names.</div></div><div><div dir="auto"><br></div><div dir="auto">-Nirav </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 26 Oct 2021 at 21.07, Luca Maranzano <<a href="mailto:liuk001@gmail.com" target="_blank">liuk001@gmail.com</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"><div dir="ltr"><div style="font-size:small">Hi,<br></div><div style="font-size:small"><br></div><div style="font-size:small">AFAIK the pgpool.conf file must be identical on all cluster nodes.</div><div style="font-size:small">Which are the differences in detail?</div><div style="font-size:small"><br></div><div style="font-size:small">Cheers</div></div><div dir="ltr"><div style="font-size:small">Luca</div><div style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Oct 25, 2021 at 9:46 PM Nirav Bhatt <<a href="mailto:niravbhatt.cpp@gmail.com" target="_blank">niravbhatt.cpp@gmail.com</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"><div dir="ltr">I added all ports via ufw on server1: 22,9999,9898,9000,9694,5433,5432<div><br><div>I enabled firewall past that point.</div><div><br></div><div>I diffed all conf files across servers - all files are same, including hba and .pgpass and .pcppass. </div><div>Only pgpool.conf files differ, that too in parameters like server hosts for pgpool and watchdog, no other differences.</div><div><br></div><div>No error is observed on primary server1. The last log lines on server1 says: new watchdog node connection is received from <server2> or <server3></div><div><br></div><div>But secondary server pgpool2 keeps exiting with: </div><div><br></div><div>Add to watchdog cluster request is rejected by node "server1:9000"<br></div><div><br></div><div>I somehow suspect it has to do with wd_authkey which I leave empty:  <a href="https://www.sraoss.jp/pipermail/pgpool-hackers/2017-August/002497.html" target="_blank">https://www.sraoss.jp/pipermail/pgpool-hackers/2017-August/002497.html</a></div><div><br></div><div>But it is an old issue, so I can't say for sure.</div><div><br></div><div>-Nirav</div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Oct 25, 2021 at 8:07 PM Luca Maranzano <<a href="mailto:liuk001@gmail.com" target="_blank">liuk001@gmail.com</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"><div dir="ltr"><div style="font-size:small">Firewall-cmd has to be used on Redhat derived flavours, on Ubuntu standard is ufw, so "ufw disable" should open all ports<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Oct 25, 2021 at 6:59 PM Nirav Bhatt <<a href="mailto:niravbhatt.cpp@gmail.com" target="_blank">niravbhatt.cpp@gmail.com</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"><div dir="ltr">I ran sudo ufw status and firewall is already inactive. <div><br></div><div>Not sure what firewall-cmd did for all the pgpool ports. (they are showing as list of open ports)</div><div><br></div><div>Should add them all via ufw also?</div><div><br></div><div>-Nirav</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Oct 25, 2021 at 7:46 PM Luca Maranzano <<a href="mailto:liuk001@gmail.com" target="_blank">liuk001@gmail.com</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"><div dir="ltr"><div style="font-size:small">Try to disable firewall to see it it's related, all the pgpool configuration files are identical on the 3 nodes?<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Oct 25, 2021 at 6:41 PM Nirav Bhatt <<a href="mailto:niravbhatt.cpp@gmail.com" target="_blank">niravbhatt.cpp@gmail.com</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"><div dir="ltr">Hello,<div><br></div><div>Thanks for the response.</div><div><br></div><div>I restarted pgpool2 service on all 3 nodes (with some delay, and in the order: primary, secondary1, secondary2).</div><div>My primary pgpool2 service logs do show </div><div><br></div><div>LOG:  new watchdog node connection is received from <secondary host></div><div><br></div><div>But my secondary pgpool2 service logs (among other normal messages) show:</div><div><br></div><div>FATAL:  Add to watchdog cluster request is rejected by node "server1:9000"<br></div><div>FATAL:  watchdog child process exit with fatal error. exiting pgpool-II<br></div><div>LOG:  watchdog node state changed from [DEAD] to [LOADING]<br></div><div>LOG:  new outbound connection to server1:9000<br></div><div>FATAL:  Add to watchdog cluster request is rejected by node "server1:9000"<br></div><div>HINT:  check the watchdog configurations.<br></div><div>LOG:  Watchdog is shutting down<br></div><div><br></div><div>I checked that server1 has 9000 port open, along with 9999, 9898 and 9694:</div><div><br></div><div>> firewall-cmd --list-ports<br></div><div>9999/tcp 9898/tcp 9000/tcp 9694/udp<br></div><div><br></div><div>What could be going on?</div><div><br></div><div>-Nirav</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Oct 25, 2021 at 7:13 PM Luca Maranzano <<a href="mailto:liuk001@gmail.com" target="_blank">liuk001@gmail.com</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"><div dir="ltr"><div style="font-size:small">Hi,</div><div style="font-size:small"><br></div><div style="font-size:small">if you cannot connect to <span class="gmail_default" style="font-size:small"></span>20.20.20.20 -p 9999 it means that hte PGPool cluster is not well formed and that the VIP has not been enabled.</div><div style="font-size:small"><br></div><div style="font-size:small">You can check that with pcp_watchdog_info.</div><div style="font-size:small">The logs from pgpool should also help to diagnose the problem.</div><div style="font-size:small"><br></div><div style="font-size:small">HTH</div><div style="font-size:small">Regards</div><div style="font-size:small">Luca</div><div style="font-size:small"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">---------- Forwarded message ---------<br>From: <span dir="auto"><<a href="mailto:pgpool-general-request@pgpool.net" target="_blank">pgpool-general-request@pgpool.net</a>></span><br>Date: Mon, Oct 25, 2021 at 5:00 AM<br>Subject: pgpool-general Digest, Vol 120, Issue 45<br>To:  <<a href="mailto:pgpool-general@pgpool.net" target="_blank">pgpool-general@pgpool.net</a>><br></div><br><br>Send pgpool-general mailing list submissions to<br>
        <a href="mailto:pgpool-general@pgpool.net" target="_blank">pgpool-general@pgpool.net</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="https://www.pgpool.net/mailman/listinfo/pgpool-general" rel="noreferrer" target="_blank">https://www.pgpool.net/mailman/listinfo/pgpool-general</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:pgpool-general-request@pgpool.net" target="_blank">pgpool-general-request@pgpool.net</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:pgpool-general-owner@pgpool.net" target="_blank">pgpool-general-owner@pgpool.net</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of pgpool-general digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. [pgpool-general: 7822] Pgpool2 example with watchdog: Unable<br>
      to test (Nirav Bhatt)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Sun, 24 Oct 2021 20:18:28 +0300<br>
From: Nirav Bhatt <<a href="mailto:niravbhatt.cpp@gmail.com" target="_blank">niravbhatt.cpp@gmail.com</a>><br>
To: <a href="mailto:pgpool-general@pgpool.net" target="_blank">pgpool-general@pgpool.net</a><br>
Subject: [pgpool-general: 7822] Pgpool2 example with watchdog: Unable<br>
        to test<br>
Message-ID:<br>
        <CABz_77PMu9ksuYM2QGBaAuf=m_edGoKcidmWqC=K7Rpr=<a href="mailto:J_ZGw@mail.gmail.com" target="_blank">J_ZGw@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
After doing all the config (config files, passwordless ssh, firewall-cmd<br>
etc) as given in the following link, I am unable to test my setup. My OS is<br>
Ubuntu 20.04.3 LTS.<br>
<br>
<a href="https://www.pgpool.net/docs/41/en/html/example-cluster.html#EXAMPLE-CLUSTER-STRUCTURE" rel="noreferrer" target="_blank">https://www.pgpool.net/docs/41/en/html/example-cluster.html#EXAMPLE-CLUSTER-STRUCTURE</a><br>
<br>
All the port numbers are as listed in the example.<br>
<br>
The part in example section: 8.3.7.1 and onwards is not working.<br>
<br>
When I run on server1 (my primary):<br>
psql -h <span class="gmail_default" style="font-size:small"></span>20.20.20.20 -p 9999 -U pgpool postgres -c "show pool_nodes"<br>
<br>
I got error:<br>
<br>
psql: error: connection to server at "20.20.20.20", port 9999 failed:<br>
Connection refused<br>
Is the server running on that host and accepting TCP/IP connections?<br>
<br>
I restarted postgresql and pgpool2 services time and again.<br>
<br>
pgpool2 service most recent logs:<br>
<br>
server1 (current primary):<br>
Oct 24 17:01:41 ip-10-192-10-10 pgpool[104691]: 2021-10-24 17:01:41: pid<br>
104691: LOG:  new watchdog node connection is received from "<server1<br>
host>:16553"<br>
Oct 24 17:01:41 ip-10-192-10-10 pgpool[104691]: 2021-10-24 17:01:41: pid<br>
104691: LOG:  new watchdog node connection is received from "<server1<br>
host>:17577"<br>
Oct 24 17:04:02 ip-10-192-10-10 pgpool[104691]: 2021-10-24 17:04:02: pid<br>
104691: LOG:  new watchdog node connection is received from "<server2<br>
host>:49304"<br>
Oct 24 17:04:02 ip-10-192-10-10 pgpool[104691]: 2021-10-24 17:04:02: pid<br>
104691: LOG:  new watchdog node connection is received from "<server2<br>
host>:50328"<br>
Oct 24 17:11:12 ip-10-192-10-10 pgpool[104691]: 2021-10-24 17:11:12: pid<br>
104691: LOG:  new watchdog node connection is received from "<server3<br>
host>:51864"<br>
Oct 24 17:11:12 ip-10-192-10-10 pgpool[104691]: 2021-10-24 17:11:12: pid<br>
104691: LOG:  new watchdog node connection is received from "<server3<br>
host>:52888"<br>
<br>
server2 and server3 (looks like pgpool2 service is failing):<br>
<br>
Oct 24 17:11:12 ip-10-192-12-30 pgpool[125018]: 2021-10-24 17:11:12: pid<br>
125018: LOG:  setting the local watchdog node name to "server3:5433 Linux<br>
ip-<server 3 host>"<br>
Oct 24 17:11:12 ip-10-192-12-30 pgpool[125018]: 2021-10-24 17:11:12: pid<br>
125018: LOG:  watchdog cluster is configured with 2 remote nodes<br>
Oct 24 17:11:12 ip-10-192-12-30 pgpool[125018]: 2021-10-24 17:11:12: pid<br>
125018: LOG:  watchdog remote node:0 on server1:9000<br>
Oct 24 17:11:12 ip-10-192-12-30 pgpool[125018]: 2021-10-24 17:11:12: pid<br>
125018: LOG:  watchdog remote node:1 on server2:9000<br>
Oct 24 17:11:12 ip-10-192-12-30 pgpool[125018]: 2021-10-24 17:11:12: pid<br>
125018: LOG:  interface monitoring is disabled in watchdog<br>
Oct 24 17:11:12 ip-10-192-12-30 pgpool[125018]: 2021-10-24 17:11:12: pid<br>
125018: LOG:  watchdog node state changed from [DEAD] to [LOADING]<br>
Oct 24 17:11:12 ip-10-192-12-30 pgpool[125018]: 2021-10-24 17:11:12: pid<br>
125018: LOG:  new outbound connection to server1:9000<br>
Oct 24 17:11:12 ip-10-192-12-30 pgpool[125018]: 2021-10-24 17:11:12: pid<br>
125018: FATAL:  Add to watchdog cluster request is rejected by node<br>
"server1:9000"<br>
Oct 24 17:11:12 ip-10-192-12-30 pgpool[125018]: 2021-10-24 17:11:12: pid<br>
125018: HINT:  check the watchdog configurations.<br>
Oct 24 17:11:12 ip-10-192-12-30 pgpool[125018]: 2021-10-24 17:11:12: pid<br>
125018: LOG:  Watchdog is shutting down<br>
Oct 24 17:11:12 ip-10-192-12-30 pgpool[125014]: 2021-10-24 17:11:12: pid<br>
125014: LOG:  watchdog child process with pid: 125018 exits with status 768<br>
Oct 24 17:11:12 ip-10-192-12-30 pgpool[125014]: 2021-10-24 17:11:12: pid<br>
125014: FATAL:  watchdog child process exit with fatal error. exiting<br>
pgpool-II<br>
Oct 24 17:11:12 ip-10-192-12-30 pgpool[125019]: 2021-10-24 17:11:12: pid<br>
125019: LOG:  setting the local watchdog node name to "server3:5433 Linux<br>
ip-<server 3 host>"<br>
Oct 24 17:11:12 ip-10-192-12-30 pgpool[125019]: 2021-10-24 17:11:12: pid<br>
125019: LOG:  watchdog cluster is configured with 2 remote nodes<br>
Oct 24 17:11:12 ip-10-192-12-30 pgpool[125019]: 2021-10-24 17:11:12: pid<br>
125019: LOG:  watchdog remote node:0 on server1:9000<br>
Oct 24 17:11:12 ip-10-192-12-30 pgpool[125019]: 2021-10-24 17:11:12: pid<br>
125019: LOG:  watchdog remote node:1 on server2:9000<br>
Oct 24 17:11:12 ip-10-192-12-30 pgpool[125019]: 2021-10-24 17:11:12: pid<br>
125019: LOG:  interface monitoring is disabled in watchdog<br>
Oct 24 17:11:12 ip-10-192-12-30 pgpool[125019]: 2021-10-24 17:11:12: pid<br>
125019: LOG:  watchdog node state changed from [DEAD] to [LOADING]<br>
Oct 24 17:11:12 ip-10-192-12-30 pgpool[125019]: 2021-10-24 17:11:12: pid<br>
125019: LOG:  new outbound connection to server1:9000<br>
Oct 24 17:11:12 ip-10-192-12-30 pgpool[125019]: 2021-10-24 17:11:12: pid<br>
125019: LOG:  Watchdog is shutting down<br>
Oct 24 17:11:12 ip-10-192-12-30 systemd[1]: pgpool2.service: Main process<br>
exited, code=exited, status=3/NOTIMPLEMENTED<br>
Oct 24 17:11:12 ip-10-192-12-30 systemd[1]: pgpool2.service: Failed with<br>
result 'exit-code'.<br>
<br>
What steps am I missing?<br>
<br>
Thank you for the assistance,<br>
-Nirav<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://www.pgpool.net/pipermail/pgpool-general/attachments/20211024/98ab6d68/attachment-0001.htm" rel="noreferrer" target="_blank">http://www.pgpool.net/pipermail/pgpool-general/attachments/20211024/98ab6d68/attachment-0001.htm</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<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>
<br>
------------------------------<br>
<br>
End of pgpool-general Digest, Vol 120, Issue 45<br>
***********************************************<br>
</div></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div></div>