Is The Server Running on Host Error

From: WAYNE BAKER - Network <baker_wayne(at)network(dot)elanco(dot)com>
To: "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org>
Cc: Rahul Masalkar - Network <masalkar_rahul(at)network(dot)elanco(dot)com>, Johnson Mathew <mathew_johnson(at)elanco(dot)com>, Megan Carroll <megan(dot)m(dot)carroll(at)elanco(dot)com>, Poornima Elanchezhain - Network <elanchezhain_poornima(at)network(dot)elanco(dot)com>
Subject: Is The Server Running on Host Error
Date: 2020-08-13 19:08:53
Message-ID: CY4P162MB0092B2343B446EFC9B96274DAB430@CY4P162MB0092.NAMP162.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Hello,

I am getting the following error message:

Is the server running on host (--.--.--.--) and accepting TCP/IP connections on port 5432?

I downloaded the newest PostGreSQL Unicode x64 ODBC driver for Windows. Then I setup the ODBC connection by searching for ODBC and right-clicking on ODBC Data Sources (64bit) run as administrator.
Next I clicked on the add button and put in the information for the connection. However, when I click on test I get the error message. The actual PostGreSQL database is on a different server than the server I am using for the ODBC connection.

The steps I have taken thus far to troubleshoot the issue is:

* I first installed PortQryV2 to check whether the port 5432 is blocked. PortQry returned TCP port 5432 (unknown service): LISTENING. Which means the port is not blocked and is listening.
* I updated the pg_hba.conf file for IPV4
host all all 0.0.0.0/0 md5

host all all 40.1.0.0/16 trust

* For IPV6 I added
host all all ::0/0 md5
* Next I installed pgAdmin4 on the same server I am using for the ODBC connection. I am able to connect to the database using the same information in pgAdmin4 as I am using for the ODBC connection.
* I looked at the postgresql.conf and the variable listen_addresses = '*' was already set. So I didn't change it.
* I did read when you update the config files you have to either run the following sql SELECT pg_reload_conf() or pg_ctl reload -D "C:\Program Files\PostgreSQL\12\bin"
* I did try to use the PostGreSQL Ansi x64 ODBC but got the same error
* I also used localhost as the server name and got a different error (Fatal: password authentication failed for the user)
* I noticed there are two versions of PostGreSql installed version 11 and 12. So I did update the port number in the postgresql.conf file to be 5433 and added an inbound rule to the firewall for that port.
* I also updated the registry key to point to the directory where the new driver resides

I believe the issue might be that even though I updated the .conf files. I was never able to reload the PostGreSQL server. So the conf files were never updated.

I got the following error:
pg_ctl: directory "C:/Program Files/PostgreSQL/12/bin" is not a database cluster directory when I ran pg_ctl reload -D "C:\Program Files\PostgreSQL\12\bin"

Than I got a permission error when running "SELECT pg_reload_conf()"

Can you tell me how to access any error logs? What are the next steps I should take to troubleshoot the issue?

I apologize for the long email just trying to provide as much information as I can.

Thanks,
Wayne

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Clemens Ladisch 2020-08-14 07:02:54 Re: Is The Server Running on Host Error
Previous Message Ian 2020-07-29 15:54:27 RE: not Boolean - TEXT and WideString