Skip site navigation (1) Skip section navigation (2)

Re: FW: Can not always connect to postmaster. Sometimes get "Connection refused".

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Hamedany, Allen" <Allen(dot)Hamedany(at)revivio(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: FW: Can not always connect to postmaster. Sometimes get "Connection refused".
Date: 2004-01-31 04:08:09
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
"Hamedany, Allen" <Allen(dot)Hamedany(at)revivio(dot)com> writes:
> Sometimes, after Postgres starts up, when the database clients try to
> access the db from the localhost, we get the following error:

> com.solarmetric.kodo.Runtime -
> com.solarmetric.kodo.runtime.FatalDataStoreException: Connection
> refused. Check that the hostname and port are correct and that the
> postmaster is accepting TCP/IP connections.

> Any ideas what's causing postmaster NOT to accept connections some of
> the time?

Nope, can't tell much from that message.  You should look in the
postmaster's log to see if it shows any messages at the time that a
connection fails like this.  (If you are sending the postmaster's stderr
to /dev/null, now would be a good time to stop doing that...)

If the postmaster doesn't log anything at all when this happens, my
conclusion would be that the connection is being rejected at the kernel
level (but why would that happen only intermittently??) or that you have
a network-level problem.  "Connection refused" sounds a bit like a
kernel-level issue, FWIW.  Another thing to ask about is whether there
are any firewall machines between your clients and your database.

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Tom LaneDate: 2004-01-31 06:02:29
Subject: Re: signal 11
Previous:From: Tom LaneDate: 2004-01-31 00:56:51
Subject: Re: initdb: directory not empty issue

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group