Обсуждение: JDBC Connection refused

Поиск
Список
Период
Сортировка

JDBC Connection refused

От
Richard Heller
Дата:
Hi,

I created a database using createdb and it got created correctly.
However, I'm having trouble connecting to it with JDBC.  I named the
database "mydb" and the url I'm using in JDBC to connect is
"jdbc:postgresql:mydb".  I'm getting

java.sql.SQLException: Connection failed: java.net.ConnectException:
Connection refused

at runtime.  What causes this and how do I fix it?

Thanks,
Rich



Re: [INTERFACES] JDBC Connection refused

От
Peter T Mount
Дата:
On Sun, 27 Sep 1998, Richard Heller wrote:

> Hi,
>
> I created a database using createdb and it got created correctly.
> However, I'm having trouble connecting to it with JDBC.  I named the
> database "mydb" and the url I'm using in JDBC to connect is
> "jdbc:postgresql:mydb".  I'm getting
>
> java.sql.SQLException: Connection failed: java.net.ConnectException:
> Connection refused
>
> at runtime.  What causes this and how do I fix it?

Connection refused is always caused by running postmaster without -i

--
       Peter T Mount peter@retep.org.uk
      Main Homepage: http://www.retep.org.uk
PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres
 Java PDF Generator: http://www.retep.org.uk/pdf


Re: [INTERFACES] JDBC Connection refused

От
"S.Ramaswamy"
Дата:
Ensure that you start postmaster with -i option to enable TCP/IP. Refer
to FAQ of http://www.retep.org.uk/postgres/ for details

Regards

S.Ramaswamy

Richard Heller wrote:

> Hi,
>
> I created a database using createdb and it got created correctly.
> However, I'm having trouble connecting to it with JDBC.  I named the
> database "mydb" and the url I'm using in JDBC to connect is
> "jdbc:postgresql:mydb".  I'm getting
>
> java.sql.SQLException: Connection failed: java.net.ConnectException:
> Connection refused
>
> at runtime.  What causes this and how do I fix it?
>
> Thanks,
> Rich