'Postgresql server suddenly rejects connections with no pg_hba.conf entry error - IPV4/IPV6 issue?
There are a lot of questions/answers here describing problems with connection attempts to postgresql being rejected with an error saying "no pg_hba.conf entry for host". All the ones I have read imply that this is a configuration problem that has always existed, and needs fixing. In our case, just before the weekend, suddenly all new connections were (typically) rejected after working fine for literally months (a few attempts worked for a while, but after a few hours, all new connections were rejected).
In all cases, there the error is duplicated - once for SSL on and once for SSL off.
The server is on a Linux PC. We use IPV4 addresses within our office environment, but the host address mentioned in the error is IPV6. Is this a clue as to what may have changed?
Solution 1:[1]
We could not trace the cause of this issue, but when one of us swapped from Wifi (fail) to LAN (fail) and back to Wifi, suddenly it connected. Others then turned their Wifi connection off and back on, and connections were restored. However... the original addresses rejected by the Postgresql server are identical to those now in use and listed as temporary IPv6 addresses for the WiFi adapter. It is as if nothing has changed for the client, and yet everything has changed. We cannot explain it.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | omatai |
