<html><head></head><body><div class="ydp63bef53byahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div><div>Hello,</div><div><br></div><div>In your config you have</div><div><br></div><div><span>backend_hostname0 = '192.x.y.a'<br><br></span><div>3 times, it should be once backend_hostname0, backend_hostname1 and backend_hostname2 (the same for backend_port0,&nbsp; etc)<br></div><div><br></div></div><div class="ydp63bef53bsignature">Pierre</div></div>
        <div><br></div><div><br></div>
        
        </div><div id="ydp4fb3b377yahoo_quoted_5116818638" class="ydp4fb3b377yahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Friday, April 12, 2019, 5:05:05 PM GMT+2, Rob Reinhardt &lt;rreinhardt@eitccorp.com&gt; wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div id="ydp4fb3b377yiv5251187594"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>I "feel like" it should be working since so much of it is working, except the main function of the s/w seems to be failing me.</div><div><br></div><div>my repmgr95 says this:</div><div><br></div><div><div>ID | Name | Role | Status | Upstream | Location | Connection string</div><div>----+---------+---------+-----------+----------+----------+----------------------------------------------------------</div><div>1 | r01sv05 | standby | running | r01sv04 | default | host=r01sv05 user=repmgr dbname=repmgr connect_timeout=2</div><div>2 | r01sv04 | primary | * running | | default | host=r01sv04 user=repmgr dbname=repmgr connect_timeout=2</div><div>3 | r01sv03 | standby | running | r01sv04 | default | host=r01sv03 user=repmgr dbname=repmgr connect_timeout=2</div></div><div><br></div><div>(actually 05 is now the primary, that is an old shot)</div><div><br></div><div>r01sv02 is the pgpool server btw, and they are all on the same subnet.</div><div><br></div><div>my pgpool says this:</div><div><br></div><div><div>-bash-4.2$ psql -U pgpool --dbname=pgpool --host r01sv02 -c "show pool_nodes"</div><div>&nbsp;node_id | hostname | port | status | lb_weight |&nbsp; role&nbsp; &nbsp;| select_cnt | load_balance_node | replication_delay | last_status_change&nbsp;&nbsp;</div><div>---------+----------+------+--------+-----------+---------+------------+-------------------+-------------------+---------------------</div><div>&nbsp;0&nbsp; &nbsp; &nbsp; &nbsp;| r01sv03&nbsp; | 5432 | up&nbsp; &nbsp; &nbsp;| 1.000000&nbsp; | standby | 0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | true&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | 0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| 2019-04-11 19:48:43</div><div>(1 row)</div></div><div><br></div><div>pgpool keeps logging this:</div><div><br></div><div><div>Apr 12 14:03:03 <a href="http://r01sv02.change.me" rel="nofollow" target="_blank">r01sv02.change.me</a> pgpool[14630]: [259-1] 2019-04-12 14:03:03: pid 14630: LOG:&nbsp; find_primary_node: standby node is 0</div><div>Apr 12 14:03:03 <a href="http://r01sv02.change.me" rel="nofollow" target="_blank">r01sv02.change.me</a> pgpool[14630]: [259-2] 2019-04-12 14:03:03: pid 14630: LOCATION:&nbsp; pgpool_main.c:3438</div><div>Apr 12 14:03:04 <a href="http://r01sv02.change.me" rel="nofollow" target="_blank">r01sv02.change.me</a> pgpool[14630]: [260-1] 2019-04-12 14:03:04: pid 14630: LOG:&nbsp; find_primary_node: standby node is 0</div><div>Apr 12 14:03:04 <a href="http://r01sv02.change.me" rel="nofollow" target="_blank">r01sv02.change.me</a> pgpool[14630]: [260-2] 2019-04-12 14:03:04: pid 14630: LOCATION:&nbsp; pgpool_main.c:3438</div><div>Apr 12 14:03:05 <a href="http://r01sv02.change.me" rel="nofollow" target="_blank">r01sv02.change.me</a> pgpool[14630]: [261-1] 2019-04-12 14:03:05: pid 14630: LOG:&nbsp; find_primary_node: standby node is 0</div></div><div>and occasionally the find_primary_node_repeatedly line</div><div><br></div><div>Quick summary of my setup:</div><div>3 postgresql-9.5 db nodes, one is primary, the other two are standby, in a streaming replication cluster built and managed with repmgr95.&nbsp; This is working fine.</div><div><br></div><div>1 pgpool 4.0.4 server that has the same version of postgresql-9.5 and postgres user setup as the other 3.</div><div>- pgpool is running as postgres</div><div><br></div><div>what does work:</div><div>-the postgres user has ssh access to/from any of the four servers. I can remotely run repmgr from the pgpool server as postgres user with no problem</div>-psql can access all the db's says with simple \list or \dt or whatever from any of the 4 nodes asking for 5432 access from any of the four nodes, even from the pgpool server</div><div>-i can use the postgres user or pgpool user with psql</div><div>- dns is working too, but I changed from using the hostname to the IP's in the config file in case it made a difference, but it did not.</div><div><br></div><div>I've even run this commands by hand and it gets the right answers:</div><div><br></div><div><div>-bash-4.2$ psql -U pgpool --dbname=pgpool --host r01sv02 -c "SELECT pg_is_in_recovery();"</div><div>&nbsp;pg_is_in_recovery&nbsp;</div><div>-------------------</div><div>&nbsp;t</div><div>(1 row)</div><div><br></div><div>-bash-4.2$ psql -U pgpool --dbname=pgpool --host r01sv03 -c "SELECT pg_is_in_recovery();"</div><div>&nbsp;pg_is_in_recovery&nbsp;</div><div>-------------------</div><div>&nbsp;t</div><div>(1 row)</div><div><br></div><div>-bash-4.2$ psql -U pgpool --dbname=pgpool --host r01sv04 -c "SELECT pg_is_in_recovery();"</div><div>&nbsp;pg_is_in_recovery&nbsp;</div><div>-------------------</div><div>&nbsp;t</div><div>(1 row)</div><div><br></div><div>-bash-4.2$ psql -U pgpool --dbname=pgpool --host r01sv05 -c "SELECT pg_is_in_recovery();"</div><div>&nbsp;pg_is_in_recovery&nbsp;</div><div>-------------------</div><div>&nbsp;f</div><div>(1 row)</div></div><div><br></div><div>pgpool for some reason finds one of the three nodes, a standby node, and it has the right.</div><div><br></div><div>the pgpool database I created, I created on my primary.&nbsp; I had thought that when pgpool started up it might put some stuff in that database, but I haven't seen anything, in case that is the problem.&nbsp; i found notes on creating said database and user, but have seen nothing on actually putting anything in it by hand.--anyway, I was just looking at that in case it is something</div><div><br></div><div>Main question -- where are the other two nodes?</div><div><br></div><div>Also, I've noted that each time I start pgpool, it throws those errors (above) until the steps reaches 300, then it finally says "successfully started" and at that point the pcp_* commands will work, before then it has not yet created the pcp socket.&nbsp; Don't know if that is normal/expected or not.&nbsp; Seemed odd to me, for basic commands to take 5 minutes to even be available.</div><div><br></div><div>The other thing is that while it will come up for a while, pgpool seems to be stopping itself after about 10 minutes or so.&nbsp; the log just says that pgpool was told to stop (but I didn't do it).</div><div><br></div><div>I've attached a sanitized version of my pgpool.conf file</div><div dir="ltr"><br></div><div>In case it helps, here also is the sanitized contents of the .pgpass and .pcppass files in the postgres home dir of all four of my servers and the pool_passwd, in case you see a problem with these (they are 600 owned by postgres).</div><div><br></div><div><div>-bash-4.2$ cat .pgpass</div><div>r01sv02:5432:*:pgpool:sanitized</div><div>r01sv05:5432:*:postgres:pgpool:sanitized</div><div>r01sv04:5432:*:postgres:pgpool:sanitized</div><div>r01sv03:5432:*:postgres:pgpool:sanitized</div><div>r01sv05:5432:replication:repmgr:pgpool:sanitized</div><div>r01sv04:5432:replication:repmgr:pgpool:sanitized</div><div>r01sv03:5432:replication:repmgr:pgpool:sanitized</div></div><div><br></div><div><div>-bash-4.2$ cat .pcppass</div><div>*:*:pgpool:pgpool:sanitized</div><div>*:*:postgres:pgpool:sanitized</div></div><div><br></div><div>pcp.conf</div><div><div>pgpool:sanitized</div><div>nrpe:sanitized</div><div>postgres:sanitized</div></div><div><br></div><div>pool_passwd</div><div><div>pgpool:sanitized</div><div>nrpe:sanitized</div><div>postgres:sanitized</div></div><div><br></div><div><br></div><div><div>-bash-4.2$ cat pool_hba.conf</div><div># pgpool Client Authentication Configuration File</div><div><br></div><div># "local" is for Unix domain socket connections only</div><div>local&nbsp; &nbsp;all&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;all&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;trust</div><div># IPv4 local connections:</div><div>host&nbsp; &nbsp; all&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;all&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://127.0.0.1/32" rel="nofollow" target="_blank">127.0.0.1/32</a>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; trust</div><div>host&nbsp; &nbsp; all&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;all&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::1/128&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;trust</div><div>host&nbsp; &nbsp; all&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;all&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;192.x.y.0/24&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;md5</div></div><div><br></div><div>Thanks,</div><div>Rob</div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr"><br clear="all"><div><br></div></div></div></div></div></div></div></div></div></div></div></div>_______________________________________________<br>pgpool-general mailing list<br><a href="mailto:pgpool-general@pgpool.net" rel="nofollow" target="_blank">pgpool-general@pgpool.net</a><br><a href="http://www.pgpool.net/mailman/listinfo/pgpool-general" rel="nofollow" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-general</a><br></div>
            </div>
        </div></body></html>