Thread: Port?

Port?

From
b b
Date:
 What port does the postgresql server listen on. I am
trying to connect using pg_connect from php using port
5432 with the following command:
 $dbconn3 = pg_connect ("host=localhost port=5432
dbname=dbname user=myname password=mypass");

 I get the following:
 Warning: pg_connect(): Unable to connect to
PostgreSQL server: could not connect to server:
Connection refused Is the server running on host
localhost and accepting TCP/IP connections on port
5432? ...

 How do we know the port postgresql is listening on?

Cheers.

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

Re: Port?

From
"Kallol Nandi"
Date:
Have you started postmaster with the -i option?
If not then doing so will solve your problem.

Regards,
Kallol.

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org]On Behalf Of b b
Sent: Thursday, July 31, 2003 11:27
To: postgresql
Subject: [GENERAL] Port?



 What port does the postgresql server listen on. I am
trying to connect using pg_connect from php using port
5432 with the following command:
 $dbconn3 = pg_connect ("host=localhost port=5432
dbname=dbname user=myname password=mypass");

 I get the following:
 Warning: pg_connect(): Unable to connect to
PostgreSQL server: could not connect to server:
Connection refused Is the server running on host
localhost and accepting TCP/IP connections on port
5432? ...

 How do we know the port postgresql is listening on?

Cheers.

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

Re: Port?

From
Ron Johnson
Date:
On Thu, 2003-07-31 at 00:56, b b wrote:
>  What port does the postgresql server listen on. I am
> trying to connect using pg_connect from php using port
> 5432 with the following command:
>  $dbconn3 = pg_connect ("host=localhost port=5432
> dbname=dbname user=myname password=mypass");
>
>  I get the following:
>  Warning: pg_connect(): Unable to connect to
> PostgreSQL server: could not connect to server:
> Connection refused Is the server running on host
> localhost and accepting TCP/IP connections on port
> 5432? ...
>
>  How do we know the port postgresql is listening on?

This should help:
$ netstat -a |grep postgresql

--
+-----------------------------------------------------------------+
| Ron Johnson, Jr.        Home: ron.l.johnson@cox.net             |
| Jefferson, LA  USA                                              |
|                                                                 |
| "I'm not a vegetarian because I love animals, I'm a vegetarian  |
|  because I hate vegetables!"                                    |
|    unknown                                                      |
+-----------------------------------------------------------------+



Re: Port?

From
"Kallol Nandi"
Date:
Hi,

Include -i in the options for starting the server.

e.g. pg_ctl start -o -i &

-i enables TCP/IP connections

Regards,
Kallol

-----Original Message-----
From: b b [mailto:hell_wild_hot2@yahoo.com]
Sent: Thursday, July 31, 2003 11:56
To: Kallol Nandi
Subject: Re: [GENERAL] Port?



 I looked up the pg_ctl command and it doesn't have a
-i option? what would it do anyway?

 Cheers.


--- Kallol Nandi <kallol.nandi@indussoft.com> wrote:
> Have you started postmaster with the -i option?
> If not then doing so will solve your problem.
>
> Regards,
> Kallol.
>
> -----Original Message-----
> From: pgsql-general-owner@postgresql.org
> [mailto:pgsql-general-owner@postgresql.org]On Behalf
> Of b b
> Sent: Thursday, July 31, 2003 11:27
> To: postgresql
> Subject: [GENERAL] Port?
>
>
>
>  What port does the postgresql server listen on. I
> am
> trying to connect using pg_connect from php using
> port
> 5432 with the following command:
>  $dbconn3 = pg_connect ("host=localhost port=5432
> dbname=dbname user=myname password=mypass");
>
>  I get the following:
>  Warning: pg_connect(): Unable to connect to
> PostgreSQL server: could not connect to server:
> Connection refused Is the server running on host
> localhost and accepting TCP/IP connections on port
> 5432? ...
>
>  How do we know the port postgresql is listening on?
>
> Cheers.
>
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> http://sitebuilder.yahoo.com
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose
> an index scan if your
>       joining column's datatypes do not match
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to
majordomo@postgresql.org


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

Re: Port?

From
"Kallol Nandi"
Date:
How come? It is working here since years.
Can you try this command and send me the screenshot of the error you are
getting if any.
pg_ctl start -o -i &

Regards,
Kallol.


-----Original Message-----
From: b b [mailto:hell_wild_hot2@yahoo.com]
Sent: Thursday, July 31, 2003 12:06
To: Kallol Nandi
Subject: Re: [GENERAL] Port?



 But -i is not a valid option. I tried it said so.
Also pg_ctl --help doesn't include a -i anyway.

 Cheers.

--- Kallol Nandi <kallol.nandi@indussoft.com> wrote:
> Hi,
>
> Include -i in the options for starting the server.
>
> e.g. pg_ctl start -o -i &
>
> -i enables TCP/IP connections
>
> Regards,
> Kallol
>
> -----Original Message-----
> From: b b [mailto:hell_wild_hot2@yahoo.com]
> Sent: Thursday, July 31, 2003 11:56
> To: Kallol Nandi
> Subject: Re: [GENERAL] Port?
>
>
>
>  I looked up the pg_ctl command and it doesn't have
> a
> -i option? what would it do anyway?
>
>  Cheers.
>
>
> --- Kallol Nandi <kallol.nandi@indussoft.com> wrote:
> > Have you started postmaster with the -i option?
> > If not then doing so will solve your problem.
> >
> > Regards,
> > Kallol.
> >
> > -----Original Message-----
> > From: pgsql-general-owner@postgresql.org
> > [mailto:pgsql-general-owner@postgresql.org]On
> Behalf
> > Of b b
> > Sent: Thursday, July 31, 2003 11:27
> > To: postgresql
> > Subject: [GENERAL] Port?
> >
> >
> >
> >  What port does the postgresql server listen on. I
> > am
> > trying to connect using pg_connect from php using
> > port
> > 5432 with the following command:
> >  $dbconn3 = pg_connect ("host=localhost port=5432
> > dbname=dbname user=myname password=mypass");
> >
> >  I get the following:
> >  Warning: pg_connect(): Unable to connect to
> > PostgreSQL server: could not connect to server:
> > Connection refused Is the server running on host
> > localhost and accepting TCP/IP connections on port
> > 5432? ...
> >
> >  How do we know the port postgresql is listening
> on?
> >
> > Cheers.
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! SiteBuilder - Free, easy-to-use web site
> > design software
> > http://sitebuilder.yahoo.com
> >
> > ---------------------------(end of
> > broadcast)---------------------------
> > TIP 9: the planner will ignore your desire to
> choose
> > an index scan if your
> >       joining column's datatypes do not match
> >
> > ---------------------------(end of
> > broadcast)---------------------------
> > TIP 1: subscribe and unsubscribe commands go to
> majordomo@postgresql.org
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> http://sitebuilder.yahoo.com
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 7: don't forget to increase your free space map
settings


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


Re: Port?

From
Jean-Christian Imbeault
Date:
b b wrote:
>
>  What port does the postgresql server listen on.

It listens on whichever port you tell it to :) 5432 by default I think.

>  How do we know the port postgresql is listening on?

Make sure that tcp connections are enabled in the conf file. TCP
connection are *not* enabled by default.

Jean-Christian Imbeault