How can I troubleshoot the issue when attempting to add a PostgreSQL Database server, but encountering a failure with an error message prompt?

How can I troubleshoot the issue when attempting to add a PostgreSQL Database server, but encountering a failure with an error message prompt?

While attempting to add a PostgreSQL database monitor, if you encounter any errors, please follow the steps below based on the specific error received:

Host not valid. Kindly check the host name given
or
PostgreSQL production server is down
or
The host could not be reached. Check whether you are able to connect to the host with the details given
Issue: The errors occur when Applications Manager is unable to connect to the PostgreSQL server. This could be due to a hostname resolution issue or a firewall restriction.
Solutions:
  1. Check Network Connectivity
    1. Open command prompt on the Applications Manager installed server.
    2. Attempt to ping the PostgreSQL server using the following command:
      ping <postgresql_hostnme>
    3.  Verify if there is a successful response indicating network connectivity.
  2. Hostname Lookup
    1. In the command prompt, verify if the hostname of the PostgreSQL server can be looked up using following command:
      nslookup <postgresql_hostname>
    2. Ensure that the hostname can be resolved to an IP address.
  3. Check Firewall Settings
    1. Verify if there are any firewall restrictions blocking the connection to the PostgreSQL server.
    2. Ensure that the necessary ports (e.g., default port 5432 for PostgreSQL) are not blocked by the firewall.

Could not add the PostgreSQL server. Check whether the server is running on the specified
host: postgresql_hostnme and port: 5432.
Kindly check your firewall configurations and user credentials.
Issue:  The error happens when Applications Manager can't connect to the PostgreSQL server port. This might be because of a wrong port setting, firewall restrictions preventing access, or not having permission to connect to the PostgreSQL port from the Applications Manager server.
Solutions:
  1. Check Port Connectivity
    1. Open a command prompt on the Applications Manager installed server.
    2. Test port access to the PostgreSQL server by running the following command:
      telnet <postgresql_hostnme> <port>
    3. Monitor the command response to see if a blank screen appears, indicating successful port connectivity.
    4. If you receive an error like "Could not open connection to the host, on port 5432: Connect failed", you need to verify the PostgreSQL port / network connectivity

Access denied for remote servers.Change configurations in pg_hba.conf and postgresql.conf file
or
Authentication failed.Kindly verify the configurations in your pg_hba.conf file and the user credentials given.
or
Connection to the PostgreSQL server unsuccessful as password authentication failed for user.
Issue:  The error occurs due to restrictions in the PostgreSQL Configuration (pg_hba.conf and postgresql.conf files) preventing remote access to the PostgreSQL server from Applications Manager. 
Solutions:
  1. Open a command prompt on the Applications Manager installed server and navigate to the "AppManager\working\pgsql\bin" directory in the command prompt.
  2. Execute the following command:
    psql --host=<postgresql_hostname> --port=<port> --username=<username> <dbname>
    For example:
    psql --host=192.168.100.101 --port=5432 --username=postgres postgres
  3.  Based on the response or error message received from the above command, verify the username and password credentials if necessary. Then, take appropriate steps to further diagnose and resolve the issue before making changes to the pg_hba.conf and postgresql.conf files to ensure that the remote access issue is effectively resolved. 
  4.  If the issue persists even after attempting the above steps, kindly share the output of the above command with the error message to appmanager-support@manageengine.com to analyze this further.

                  New to ADSelfService Plus?