Re: JDBC connection problem - Mailing list pgsql-jdbc

From Brian Tomaszewski
Subject Re: JDBC connection problem
Date
Msg-id 4df751bf0802051321l9ce663dm18590c9c7409fb9c@mail.gmail.com
Whole thread Raw
In response to Re: JDBC connection problem  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-jdbc
All,

Thanks for the time and tips. Turned out to be a really stupid error - there was on old version of postres on the server that had taken port 5432, and my app was trying to connect to it (hence why the database wasn't being found), when it should have been connecting to the correct, newer instance of postres

I found this out by doing this command as Tom recommended:

$ psql -h localhost -l
psql: could not connect to server: Connection refused
        Is the server running on host "localhost" and accepting
        TCP/IP connections on port 5433?

And noticing the 5433...

A colleague of mine also noticed the multiple ports, and we now have things cleared up.

Thanks again everyone for the replies/comments

Brian

On Feb 5, 2008 12:27 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"Brian Tomaszewski" <brianbanjo@gmail.com> writes:
> Does "it" refer to the postgres server? if so, how do I check that it is
> listening on a TCPIP port? (sorry if this sounds trivial, I am relatively
> new to postgres on linux)

try psql -h localhost -l

                       regards, tom lane

pgsql-jdbc by date:

Previous
From: Tom Lane
Date:
Subject: Re: JDBC connection problem
Next
From: Arie Ozarov
Date:
Subject: Performance comparison to psql.