org.postgresql.util.PSQLException: Connection to server:port refused.
I am getting below error intermittently in Spark job which loads data from one hawq table into another.
org.postgresql.util.PSQLException: Connection to ServerName:7432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
Caused by: java.net.ConnectException: Connection timed out: connect
We have another utility written in java which also does the same, but this error has not appeared even once. We have been using the same jdbc driver and same connection details.
The same job has been executed successfully with same configuration couple of times. We tested the job with both dns name and ip address in the db configuration.
The pg_hba.conf file has been verified and are correct, the "TRUST" access has been given.
Appreciate your help in providing some pointers.
System Details-
Attached the snapshots below - Please let me know if you need more information.
There is one more observation that in tJDBCConfiguration component, for property type "Repository" the DB Connections which have been created in "Metadata" are not appearing. The last two snapshot are related to those.