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

From: "Hamedany, Allen" <Allen(dot)Hamedany(at)revivio(dot)com>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: Can not always connect to postmaster. Sometimes get "Connection refused".
Date: 2004-01-26 21:05:50
Message-ID: 07FBB852E7D37D4F95879AF229258FF698ABC4@washington.revivio.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

We're running postgres7.3 on RedHat7.3. The Postgres at boot time is
started up from a java (1.2) class that runs the following commands in
order:

/usr/local/pgsql/bin/pg_ctl -w start -D /var/lib/pgsql -l
/var/log/pgsqld.log -o -i

/usr/local/pgsql/bin/createdb management

.

.

.

As you can tell the postmaster starts up with "-i" option here.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

In pg_hba.conf we have:

local all all
trust

host all all 127.0.0.1 255.255.255.255
trust

host all all 192.168.0.0 255.255.0.0
trust

The host IP address is 192.168.55.5 which is in the right subnet.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

In postgresql.conf:

#

# Connection Parameters

#

tcpip_socket = true

#ssl = false

max_connections = 64

#superuser_reserved_connections = 2

#port = 5432

#hostname_lookup = false

#show_source_port = false

#unix_socket_directory = ''

#unix_socket_group = ''

#unix_socket_permissions = 0777 # octal

As you can see tcpip_socket = true

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

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?

This problem almost always goes away upon rebooting the machine.

Any help is much appreciated.

Thanks,

-Allen

**************************************************************************************
This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you.
**************************************************************************************

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2004-01-26 22:53:34 Re: BUG #1059: Second Call of a PGSQL-function fails
Previous Message Tanya Mamedalin 2004-01-26 19:59:26 Re: signal 11