pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedCannot Connect To Db From Local Server
3+ messages / 3 participants
[nested] [flat]
* Cannot Connect To Db From Local Server
@ 2012-04-18 22:12 Rickard, David <drickard1967@library.ucla.edu>
0 siblings, 2 replies; 3+ messages in thread
From: Rickard, David @ 2012-04-18 22:12 UTC (permalink / raw)
To: pgsql-admin
We have a legacy PostgresSQL 7.3.4 db on Solaris which has recently (as in last 24 hours or so) begun refusing TCP/IP (JDBC) connections from the same server the db is on.
The db is up and running-psql connects; I can access the db via pgAdmin III from a PC; I can connect via JDBC from a PC.
However: any JDBC call (whether command-line app or web app) running on the db server fails with this message:
org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
And the postmaster log contains the following message:
FATAL: unsupported frontend protocol
Mind you... I am using the same JDBC jar (pg74.216.jdbc2.jar) and connection URL in code on my PC and the Solaris server.
Our pg_hba.conf file contains the following lines:
local all all password
host all all 127.0.0.1 255.255.255.255 password
host all all 0.0.0.0 0.0.0.0 password
And "tcpip_socket = true" is enabled in postgresql.conf.
Any ideas?
David Rickard
UCLA Library Information Technology
drickard1967@library.ucla.edu
310.206.9780
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Cannot Connect To Db From Local Server
@ 2012-04-18 22:17 Scott Mead <scottm@openscg.com>
parent: Rickard, David <drickard1967@library.ucla.edu>
1 sibling, 0 replies; 3+ messages in thread
From: Scott Mead @ 2012-04-18 22:17 UTC (permalink / raw)
To: Rickard, David <drickard1967@library.ucla.edu>; +Cc: pgsql-admin
On Wed, Apr 18, 2012 at 10:12 PM, Rickard, David <
drickard1967@library.ucla.edu> wrote:
> We have a legacy PostgresSQL 7.3.4 db on Solaris which has recently (as
> in last 24 hours or so) begun refusing TCP/IP (JDBC) connections from the
> same server the db is on.****
>
> The db is up and running—psql connects; I can access the db via pgAdmin
> III from a PC; I can connect via JDBC from a PC.****
>
> However: any JDBC call (whether command-line app or web app) running on
> the db server fails with this message:****
>
> org.postgresql.util.PSQLException: Connection refused. Check that the
> hostname and port are correct and that the postmaster is accepting TCP/IP
> connections.****
>
> And the postmaster log contains the following message:****
>
> FATAL: unsupported frontend protocol****
>
> Mind you… I am using the same JDBC jar (pg74.216.jdbc2.jar) and connection
> URL in code on my PC and the Solaris server.
>
Hmmm, are you 100% sure that a newer jdbc driver didn't get dropped onto
your classpath? You would get a different message if you had a
tcpip_socket, listen_addresses or pg_hba.conf problem.
--Scott
> ****
>
> Our pg_hba.conf file contains the following lines:****
>
> local all all
> password****
>
> host all all 127.0.0.1 255.255.255.255
> password****
>
> host all all 0.0.0.0 0.0.0.0
> password****
>
> And “tcpip_socket = true” is enabled in postgresql.conf.****
>
> ** **
>
> Any ideas?****
>
> ** **
>
> David Rickard****
>
> UCLA Library Information Technology****
>
> drickard1967@library.ucla.edu****
>
> 310.206.9780****
>
> ** **
>
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Cannot Connect To Db From Local Server
@ 2012-04-18 22:29 Steve Crawford <scrawford@pinpointresearch.com>
parent: Rickard, David <drickard1967@library.ucla.edu>
1 sibling, 0 replies; 3+ messages in thread
From: Steve Crawford @ 2012-04-18 22:29 UTC (permalink / raw)
To: Rickard, David <drickard1967@library.ucla.edu>; +Cc: pgsql-admin
On 04/18/2012 03:12 PM, Rickard, David wrote:
>
> We have a legacy PostgresSQL 7.3.4 db on Solaris
>
That's not legacy, that's antique. I'm basing my commands on recent
versions - if the options differed back then you may have to adjust.
> which has recently (as in last 24 hours or so) begun refusing TCP/IP
> (JDBC) connections from the same server the db is on.
>
> The db is up and running---psql connects;
>
When you say psql connects do you mean that when you run psql on the
same Solaris machine as the server it connects? And if so, what
parameters are you using? Will it connect if you explicitly specify a
network address (psql -h 127.0.0.1 ...) to make sure it isn't using a
socket connection?
> I can access the db via pgAdmin III from a PC; I can connect via JDBC
> from a PC.
>
> However: any JDBC call (whether command-line app or web app) running
> on the db server fails with this message:
>
> org.postgresql.util.PSQLException: Connection refused. Check that the
> hostname and port are correct and that the postmaster is accepting
> TCP/IP connections.
>
> And the postmaster log contains the following message:
>
> FATAL: unsupported frontend protocol
>
> Mind you... I am using the same JDBC jar (pg74.216.jdbc2.jar) and
> connection URL in code on my PC and the Solaris server.
>
> Our pg_hba.conf file contains the following lines:
>
> local all all
> password
>
> host all all 127.0.0.1 255.255.255.255
> password
>
> host all all 0.0.0.0 0.0.0.0
> password
>
> And "tcpip_socket = true" is enabled in postgresql.conf.
>
> Any ideas?
>
>
What changed no matter how trivial? Was the machine rebooted or services
restarted? Any patches installed - automatically or otherwise? Any
config changes? Any possibility the client side has started using
something other than 127.0.0.1 (local addresses can be all the way to
127.255.255.255 and I've seen this when a client, for some reason, uses
127.0.0.2 for its address)?
The "unsupported frontend protocol" leads me to believe that the network
connection is succeeding but the client-server conversation thereafter
is incorrect or absent.
Cheers,
Steve
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2012-04-18 22:29 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-04-18 22:12 Cannot Connect To Db From Local Server Rickard, David <drickard1967@library.ucla.edu>
2012-04-18 22:17 ` Scott Mead <scottm@openscg.com>
2012-04-18 22:29 ` Steve Crawford <scrawford@pinpointresearch.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox