ODBC Driver - PostgreSQL - Connection Refused

Discussion of open issues, suggestions and bugs regarding usage of ODBC Drivers
Post Reply
Posts: 1
Joined: Wed 20 May 2020 17:25

ODBC Driver - PostgreSQL - Connection Refused

Post by PPenmatsa » Wed 20 May 2020 18:28

Unable to connect to remote PostgreSQL Server through ODBC Driver for PostgreSQL. Error Message below:

Cannot connect to server on host 'localhost':
Connection refused.
Socket Error Code: 111($6F))

However, we are able to successfully telnet and also ping the remote PostgreSQL Server without any issue.

Need help to understand why ODBC Connection (which works on TCP/IP) fails ,even though telnet and ping works. Strangely, when testing with an alternate ODBC Driver (IBM Data Direct , wire-protocol) works just fine.

Any other debug ideas would be appreciated.

Devart Team
Posts: 190
Joined: Wed 11 Mar 2020 08:28

Re: ODBC Driver - PostgreSQL - Connection Refused

Post by oleg0k » Fri 22 May 2020 10:35

Are you connecting to a remote or local PostgreSQL server? Please try to create a DSN for the driver and click "Test connection" -- if the connection attempt fails, send us the logs. To obtain the trace file, please do the following:
- run the ODBC Administrator utility and navigate to the "Tracing" tab
- specify the path to the log file and its name (for example, DEVART.LOG)
- click the "Start Trace" button
- click the "Test connection" button.
Also, we need the connection parameters of your DSNs for our driver and the other driver, which successfully connects to the server (connection strings or screenshots of all parameters).

wbr, Oleg
Devart Team

Post Reply