No data is displayed in all of the widgets for PostgreSQL Instance resource and Database resource.
Problem
No data is displayed in all of the widgets for PostgreSQL Instance resource and Database resource.
Symptom 1
Following exception occurs in logs:
<CANDLE HOME>/logs/kpn_JDBC_<instance_name>_trace.log java.io.IOException: Connection to 10.46.44.18:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
Cause 1
Agent is not able to connect to remote PostgreSQL database.
Solution 1
Refer the steps given to resolve this issue:
- Open
postgresql.conf
file located at/var/lib/pgsql/12/data
- Update the listen_addresses parameter to accept the connection from remote host. For example listen_addresses = '*'
- Restart the PostgreSQL database server
- Restart the PostgreSQL agent
Symptom 2
Following exception occurs in logs:
<CANDLE HOME>/logs/kpn_JDBC_<instance_name>_trace.log java.io.IOException: FATAL: no pg_hba.conf entry for host "<TEMA IP>", user "postgres", database "ibmdb", SSL off
Cause 2
SSL is off and agent is not able to connect to remote PostgreSQL database; OR SSL is on and agent is not able to collect data from PostgreSQL database.
Solution 2
- Stop the PostgreSQL agent.
- Locate the postgresql.conf file at /var/lib/pgsql/
/data, where is the PostgreSQL server version.
Note the configuration of SSL. It can be set to ON or OFF. - Locate the pg_hba.conf file at /var/lib/pgsql/
/data, where is the PostgreSQL server version. - Ensure the IPv6 local connection section in pg_hba.conf file is configured to accept connection from remote host. For example: If SSL is OFF, configure the following:
If SSL is ON, configure the following:host all all 0.0.0.0/0 md5
hostssl all all 0.0.0.0/0 md5
- Ensure the PostgreSQL agent is configured with the latest JDBC jar.
If the agent is not configured with the latest JDBC jar, reconfigure the PostgreSQL agent with the latest JDBC jar. - Restart the PostgreSQL database server if any change is made to pg_hba.conf file.
- Start PostgreSQL agent.