Server doesn't seem to be listening...

From: "Eric D(dot) Nielsen" <nielsene(at)MIT(dot)EDU>
To: pgsql-general(at)postgresql(dot)org
Cc: "Eric D(dot) Nielsen" <nielsene(at)mit(dot)edu>
Subject: Server doesn't seem to be listening...
Date: 2008-01-07 04:29:17
Message-ID: D2CC022D-E359-49AF-B77C-6C05BB900DF4@mit.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-01-07 05:07:24 Re: Server doesn't seem to be listening...
Previous Message Ow Mun Heng 2008-01-07 03:46:15 Re: PostgresSQL vs Ingress