Thread: "Connection refused"

"Connection refused"

From
Vernon Wu
Date:
Hi,

I am very new to PostgreSQL's jdbc. After following the installation and configure instructure of
http://www.fankhausers.com/postgresql/jdbc/, I get an error message "***Exception: Connection refuled. Check that
the hotname and port is correct, and that the postmaster is running with the -i flag, which enables TCP/IP networking"
when I run the test program. What I am missed here?

Thanks in advance.

v.



Re: "Connection refused"

From
"Dave Cramer"
Date:
Vernon,

Presuming you are running on linux do a netstat -nlp | grep 5432 and you
should find a listening connection on port 5432, if you don't then you
have to start postgres with the -I flag, or set the option tcpip_socket
in the postgresql.conf file to true and restart postgres.

Dave

-----Original Message-----
From: pgsql-jdbc-owner@postgresql.org
[mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Vernon Wu
Sent: Thursday, February 21, 2002 5:47 AM
To: pgsql-jdbc@postgresql.org
Subject: [JDBC] "Connection refused"


Hi,

I am very new to PostgreSQL's jdbc. After following the installation and
configure instructure of
http://www.fankhausers.com/postgresql/jdbc/, I get an error message
"***Exception: Connection refuled. Check that
the hotname and port is correct, and that the postmaster is running with
the -i flag, which enables TCP/IP networking"
when I run the test program. What I am missed here?

Thanks in advance.

v.



---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly



Re: "Connection refused"

From
Paulo Delgado
Date:
You have to configure the postmaster with the -i flag, which enables TCP/IP connections. It's not a problem of jdbc.

On Thu, 21 Feb 2002 02:46:30 -0800
Vernon Wu <vernonw@gatewaytech.com> wrote:

> Hi,
>
> I am very new to PostgreSQL's jdbc. After following the installation and configure instructure of
> http://www.fankhausers.com/postgresql/jdbc/, I get an error message "***Exception: Connection refuled. Check that
> the hotname and port is correct, and that the postmaster is running with the -i flag, which enables TCP/IP
networking" 
> when I run the test program. What I am missed here?
>
> Thanks in advance.
>
> v.
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>

Re: "Connection refused"

From
"Oliver Friedrich"
Date:
Hi Vernon,
perhaps you must enable the client in postgres. Go into the file pg_hba.conf
There should be a lines enabled like this:
local        all                                           trust
host         all         127.0.0.1     255.255.255.255     trust

This file configures, who can use the running postgres server. If you need
another ip add it like the example.

Oliver

-----Original Message-----
From: pgsql-jdbc-owner@postgresql.org
[mailto:pgsql-jdbc-owner@postgresql.org]On Behalf Of Dave Cramer
Sent: Friday, February 22, 2002 4:26 AM
To: vernonw@gatewaytech.com; pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] "Connection refused"


Vernon,

Presuming you are running on linux do a netstat -nlp | grep 5432 and you
should find a listening connection on port 5432, if you don't then you
have to start postgres with the -I flag, or set the option tcpip_socket
in the postgresql.conf file to true and restart postgres.

Dave

-----Original Message-----
From: pgsql-jdbc-owner@postgresql.org
[mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Vernon Wu
Sent: Thursday, February 21, 2002 5:47 AM
To: pgsql-jdbc@postgresql.org
Subject: [JDBC] "Connection refused"


Hi,

I am very new to PostgreSQL's jdbc. After following the installation and
configure instructure of
http://www.fankhausers.com/postgresql/jdbc/, I get an error message
"***Exception: Connection refuled. Check that
the hotname and port is correct, and that the postmaster is running with
the -i flag, which enables TCP/IP networking"
when I run the test program. What I am missed here?

Thanks in advance.

v.



---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly



---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html


Re: "Connection refused"

From
"Nick Fankhauser"
Date:
Vernon-

Take a second look at the two tasks in this section of the FAQ:
http://www.fankhausers.com/postgresql/jdbc/#tcpip

The "connection refused" message usually means one of them hasn't been done.
Note that they are required even if you are connecting to the machine you
are on.

-Nick

> -----Original Message-----
> From: pgsql-jdbc-owner@postgresql.org
> [mailto:pgsql-jdbc-owner@postgresql.org]On Behalf Of Vernon Wu
> Sent: Thursday, February 21, 2002 5:46 AM
> To: pgsql-jdbc@postgresql.org
> Subject: [JDBC] "Connection refused"
>
>
> Hi,
>
> I am very new to PostgreSQL's jdbc. After following the
> installation and configure instructure of
> http://www.fankhausers.com/postgresql/jdbc/, I get an error
> message "***Exception: Connection refuled. Check that
> the hotname and port is correct, and that the postmaster is
> running with the -i flag, which enables TCP/IP networking"
> when I run the test program. What I am missed here?
>
> Thanks in advance.
>
> v.
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>