I recently resized a virtual machine hosting an instance of
PostGreSQL. After the resize and the required reboot, PostGreSQL
seem to be acting a little odd.
As a local user, I can connect to my databases. but my Java
applications can now longer connect to the database. (I get the
standard "org.postgresql.util.PSQLException: Connection refused.
Check that the hostname and port are correct and that the postmaster
is accepting TCP/IP connections."
I've confirmed from the commandline using
psql -h <hostname> -p <port> -U <username> database
"psql: could not connect to server: Connection refused
Is the server running on host "<hostname>" and accepting
TCP/IP connections on port <port>?
"
So I think its something I need to fix at the PG end of things.
Both Java and command line were occurring on the same host as the
server, and worked before the VM resize. Just in case I tried
punching a hole in the firewall for the port (wasn't needed before,
but just wanted to check that first), but it didn't make any difference.
The IP of the server didn't change as a result of the resize, so the
line in pg_hba.conf allowing this single account to connect is still
correct.
Now the thing I know I did wrong was that I didn't shut down the
postmaster before the resize brought the system down. (Its test only
data, if its hosed, that's acceptable). And I had to manually
restart the postmaster after the resize. I didn't see any errors and
the startup scripts seemed to run successfully.
What else should I be looking at?
Thank you.
Eric