Page 1 of 1

ODBC Driver - PostgreSQL - Connection Refused

Posted: Wed 20 May 2020 18:28
by PPenmatsa
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.

Re: ODBC Driver - PostgreSQL - Connection Refused

Posted: Fri 22 May 2020 10:35
by oleg0k
Hello,
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