We use DBeaver to connect to various Postgres databases and an Oracle database. All I can say is that the host is localhost
at port 6432
, forwarded to a specific intranet cluster, in a specific namespace. We use WSL2 and Rancher Desktop to help with the process.
Two new users configured their environment to connect to these databases, they both manually created connections to one or two of these databases, and confirmed they work correctly.
Then, they imported a DBeaver project containing various folders of connections to all relevant databases, and the first attempt at connecting resulted in the following error:
Connection refused: getsockopt
Connection to localhost:6432 refused.
Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
None of the imported connections work, despite working on the machine they were exported from. What's worse, previously defined connections, which were working correctly, also started returning this error.
I've somewhat resolved the issue by removing the PostgreSQL driver from DBeaver, and then installing an older one manually.
The DBeaver project was exported from an instance with 42.5.2 driver installed, and imported into DBeaver with driver v42.7.4. This may have caused the issue.
Now connections are working again, although the error still pops up once in a while, for a few seconds.