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

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

From: "Hamedany, Allen" <Allen(dot)Hamedany(at)revivio(dot)com>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: Can not always connect to postmaster. Sometimes get "Connection refused".
Date: 2004-01-26 20:55:39
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers


We're running postgres7.3 on RedHat7.3. The Postgres at boot time starts
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

host    all         all

host    all         all


The host IP address is 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


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. 


a)       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.





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.

pgsql-hackers by date

Next:From: Mark HollowDate: 2004-01-26 22:26:39
Subject: Re: Log rotation for pg_autovacuum
Previous:From: Tom LaneDate: 2004-01-26 20:34:15
Subject: Re: Functions returning complex types.

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