Обсуждение: Server not listening

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

Server not listening

От
GeorgeHeller
Дата:
Hi all,

I am trying to add my postgres database server through PgAdmin III and am
getting an error as below:

The server doesn't accept connections: the connection library reports 
could not connect to server: Connection refused (0x0000274D/10061) Is the
server running on host "192.212.105.111" and accepting TCP/IP connections on
port 5432? 

I have modified the postgresql.conf file to have listen_addresses='*'. I
also have the appropraite ip addresses specified in the pg_hba.conf file. I
have restarted the server after making the changes using the command:

/usr/local/pgsql/bin/pg_ctl restart -D /usr/local/pgsql/data/

I still seem to be getting the error. Anything I am missing here?

Thanks.
George

-- 
View this message in context: http://www.nabble.com/Server-not-listening-tf3598646.html#a10051255
Sent from the PostgreSQL - pgadmin support mailing list archive at Nabble.com.



Re: Server not listening

От
Raymond O'Donnell
Дата:
On 18/04/2007 03:32, GeorgeHeller wrote:

> The server doesn't accept connections: the connection library reports 
> could not connect to server: Connection refused (0x0000274D/10061) Is the
> server running on host "192.212.105.111" and accepting TCP/IP connections on
> port 5432? 

Are you sure the server *is* actually running? - Have you tried to 
connect to it with something else, such as psql? - or do a "ps ax | grep 
postgres" on the server machine and verified that it's there?

Ray.

---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
---------------------------------------------------------------


Re: Server not listening

От
"Joris Dobbelsteen"
Дата:
>-----Original Message-----
>From: pgadmin-support-owner@postgresql.org
>[mailto:pgadmin-support-owner@postgresql.org] On Behalf Of
>Raymond O'Donnell
>Sent: woensdag 18 april 2007 10:41
>To: GeorgeHeller
>Cc: pgadmin-support@postgresql.org
>Subject: Re: [pgadmin-support] Server not listening
>
>On 18/04/2007 03:32, GeorgeHeller wrote:
>
>> The server doesn't accept connections: the connection
>library reports
>> could not connect to server: Connection refused
>(0x0000274D/10061) Is
>> the server running on host "192.212.105.111" and accepting TCP/IP
>> connections on port 5432?
>
>Are you sure the server *is* actually running? - Have you
>tried to connect to it with something else, such as psql? - or
>do a "ps ax | grep postgres" on the server machine and
>verified that it's there?

If this doesn't resolve the problem, check the server is actually
listening at the socket. You should verify that your postgresql.conf
file has the correct settings.
The "listen_addresses" configuration parameter should be set correctly.
Changing this requires you to restart postgres for the changes to take
effect.

Having
listen_addresses = '*'
port = 5432
in the postgresql.conf file generally works.
(Don't forget to restart (NOT reload, but restart) the postgresql
server.

See also
<http://www.postgresql.org/docs/8.2/interactive/runtime-config-connectio
n.html#RUNTIME-CONFIG-CONNECTION-SETTINGS>


If this fails, check that no firewall is blocking the communication.


- Joris



Re: Server not listening

От
GeorgeHeller
Дата:
I have checked that the server is listening, I am able to ping it from my
computer, and the ps ax|grep postgres command gives me,

20058 ?        S      0:00 /usr/local/pgsql/bin/postgres
20060 ?        Ss     0:00 postgres: writer process
20061 ?        Ss     0:00 postgres: stats collector process
20653 pts/1    S+     0:00 grep postgres

I have changed the postgresql.conf file to have listen_addresses='*' and
port=5432, and have restarted the server. 

I still seem to be getting the problem..

George

Joris Dobbelsteen-2 wrote:
> 
>>-----Original Message-----
>>From: pgadmin-support-owner@postgresql.org 
>>[mailto:pgadmin-support-owner@postgresql.org] On Behalf Of 
>>Raymond O'Donnell
>>Sent: woensdag 18 april 2007 10:41
>>To: GeorgeHeller
>>Cc: pgadmin-support@postgresql.org
>>Subject: Re: [pgadmin-support] Server not listening
>>
>>On 18/04/2007 03:32, GeorgeHeller wrote:
>>
>>> The server doesn't accept connections: the connection 
>>library reports 
>>> could not connect to server: Connection refused 
>>(0x0000274D/10061) Is 
>>> the server running on host "192.212.105.111" and accepting TCP/IP 
>>> connections on port 5432?
>>
>>Are you sure the server *is* actually running? - Have you 
>>tried to connect to it with something else, such as psql? - or 
>>do a "ps ax | grep postgres" on the server machine and 
>>verified that it's there?
> 
> If this doesn't resolve the problem, check the server is actually
> listening at the socket. You should verify that your postgresql.conf
> file has the correct settings.
> The "listen_addresses" configuration parameter should be set correctly.
> Changing this requires you to restart postgres for the changes to take
> effect.
> 
> Having
> listen_addresses = '*'
> port = 5432
> in the postgresql.conf file generally works.
> (Don't forget to restart (NOT reload, but restart) the postgresql
> server.
> 
> See also
> <http://www.postgresql.org/docs/8.2/interactive/runtime-config-connectio
> n.html#RUNTIME-CONFIG-CONNECTION-SETTINGS>
> 
> 
> If this fails, check that no firewall is blocking the communication.
> 
> 
> - Joris
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 7: You can help support the PostgreSQL project by donating at
> 
>                 http://www.postgresql.org/about/donate
> 
> 

-- 
View this message in context: http://www.nabble.com/Server-not-listening-tf3598646.html#a10066443
Sent from the PostgreSQL - pgadmin support mailing list archive at Nabble.com.



Re: Server not listening

От
Raymond O'Donnell
Дата:
On 18/04/2007 21:29, GeorgeHeller wrote:

> I have changed the postgresql.conf file to have listen_addresses='*' and
> port=5432, and have restarted the server. 

if you have psql on another computer, try using it to connect to the 
server and see what happens.

psql -h (serveraddress) -U (username) -d (databasename) etc.

Ray.

---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
---------------------------------------------------------------


Re: Server not listening

От
Andy Shellam
Дата:
Also from the machine you tried the ping from, do telnet <server_ip> 
5432 - see if that connects.
Something's definitely not quite correct on the server-side.

Check any firewalls (particularly the Windows Firewall if running an XP 
SP2 or 2003 client machine.)

Andy

Raymond O'Donnell wrote:
> On 18/04/2007 21:29, GeorgeHeller wrote:
>
>> I have changed the postgresql.conf file to have listen_addresses='*' and
>> port=5432, and have restarted the server. 
>
> if you have psql on another computer, try using it to connect to the 
> server and see what happens.
>
> psql -h (serveraddress) -U (username) -d (databasename) etc.
>
> Ray.
>
> ---------------------------------------------------------------
> Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
> rod@iol.ie
> ---------------------------------------------------------------
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: 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
>
> !DSPAM:37,4626969389293030030429!
>
>



Re: Server not listening

От
Andy Shellam
Дата:
Hi George,
From the server's console, do "telnet <servers_ip> 5432."
Make sure to use the server's remote IP, not localhost.  If that fails, 
your PostgreSQL is not listening on that port correctly.  If it 
succeeds, then you've got a firewall problem.

If it's PostgreSQL isn't listening, make sure you have done a restart 
(not just a reload) since making the chance in your configuration file 
(just to make sure, if you can, stop then start it.)  Also check you are 
editing the correct file!  (I.e. the one in the same cluster directory 
that PostgreSQL is starting.)

Andy.

George Heller wrote:
> Hi,
>  
> I tried a telnet, and it doesnt work. So atleast now I know there is 
> something wrong with the server side, but I dont quite know what to do 
> next..... Any suggestions?
>  
> Is there some particular setup that needs to be done? I have disabled 
> the Windows Firewall.
>  
> Thanks.
> George
>
> */Andy Shellam <andy.shellam-lists@mailnetwork.co.uk>/* wrote:
>
>     Also from the machine you tried the ping from, do telnet
>     5432 - see if that connects.
>     Something's definitely not quite correct on the server-side.
>
>     Check any firewalls (particularly the Windows Firewall if running
>     an XP
>     SP2 or 2003 client machine.)
>
>     Andy
>
>     Raymond O'Donnell wrote:
>     > On 18/04/2007 21:29, GeorgeHeller wrote:
>     >
>     >> I have changed the postgresql.conf file to have
>     listen_addresses='*' and
>     >> port=5432, and have restarted the server.
>     >
>     > if you have psql on another computer, try using it to connect to
>     the
>     > server and see what happens.
>     >
>     > psql -h (serveraddress) -U (username) -d (databasename) etc.
>     >
>     > Ray.
>     >
>     > ---------------------------------------------------------------
>     > Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
>     > rod@iol.ie
>     > ---------------------------------------------------------------
>     >
>     > ---------------------------(end of
>     broadcast)---------------------------
>     > TIP 1: 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
>     >
>     >
>     >
>     >
>
>
> ------------------------------------------------------------------------
> Ahhh...imagining that irresistible "new car" smell?
> Check out new cars at Yahoo! Autos. 
>
<http://us.rd.yahoo.com/evt=48245/*http://autos.yahoo.com/new_cars.html;_ylc=X3oDMTE1YW1jcXJ2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDbmV3LWNhcnM->

> !DSPAM:37,4627d7de89291495521781! 



Re: Server not listening

От
George Heller
Дата:
Hi,
 
Thanks for the reply. I did a telnet using the server's remote IP, and it worked! So I am assuming now that it is a firewall problem.... But I have turned off the windows firewall from my system, I have tried restarting the system too. No luck!
 
I have changed the pg_hba.conf to have the ip address of my windows machine. I have restarted the postgres server too. I am thinking that really isnt the problem, since my telnet, ping etc. all go through fine.
 
Anything else I can try? Really looking forward to getting around this problem!
 
Thanks!
George

Andy Shellam <andy.shellam-lists@mailnetwork.co.uk> wrote:
Hi George,

From the server's console, do "telnet 5432."
Make sure to use the server's remote IP, not localhost. If that fails,
your PostgreSQL is not listening on that port correctly. If it
succeeds, then you've got a firewall problem.

If it's PostgreSQL isn't listening, make sure you have done a restart
(not just a reload) since making the chance in your configuration file
(just to make sure, if you can, stop then start it.) Also check you are
editing the correct file! (I.e. the one in the same cluster directory
that PostgreSQL is starting.)

Andy.

George Heller wrote:
> Hi,
>
> I tried a telnet, and it doesnt work. So atleast now I know there is
> something wrong with the server side, but I dont quite know what to do
> next..... Any suggestions?
>
> Is there some particular setup that needs to be done? I have disabled
> the Windows Firewall.
>
> Thanks.
> George
>
> */Andy Shellam /* wrote:
>
> Also from the machine you tried the ping from, do telnet
> 5432 - see if that connects.
> Something's definitely not quite correct on the server-side.
>
> Check any firewalls (particularly the Windows Firewall if running
> an XP
> SP2 or 2003 client machine.)
>
> Andy
>
> Raymond O'Donnell wrote:
> > On 18/04/2007 21:29, GeorgeHeller wrote:
> >
> >> I have changed the postgresql.conf file to have
> listen_addresses='*' and
> >> port=5432, and have restarted the server.
> >
> > if you have psql on another computer, try using it to connect to
> the
> > server and see what happens.
> >
> > psql -h (serveraddress) -U (username) -d (databasename) etc.
> >
> > Ray.
> >
> > ---------------------------------------------------------------
> > Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
> > rod@iol.ie
> > ---------------------------------------------------------------
> >
> > ---------------------------(end of
> broadcast)---------------------------
> > TIP 1: 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
> >
> >
> >
> >
>
>
> ------------------------------------------------------------------------
> Ahhh...imagining that irresistible "new car" smell?
> Check out new cars at Yahoo! Autos.
>
> !DSPAM:37,4627d7de89291495521781!



Ahhh...imagining that irresistible "new car" smell?
Check out new cars at Yahoo! Autos.

Re: Server not listening

От
George Heller
Дата:
Hi,
 
I tried a telnet, and it doesnt work. So atleast now I know there is something wrong with the server side, but I dont quite know what to do next..... Any suggestions?
 
Is there some particular setup that needs to be done? I have disabled the Windows Firewall.
 
Thanks.
George

Andy Shellam <andy.shellam-lists@mailnetwork.co.uk> wrote:
Also from the machine you tried the ping from, do telnet
5432 - see if that connects.
Something's definitely not quite correct on the server-side.

Check any firewalls (particularly the Windows Firewall if running an XP
SP2 or 2003 client machine.)

Andy

Raymond O'Donnell wrote:
> On 18/04/2007 21:29, GeorgeHeller wrote:
>
>> I have changed the postgresql.conf file to have listen_addresses='*' and
>> port=5432, and have restarted the server.
>
> if you have psql on another computer, try using it to connect to the
> server and see what happens.
>
> psql -h (serveraddress) -U (username) -d (databasename) etc.
>
> Ray.
>
> ---------------------------------------------------------------
> Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
> rod@iol.ie
> ---------------------------------------------------------------
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: 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
>
> !DSPAM:37,4626969389293030030429!
>
>



Ahhh...imagining that irresistible "new car" smell?
Check out new cars at Yahoo! Autos.

Re: Server not listening

От
George Heller
Дата:
Well, I am not really able to verify that, as the PgAdmin doesn't connect in the first place. So the connections and authentication is disabled.
 
I think I know that the server is listening at the default port 5432, and I have switched off my windows firewall too, but I am not too sure what I can do next.
 
Any suggestions?
 
Thanks.
George

Melvin Davidson <mdavidson@cctus.com> wrote:
Check that the value of Port in the pgadmin connection properties
matches the value of "port " in postgresql.conf on the server.
 
In should be located under the
# CONNECTIONS AND AUTHENTICATION
section of postgresql.conf


From: pgadmin-support-owner@postgresql.org [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of George Heller
Sent: Friday, April 20, 2007 1:27 PM
To: andy.shellam-lists@mailnetwork.co.uk
Cc: pgadmin-support@postgresql.org
Subject: Re: [pgadmin-support] Server not listening

Hi,
 
Thanks for the reply. I did a telnet using the server's remote IP, and it worked! So I am assuming now that it is a firewall problem.... But I have turned off the windows firewall from my system, I have tried restarting the system too. No luck!
 
I have changed the pg_hba.conf to have the ip address of my windows machine. I have restarted the postgres server too. I am thinking that really isnt the problem, since my telnet, ping etc. all go through fine.
 
Anything else I can try? Really looking forward to getting around this problem!
 
Thanks!
George

Andy Shellam <andy.shellam-lists@mailnetwork.co.uk> wrote:
Hi George,

From the server's console, do "telnet 5432."
Make sure to use the server's remote IP, not localhost. If that fails,
your PostgreSQL is not listening on that port correctly. If it
succeeds, then you've got a firewall problem.

If it's PostgreSQL isn't listening, make sure you have done a restart
(not just a reload) since making the chance in your configuration file
(just to make sure, if you can, stop then start it.) Also check you are
editing the correct file! (I.e. the one in the same cluster directory
that PostgreSQL is starting.)

Andy.

George Heller wrote:
> Hi,
>
> I tried a telnet, and it doesnt work. So atleast now I know there is
> something wrong with the server side, but I dont quite know what to do
> next..... Any suggestions?
>
> Is there some particular setup that needs to be done? I have disabled
> the Windows Firewall.
>
> Thanks.
> George
>
> */Andy Shellam /* wrote:
>
> Also from the machine you tried the ping from, do telnet
> 5432 - see if that connects.
> Something's definitely not quite correct on the server-side.
>
> Check any firewalls (particularly the Windows Firewall if running
> an XP
> SP2 or 2003 client machine.)
>
> Andy
>
> Raymond O'Donnell wrote:
> > On 18/04/2007 21:29, GeorgeHeller wrote:
> >
> >> I have changed the postgresql.conf file to have
> listen_addresses='*' and
> >> port=5432, and have restarted the server.
> >
> > if you have psql on another computer, try using it to connect to
> the
> > server and see what happens.
> >
> > psql -h (serveraddress) -U (username) -d (databasename) etc.
> >
> > Ray.
> >
> > ---------------------------------------------------------------
> > Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
> > rod@iol.ie
> > ---------------------------------------------------------------
> >
> > ---------------------------(end of
> broadcast)---------------------------
> > TIP 1: 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
> >
> >
> >
> >
>
>
> ------------------------------------------------------------------------
> Ahhh...imagining that irresistible "new car" smell?
> Check out new cars at Yahoo! Autos.
>
> !DSPAM:37,4627d7de89291495521781!



Ahhh...imagining that irresistible "new car" smell?
Check out new cars at Yahoo! Autos.


Ahhh...imagining that irresistible "new car" smell?
Check out new cars at Yahoo! Autos.

Re: Server not listening

От
Dave Page
Дата:
George Heller wrote:
> Well, I am not really able to verify that, as the PgAdmin doesn't 
> connect in the first place. So the connections and authentication is 
> disabled.
>  
> I think I know that the server is listening at the default port 5432, 
> and I have switched off my windows firewall too, but I am not too sure 
> what I can do next.

Please post a copy of your pg_hba.conf file and postgresql.conf, and 
tell us the IP addresses of the client and server so we can check the 
config looks correct. If any of that is sensitive info, feel free to 
mail it to me privately.

Regards, Dave


Re: Server not listening

От
Andy Shellam
Дата:
Hi George,

When you add a connection to PgAdmin you specify the port details and 
the host name to connect to. 
If the connection is already there, open it's properties to check the 
settings.  Did the telnet from your XP machine succeed, or fail?  Do you 
have any firewalls running on the server (e.g. 
iptables/netfilter/shorewall (Linux systems) or IP filter (BSD systems))?

It's not a pg_hba.conf problem (yet) as that'd give you a different 
failure message.

Andy.

George Heller wrote:
> Well, I am not really able to verify that, as the PgAdmin doesn't 
> connect in the first place. So the connections and authentication is 
> disabled.
>  
> I think I know that the server is listening at the default port 5432, 
> and I have switched off my windows firewall too, but I am not too sure 
> what I can do next.
>  
> Any suggestions?
>  
> Thanks.
> George
>
> */Melvin Davidson <mdavidson@cctus.com>/* wrote:
>
>     Check that the value of Port in the pgadmin connection properties
>     matches the value of "port " in postgresql.conf on the server.
>      
>     In should be located under the
>     # CONNECTIONS AND AUTHENTICATION
>     section of postgresql.conf
>
>     ------------------------------------------------------------------------
>     *From:* pgadmin-support-owner@postgresql.org
>     [mailto:pgadmin-support-owner@postgresql.org] *On Behalf Of
>     *George Heller
>     *Sent:* Friday, April 20, 2007 1:27 PM
>     *To:* andy..shellam-lists@mailnetwork.co.uk
>     *Cc:* pgadmin-support@postgresql.org
>     *Subject:* Re: [pgadmin-support] Server not listening
>
>     Hi,
>      
>     Thanks for the reply. I did a telnet using the server's remote IP,
>     and it worked! So I am assuming now that it is a firewall
>     problem.... But I have turned off the windows firewall from my
>     system, I have tried restarting the system too. No luck!
>      
>     I have changed the pg_hba.conf to have the ip address of my
>     windows machine. I have restarted the postgres server too. I am
>     thinking that really isnt the problem, since my telnet, ping etc.
>     all go through fine.
>      
>     Anything else I can try? Really looking forward to getting around
>     this problem!
>      
>     Thanks!
>     George
>
>     */Andy Shellam <andy.shellam-lists@mailnetwork.co.uk>/* wrote:
>
>         Hi George,
>
>         From the server's console, do "telnet 5432."
>         Make sure to use the server's remote IP, not localhost. If
>         that fails,
>         your PostgreSQL is not listening on that port correctly. If it
>         succeeds, then you've got a firewall problem.
>
>         If it's PostgreSQL isn't listening, make sure you have done a
>         restart
>         (not just a reload) since making the chance in your
>         configuration file
>         (just to make sure, if you can, stop then start it.) Also
>         check you are
>         editing the correct file! (I.e. the one in the same cluster
>         directory
>         that PostgreSQL is starting.)
>
>         Andy.
>
>         George Heller wrote:
>         > Hi,
>         >
>         > I tried a telnet, and it doesnt work. So atleast now I know
>         there is
>         > something wrong with the server side, but I dont quite know
>         what to do
>         > next...... Any suggestions?
>         >
>         > Is there some particular setup that needs to be done? I have
>         disabled
>         > the Windows Firewall.
>         >
>         > Thanks.
>         > George
>         >
>         > */Andy Shellam /* wrote:
>         >
>         > Also from the machine you tried the ping from, do telnet
>         > 5432 - see if that connects.
>         > Something's definitely not quite correct on the server-side.
>         >
>         > Check any firewalls (particularly the Windows Firewall if
>         running
>         > an XP
>         > SP2 or 2003 client machine.)
>         >
>         > Andy
>         >
>         > Raymond O'Donnell wrote:
>         > > On 18/04/2007 21:29, GeorgeHeller wrote:
>         > >
>         > >> I have changed the postgresql.conf file to have
>         > listen_addresses='*' and
>         > >> port=5432, and have restarted the server.
>         > >
>         > > if you have psql on another computer, try using it to
>         connect to
>         > the
>         > > server and see what happens.
>         > >
>         > > psql -h (serveraddress) -U (username) -d (databasename) etc.
>         > >
>         > > Ray.
>         > >
>         > >
>         ---------------------------------------------------------------
>         > > Raymond O'Donnell, Director of Music, Galway Cathedral,
>         Ireland
>         > > rod@iol.ie
>         > >
>         ---------------------------------------------------------------
>         > >
>         > > ---------------------------(end of
>         > broadcast)---------------------------
>         > > TIP 1: 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
>         > >
>         > >
>         > >
>         > >
>         >
>         >
>         >
>         ------------------------------------------------------------------------
>         > Ahhh...imagining that irresistible "new car" smell?
>         > Check out new cars at Yahoo! Autos..
>         >
>         >
>
>
>     ------------------------------------------------------------------------
>     Ahhh...imagining that irresistible "new car" smell?
>     Check out new cars at Yahoo! Autos.
>
<http://us.rd.yahoo.com/evt=48245/*http://autos.yahoo.com/new_cars.html;_ylc=X3oDMTE1YW1jcXJ2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDbmV3LWNhcnM->
>
>
>
> ------------------------------------------------------------------------
> Ahhh...imagining that irresistible "new car" smell?
> Check out new cars at Yahoo! Autos. 
>
<http://us.rd.yahoo.com/evt=48245/*http://autos.yahoo.com/new_cars.html;_ylc=X3oDMTE1YW1jcXJ2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDbmV3LWNhcnM->

> !DSPAM:37,462c630489291906970479! 



Re: Server not listening

От
George Heller
Дата:
Hi,
 
Ok, I tried a telnet from the command prompt of my XP machine, to the linux server address on port 5432, something like,
 
C:\> telnet 132.141.101.1 5432
 
And this did 'not' go through. It said could not open connection to host, connect failed.
 
How can I set this right?
 
P.S. How can I check if I have any firewalls running on the linux server?
 
Thanks.
George.


Andy Shellam <andy.shellam-lists@mailnetwork.co.uk> wrote:
Hi George,

When you add a connection to PgAdmin you specify the port details and
the host name to connect to.
If the connection is already there, open it's properties to check the
settings. Did the telnet from your XP machine succeed, or fail? Do you
have any firewalls running on the server (e.g.
iptables/netfilter/shorewall (Linux systems) or IP filter (BSD systems))?

It's not a pg_hba.conf problem (yet) as that'd give you a different
failure message.

Andy.

George Heller wrote:
> Well, I am not really able to verify that, as the PgAdmin doesn't
> connect in the first place. So the connections and authentication is
> disabled.
>
> I think I know that the server is listening at the default port 5432,
> and I have switched off my windows firewall too, but I am not too sure
> what I can do next.
>
> Any suggestions?
>
> Thanks.
> George
>
> */Melvin Davidson /* wrote:
>
> Check that the value of Port in the pgadmin connection properties
> matches the value of "port " in postgresql.conf on the server.
>
> In should be located under the
> # CONNECTIONS AND AUTHENTICATION
> section of postgresql.conf
>
> ------------------------------------------------------------------------
> *From:* pgadmin-support-owner@postgresql.org
> [mailto:pgadmin-support-owner@postgresql.org] *On Behalf Of
> *George Heller
> *Sent:* Friday, April 20, 2007 1:27 PM
> *To:* andy..shellam-lists@mailnetwork.co.uk
> *Cc:* pgadmin-support@postgresql.org
> *Subject:* Re: [pgadmin-support] Server not listening
>
> Hi,
>
> Thanks for the reply. I did a telnet using the server's remote IP,
> and it worked! So I am assuming now that it is a firewall
> problem.... But I have turned off the windows firewall from my
> system, I have tried restarting the system too. No luck!
>
> I have changed the pg_hba.conf to have the ip address of my
> windows machine. I have restarted the postgres server too. I am
> thinking that really isnt the problem, since my telnet, ping etc.
> all go through fine.
>
> Anything else I can try? Really looking forward to getting around
> this problem!
>
> Thanks!
> George
>
> */Andy Shellam /* wrote:
>
> Hi George,
>
> From the server's console, do "telnet 5432."
> Make sure to use the server's remote IP, not localhost. If
> that fails,
> your PostgreSQL is not listening on that port correctly. If it
> succeeds, then you've got a firewall problem.
>
> If it's PostgreSQL isn't listening, make sure you have done a
> restart
> (not just a reload) since making the chance in your
> configuration file
> (just to make sure, if you can, stop then start it.) Also
> check you are
> editing the correct file! (I.e. the one in the same cluster
> directory
> that PostgreSQL is starting.)
>
> Andy.
>
> George Heller wrote:
> > Hi,
> >
> > I tried a telnet, and it doesnt work. So atleast now I know
> there is
> > something wrong with the server side, but I dont quite know
> what to do
> > next...... Any suggestions?
> >
> > Is there some particular setup that needs to be done? I have
> disabled
> > the Windows Firewall.
> >
> > Thanks.
> > George
> >
> > */Andy Shellam /* wrote:
> >
> > Also from the machine you tried the ping from, do telnet
> > 5432 - see if that connects.
> > Something's definitely not quite correct on the server-side.
> >
> > Check any firewalls (particularly the Windows Firewall if
> running
> > an XP
> > SP2 or 2003 client machine.)
> >
> > Andy
> >
> > Raymond O'Donnell wrote:
> > > On 18/04/2007 21:29, GeorgeHeller wrote:
> > >
> > >> I have changed the postgresql.conf file to have
> > listen_addresses='*' and
> > >> port=5432, and have restarted the server.
> > >
> > > if you have psql on another computer, try using it to
> connect to
> > the
> > > server and see what happens.
> > >
> > > psql -h (serveraddress) -U (username) -d (databasename) etc.
> > >
> > > Ray.
> > >
> > >
> ---------------------------------------------------------------
> > > Raymond O'Donnell, Director of Music, Galway Cathedral,
> Ireland
> > > rod@iol.ie
> > >
> ---------------------------------------------------------------
> > >
> > > ---------------------------(end of
> > broadcast)---------------------------
> > > TIP 1: 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
> > >
> > >
> > >
> > >
> >
> >
> >
> ------------------------------------------------------------------------
> > Ahhh...imagining that irresistible "new car" smell?
> > Check out new cars at Yahoo! Autos..
> >
> >
>
>
> ------------------------------------------------------------------------
> Ahhh...imagining that irresistible "new car" smell?
> Check out new cars at Yahoo! Autos.
>
>
>
>
> ------------------------------------------------------------------------
> Ahhh...imagining that irresistible "new car" smell?
> Check out new cars at Yahoo! Autos.
>
> !DSPAM:37,462c630489291906970479!



Ahhh...imagining that irresistible "new car" smell?
Check out new cars at Yahoo! Autos.

Re: Server not listening

От
Raymond O'Donnell
Дата:
On 24/04/2007 06:43, George Heller wrote:

> Ok, I tried a telnet from the command prompt of my XP machine, to the
> linux server address on port 5432, something like,
> 
> C:\> telnet 132.141.101.1 5432
> 
> And this did 'not' go through. It said could not open connection to
> host, connect failed.

Well, this sounds like a network problem, as others have suggested. 
Check that your XP machine and the machine with the PostgreSQL server 
are on the same subnet, or are otherwise able to talk to each other. Are 
you able to use telnet or ssh to open a terminal session from one to the 
other? Did you try using psql to connect to the DBMS?

Ray.

---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
---------------------------------------------------------------


Re: Server not listening

От
George Heller
Дата:
My XP machine is not in the same subnet as the server, but I have the IP address of my XP machine specified in the pg_hba.conf file. Is that not enough to let me access the database from my XP machine?
 
I am able to do an SSH from my XP machine to the server, and also can access psql using it.
 
I am also able to ping from my XP machine to the server, and this goes through fine.
 
George

Raymond O'Donnell <rod@iol.ie> wrote:
On 24/04/2007 06:43, George Heller wrote:

> Ok, I tried a telnet from the command prompt of my XP machine, to the
> linux server address on port 5432, something like,
>
> C:\> telnet 132.141.101.1 5432
>
> And this did 'not' go through. It said could not open connection to
> host, connect failed.

Well, this sounds like a network problem, as others have suggested.
Check that your XP machine and the machine with the PostgreSQL server
are on the same subnet, or are otherwise able to talk to each other. Are
you able to use telnet or ssh to open a terminal session from one to the
other? Did you try using psql to connect to the DBMS?

Ray.

---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
---------------------------------------------------------------


Ahhh...imagining that irresistible "new car" smell?
Check out new cars at Yahoo! Autos.

Re: Server not listening

От
Andy Shellam
Дата:
Hi George,

OK the fact you cannot telnet from your XP machine to the server's 
PostgreSQL port now suggests it's a problem getting to the server port.
Checking for the existence of a firewall is an ambiguous question I'm 
afraid!  There's not only the case of if there's a software firewall, 
but is there a router between you and the server that's filtering out 
other traffic?

What version of Linux are you running on the server? 
Who originally set the server up? 
Can they not tell you if there's a firewall on it?
Who set up the networks between you and the server?
Is there a router between you and the server, or a hardware firewall?

One thing that's just struck me that you can do in the interim (which is 
actually better security but doesn't really answer your question) 
because you have SSH access, is to tunnel PostgreSQL over SSH.  This is 
actually what I do, my firewall doesn't let anyone but the server 
connect to PostgreSQL.

I take it you're using PuTTY to connect via SSH to the server?  If so, 
see this link to set up a tunnel.
http://docs.cs.byu.edu/docs/sshtunnels/3.php

In the tunneling setup in PuTTY (as described in the link above), set 
the following:

Source port: 5432
Destination: 127.0.0.1:5432
Set it as Local, and Auto

Add the tunnel, then save the connection.  Now when you connect to your 
server via SSH, you'll have a port listening on 5432 on your local 
machine.  Whatever you send/receive from this port will be tunneled to 
the server over SSH.

It's then as easy as instructing PgAdmin to connect to "localhost" on 
port 5432, in the background it's actually connecting to your server.

HTH

Andy.


George Heller wrote:
> My XP machine is not in the same subnet as the server, but I have the 
> IP address of my XP machine specified in the pg_hba.conf file. Is that 
> not enough to let me access the database from my XP machine?
>  
> I am able to do an SSH from my XP machine to the server, and also can 
> access psql using it.
>  
> I am also able to ping from my XP machine to the server, and this goes 
> through fine.
>  
> George
>
> */Raymond O'Donnell <rod@iol.ie>/* wrote:
>
>     On 24/04/2007 06:43, George Heller wrote:
>
>     > Ok, I tried a telnet from the command prompt of my XP machine,
>     to the
>     > linux server address on port 5432, something like,
>     >
>     > C:\> telnet 132.141.101.1 5432
>     >
>     > And this did 'not' go through. It said could not open connection to
>     > host, connect failed.
>
>     Well, this sounds like a network problem, as others have suggested.
>     Check that your XP machine and the machine with the PostgreSQL server
>     are on the same subnet, or are otherwise able to talk to each
>     other. Are
>     you able to use telnet or ssh to open a terminal session from one
>     to the
>     other? Did you try using psql to connect to the DBMS?
>
>     Ray.
>
>     ---------------------------------------------------------------
>     Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
>     rod@iol.ie
>     ---------------------------------------------------------------
>
>
> ------------------------------------------------------------------------
> Ahhh...imagining that irresistible "new car" smell?
> Check out new cars at Yahoo! Autos. 
>
<http://us.rd.yahoo.com/evt=48245/*http://autos.yahoo.com/new_cars.html;_ylc=X3oDMTE1YW1jcXJ2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDbmV3LWNhcnM->

> !DSPAM:37,462e0ab389291241012752! 



Re: Server not listening

От
George Heller
Дата:
Hi,
 
Thanks for that mail. I tried to follow the steps to create a tunnel, but when I add the connection, I dont really see an option to Save the settings. So make the changes and log in to my server with the actual hostname, it logs me in. I open another session on Putty, and the changes I made in the port forwarding are gone, I make the changes again, and try to log in using 'localhost' this time, it says Connection refused.
 
I also tried logging into PgAdmin using localhost, but it gave me the same error as before, only this time it said ip address 127.0.0.1
 
Thanks.
George.

Andy Shellam <andy.shellam-lists@mailnetwork.co.uk> wrote:
Hi George,

OK the fact you cannot telnet from your XP machine to the server's
PostgreSQL port now suggests it's a problem getting to the server port.
Checking for the existence of a firewall is an ambiguous question I'm
afraid! There's not only the case of if there's a software firewall,
but is there a router between you and the server that's filtering out
other traffic?

What version of Linux are you running on the server?
Who originally set the server up?
Can they not tell you if there's a firewall on it?
Who set up the networks between you and the server?
Is there a router between you and the server, or a hardware firewall?

One thing that's just struck me that you can do in the interim (which is
actually better security but doesn't really answer your question)
because you have SSH access, is to tunnel PostgreSQL over SSH. This is
actually what I do, my firewall doesn't let anyone but the server
connect to PostgreSQL.

I take it you're using PuTTY to connect via SSH to the server? If so,
see this link to set up a tunnel.
http://docs.cs.byu.edu/docs/sshtunnels/3.php

In the tunneling setup in PuTTY (as described in the link above), set
the following:

Source port: 5432
Destination: 127.0.0.1:5432
Set it as Local, and Auto

Add the tunnel, then save the connection. Now when you connect to your
server via SSH, you'll have a port listening on 5432 on your local
machine. Whatever you send/receive from this port will be tunneled to
the server over SSH.

It's then as easy as instructing PgAdmin to connect to "localhost" on
port 5432, in the background it's actually connecting to your server.

HTH

Andy.


George Heller wrote:
> My XP machine is not in the same subnet as the server, but I have the
> IP address of my XP machine specified in the pg_hba.conf file. Is that
> not enough to let me access the database from my XP machine?
>
> I am able to do an SSH from my XP machine to the server, and also can
> access psql using it.
>
> I am also able to ping from my XP machine to the server, and this goes
> through fine.
>
> George
>
> */Raymond O'Donnell /* wrote:
>
> On 24/04/2007 06:43, George Heller wrote:
>
> > Ok, I tried a telnet from the command prompt of my XP machine,
> to the
> > linux server address on port 5432, something like,
> >
> > C:\> telnet 132.141.101.1 5432
> >
> > And this did 'not' go through. It said could not open connection to
> > host, connect failed.
>
> Well, this sounds like a network problem, as others have suggested.
> Check that your XP machine and the machine with the PostgreSQL server
> are on the same subnet, or are otherwise able to talk to each
> other. Are
> you able to use telnet or ssh to open a terminal session from one
> to the
> other? Did you try using psql to connect to the DBMS?
>
> Ray.
>
> ---------------------------------------------------------------
> Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
> rod@iol.ie
> ---------------------------------------------------------------
>
>
> ------------------------------------------------------------------------
> Ahhh...imagining that irresistible "new car" smell?
> Check out new cars at Yahoo! Autos.
>
> !DSPAM:37,462e0ab389291241012752!



Ahhh...imagining that irresistible "new car" smell?
Check out new cars at Yahoo! Autos.

Re: Server not listening

От
Andy Shellam
Дата:
Hi George,

Make sure you're using the latest PuTTY (something like 0.59 if I 
remember rightly.)
Then from the screen that opens when you run PuTTY, Load your saved 
settings.
On the right, browse to SSH, then Tunnels - add the settings in there 
(your tunnel should be shown in the "Forwarded Ports" dialog when you've 
added it.)

Then click back to Session (on the top-right) and save your settings 
profile.
Then connect and login to your server.

Don't open two SSH connections with the forwarded tunnel active, or it 
will do strange things.
You can then connect to your PostgreSQL server by connecting to 
localhost:5432 within PgAdmin.

Only the PostgreSQL port will be forwarded, so you cannot connect to SSH 
on localhost (unless of course you run a local SSH server on your XP 
machine ;))

If that doesn't work, close your SSH session, change the forwarded IP 
address in your tunnel configuration to your server's remote IP address, 
then re-connect.

Andy.


George Heller wrote:
> Hi,
>  
> Thanks for that mail. I tried to follow the steps to create a tunnel, 
> but when I add the connection, I dont really see an option to Save the 
> settings. So make the changes and log in to my server with the actual 
> hostname, it logs me in. I open another session on Putty, and the 
> changes I made in the port forwarding are gone, I make the changes 
> again, and try to log in using 'localhost' this time, it says 
> Connection refused.
>  
> I also tried logging into PgAdmin using localhost, but it gave me the 
> same error as before, only this time it said ip address 127.0.0.1
>  
> Thanks.
> George.
>
> */Andy Shellam <andy.shellam-lists@mailnetwork.co.uk>/* wrote:
>
>     Hi George,
>
>     OK the fact you cannot telnet from your XP machine to the server's
>     PostgreSQL port now suggests it's a problem getting to the server
>     port.
>     Checking for the existence of a firewall is an ambiguous question I'm
>     afraid! There's not only the case of if there's a software firewall,
>     but is there a router between you and the server that's filtering out
>     other traffic?
>
>     What version of Linux are you running on the server?
>     Who originally set the server up?
>     Can they not tell you if there's a firewall on it?
>     Who set up the networks between you and the server?
>     Is there a router between you and the server, or a hardware firewall?
>
>     One thing that's just struck me that you can do in the interim
>     (which is
>     actually better security but doesn't really answer your question)
>     because you have SSH access, is to tunnel PostgreSQL over SSH.
>     This is
>     actually what I do, my firewall doesn't let anyone but the server
>     connect to PostgreSQL.
>
>     I take it you're using PuTTY to connect via SSH to the server? If so,
>     see this link to set up a tunnel.
>     http://docs.cs.byu.edu/docs/sshtunnels/3.php
>
>     In the tunneling setup in PuTTY (as described in the link above), set
>     the following:
>
>     Source port: 5432
>     Destination: 127.0.0.1:5432
>     Set it as Local, and Auto
>
>     Add the tunnel, then save the connection. Now when you connect to
>     your
>     server via SSH, you'll have a port listening on 5432 on your local
>     machine. Whatever you send/receive from this port will be tunneled to
>     the server over SSH.
>
>     It's then as easy as instructing PgAdmin to connect to "localhost" on
>     port 5432, in the background it's actually connecting to your server.
>
>     HTH
>
>     Andy.
>
>
>     George Heller wrote:
>     > My XP machine is not in the same subnet as the server, but I
>     have the
>     > IP address of my XP machine specified in the pg_hba.conf file.
>     Is that
>     > not enough to let me access the database from my XP machine?
>     >
>     > I am able to do an SSH from my XP machine to the server, and
>     also can
>     > access psql using it.
>     >
>     > I am also able to ping from my XP machine to the server, and
>     this goes
>     > through fine.
>     >
>     > George
>     >
>     > */Raymond O'Donnell /* wrote:
>     >
>     > On 24/04/2007 06:43, George Heller wrote:
>     >
>     > > Ok, I tried a telnet from the command prompt of my XP machine,
>     > to the
>     > > linux server address on port 5432, something like,
>     > >
>     > > C:\> telnet 132.141.101.1 5432
>     > >
>     > > And this did 'not' go through. It said could not open
>     connection to
>     > > host, connect failed.
>     >
>     > Well, this sounds like a network problem, as others have suggested.
>     > Check that your XP machine and the machine with the PostgreSQL
>     server
>     > are on the same subnet, or are otherwise able to talk to each
>     > other. Are
>     > you able to use telnet or ssh to open a terminal session from one
>     > to the
>     > other? Did you try using psql to connect to the DBMS?
>     >
>     > Ray.
>     >
>     > ---------------------------------------------------------------
>     > Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
>     > rod@iol.ie
>     > ---------------------------------------------------------------
>     >
>     >
>     >
>     ------------------------------------------------------------------------
>     > Ahhh...imagining that irresistible "new car" smell?
>     > Check out new cars at Yahoo! Autos.
>     >
>     >
>
>
> ------------------------------------------------------------------------
> Ahhh...imagining that irresistible "new car" smell?
> Check out new cars at Yahoo! Autos. 
>
<http://us.rd.yahoo.com/evt=48245/*http://autos.yahoo.com/new_cars.html;_ylc=X3oDMTE1YW1jcXJ2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDbmV3LWNhcnM->

> !DSPAM:37,462f7c2d89291991210244! 



Re: Server not listening

От
"Joris Dobbelsteen"
Дата:
Adding SSH makes the mix makes it all slightly more complicated. Now let us first find where its going wrong:
 
If I scan the previous e-mails I come up with the following (please correct me if I'm wrong!!!):
 
  1. Your postgresql server (linux) and client (XP) are on different machines.
  2. The server and client are on different subnets, meaning there must be at least one router inbetween.
On the server (Linux):
  • The server is actually running (the 'ps' output gives this evidence).
  • On the server you can connect to 5432 port on the remote IP.
    This gives the evidence that the postgresql server is listening here.
  • Which Linux distribution you happen to use?
On the client (XP):
  • It cannot connect to the postgresql server.
  • The firewall is disabled (though the WIndows Firewall does not block outgoing connections).
Intermediate systems:
  • The MUST exist (since server and client are not in the same subnet). But no information is known about these.
  • There is a working path between the client and server (since we can do some things).
  • Not under George its control(?)
    Seems this way, not sure, may, or may not, be important...
Please ensure the above assertions are valid, they are important for diagnosing where the problem is.
I think the next best step is to identify what your network looks like:
 
On the XP machine execute the following two commands in the DOS prompt:
"ipconfig /all"
"tracert <postgresql server>"
"telnet <postgresql server> 5432"
   (How fast do you get a response, within ~5 seconds or it takes longer?)
 
On the XP machine, see if you have any firewall installed. This is current a great pain in several situations. Other software that might interfere is:
  • Network Associates McAfee Virus scanner (8.0 and onward)
  • Network Associates McAfee Firewall
  • Symantic Internet Security
  • Kapersky
  • ZoneLabs
  • ...
  • ...
 
On the Linux server:
"ifconfig"
"tracepath <client>"
"iptables -L"
 
On the linux server start the following while trying to connect:
"tcpdump port 5432"
For each test, include wheter you see no, few or a lot (more than a screen) of packets. You should also see the word ack a lot of times.
 
I would really consider picking up one of the boxes and putting them on the same subnet. This reduces the complexity caused by the intermediate systems and might reduce the problem to the intermeidate systems only.
Alternatively pick any box on the server its network and do a telnet to <postgresql server> at port 5432. If this works, the problem is most likely in the intermediate systems (or client).
 
Also try it from your own client at its current location. Ensure that during tries the tcpdump tool is running.
 
Hopefully this leads us a little closer to finding the actual problem.
I have the strong feeling that either the server has the firewall configured or, more likely, that any intermediate system doesn't forward this traffic.
 
- Joris Dobbelsteen
 


From: pgadmin-support-owner@postgresql.org [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of George Heller
Sent: woensdag 25 april 2007 18:05
To: andy.shellam-lists@mailnetwork.co.uk
Cc: pgadmin-support@postgresql.org
Subject: Re: [pgadmin-support] Server not listening

Hi,
 
Thanks for that mail. I tried to follow the steps to create a tunnel, but when I add the connection, I dont really see an option to Save the settings. So make the changes and log in to my server with the actual hostname, it logs me in. I open another session on Putty, and the changes I made in the port forwarding are gone, I make the changes again, and try to log in using 'localhost' this time, it says Connection refused.
 
I also tried logging into PgAdmin using localhost, but it gave me the same error as before, only this time it said ip address 127.0.0.1
 
Thanks.
George.

Andy Shellam <andy.shellam-lists@mailnetwork.co.uk> wrote:
 [snip] 

Re: Server not listening

От
Andy Shellam
Дата:
I concur, but just so you know I suggested SSH so George can get up and 
running quickly while diagnosing the problems later as it requires a lot 
of information he doesn't seem to have.  We've already established he 
has SSH access so it seemed an obvious way to connect so he could 
actually begin to use PostgreSQL.

I've asked questions about the firewall before, to which George doesn't 
appear to know much about the way the server is set up so I'm guessing 
its been set up by somebody else, hence I suggested George try and find 
out how/who configured the network between himself and the server.

George reported that a telnet from the server's console to the server's 
remote IP address and PostgreSQL port connects, therefore that shows 
PostgreSQL is running.

A ping and SSH from the XP machine to the server works, so it appears an 
outgoing firewall on the Windows machine is not the problem (as you say, 
few firewalls block outbound traffic.)

I'm fairly certain it's a firewall issue, either on the server itself, 
or on an intermediate router/switch.

As George doesn't appear to have any information about these, I'm 
guessing it's out of his control.

Andy.

Joris Dobbelsteen wrote:
> Adding SSH makes the mix makes it all slightly more complicated. Now 
> let us first find where its going wrong:
>  
> If I scan the previous e-mails I come up with the following (please 
> correct me if I'm wrong!!!):
>  
>
>   1.
>       Your postgresql server (linux) and client (XP) are on different
>       machines.
>   2.
>       The server and client are on different subnets, meaning there
>       must be at least one router inbetween.
>
> On the server (Linux):
>
>    *
>       The server is actually running (the 'ps' output gives this
>       evidence).
>    *
>       On the server you can connect to 5432 port on the remote IP.
>       This gives the evidence that the postgresql server is listening
>       here.
>    *
>       Which Linux distribution you happen to use?
>
> On the client (XP):
>
>    *
>       It cannot connect to the postgresql server.
>    *
>       The firewall is disabled (though the WIndows Firewall does not
>       block outgoing connections).
>
> Intermediate systems:
>
>     * The MUST exist (since server and client are not in the same
>       subnet). But no information is known about these.
>     * There is a working path between the client and server (since we
>       can do some things).
>     * Not under George its control(?)
>       Seems this way, not sure, may, or may not, be important...
>
> Please ensure the above assertions are valid, they are important for 
> diagnosing where the problem is.
> I think the next best step is to identify what your network looks like:
>  
> On the XP machine execute the following two commands in the DOS prompt:
> "ipconfig /all"
> "tracert <postgresql server>"
> "telnet <postgresql server> 5432"
>    (How fast do you get a response, within ~5 seconds or it takes longer?)
>  
> On the XP machine, see if you have any firewall installed. This is 
> current a great pain in several situations. Other software that might 
> interfere is:
>
>     * Network Associates McAfee Virus scanner (8.0 and onward)
>     * Network Associates McAfee Firewall
>     * Symantic Internet Security
>     * Kapersky
>     * ZoneLabs
>     * ...
>     * ...
>
>  
> On the Linux server:
> "ifconfig"
> "tracepath <client>"
> "iptables -L"
>  
> On the linux server start the following while trying to connect:
> "tcpdump port 5432"
> For each test, include wheter you see no, few or a lot (more than a 
> screen) of packets. You should also see the word ack a lot of times.
>  
> I would really consider picking up one of the boxes and putting them 
> on the same subnet. This reduces the complexity caused by the 
> intermediate systems and might reduce the problem to the intermeidate 
> systems only.
> Alternatively pick any box on the server its network and do a telnet 
> to <postgresql server> at port 5432. If this works, the problem is 
> most likely in the intermediate systems (or client).
>  
> Also try it from your own client at its current location. Ensure that 
> during tries the tcpdump tool is running.
>  
> Hopefully this leads us a little closer to finding the actual problem.
> I have the strong feeling that either the server has the firewall 
> configured or, more likely, that any intermediate system doesn't 
> forward this traffic.
>  
> - Joris Dobbelsteen
>  
>
>     ------------------------------------------------------------------------
>     *From:* pgadmin-support-owner@postgresql.org
>     [mailto:pgadmin-support-owner@postgresql.org] *On Behalf Of
>     *George Heller
>     *Sent:* woensdag 25 april 2007 18:05
>     *To:* andy.shellam-lists@mailnetwork.co.uk
>     *Cc:* pgadmin-support@postgresql.org
>     *Subject:* Re: [pgadmin-support] Server not listening
>
>     Hi,
>      
>     Thanks for that mail. I tried to follow the steps to create a
>     tunnel, but when I add the connection, I dont really see an option
>     to Save the settings. So make the changes and log in to my server
>     with the actual hostname, it logs me in. I open another session on
>     Putty, and the changes I made in the port forwarding are gone, I
>     make the changes again, and try to log in using 'localhost' this
>     time, it says Connection refused.
>      
>     I also tried logging into PgAdmin using localhost, but it gave me
>     the same error as before, only this time it said ip address 127.0.0.1
>      
>     Thanks.
>     George.
>
>     */Andy Shellam <andy.shellam-lists@mailnetwork.co.uk>/* wrote:
>
>          [snip] 
>
> !DSPAM:37,462fa73a89291812814777! 



Re: Server not listening

От
"Joris Dobbelsteen"
Дата:
>-----Original Message-----
>From: Andy Shellam [mailto:andy.shellam-lists@mailnetwork.co.uk]
>Sent: woensdag 25 april 2007 21:25
>To: Joris Dobbelsteen
>Cc: George Heller; pgadmin-support@postgresql.org
>Subject: Re: [pgadmin-support] Server not listening
>
>I concur, but just so you know I suggested SSH so George can
>get up and running quickly while diagnosing the problems later
>as it requires a lot of information he doesn't seem to have.
>We've already established he has SSH access so it seemed an
>obvious way to connect so he could actually begin to use PostgreSQL.

Hopefully you took no offence while I took this a sharp turn.

I agree that this would be probably a good idea to get it working.
Alternatively it might seem easier to have a temporary set up on the
local computer, if feasable.

[snip]

- Joris Dobbelsteen



Re: Server not listening

От
Andy Shellam
Дата:
Joris Dobbelsteen wrote:
>> -----Original Message-----
>> From: Andy Shellam [mailto:andy.shellam-lists@mailnetwork.co.uk] 
>> Sent: woensdag 25 april 2007 21:25
>> To: Joris Dobbelsteen
>> Cc: George Heller; pgadmin-support@postgresql.org
>> Subject: Re: [pgadmin-support] Server not listening
>>
>> I concur, but just so you know I suggested SSH so George can 
>> get up and running quickly while diagnosing the problems later 
>> as it requires a lot of information he doesn't seem to have.  
>> We've already established he has SSH access so it seemed an 
>> obvious way to connect so he could actually begin to use PostgreSQL.
>>     
>
> Hopefully you took no offence while I took this a sharp turn.
>   
No, not at all.  I was just explaining my reasoning, as it seemed 
obvious George wasn't going to be able to get this information any time 
soon.
> I agree that this would be probably a good idea to get it working.
> Alternatively it might seem easier to have a temporary set up on the
> local computer, if feasable.
>   
True, but his server's running Linux, so you've got the problem of 
transferring the data from Windows to Linux when he gets it working, 
which depending on the amount of data, could be trivial, or not :)
> [snip]
>
> - Joris Dobbelsteen
>
>
> !DSPAM:37,462fba1989295324916066!
>
>
>   



Re: Server not listening

От
George Heller
Дата:
Hi,
 
Ok, I have reached to the point where the SSH tunelling works, and I am able to connect using it to PgAdmin. But I still want to know what exactly is wrong with the other setup.
 
I just came across this in the postgres documentation, about starting the postmaster with an -i option, if you want your server to accept TCP/IP connections.
 
I just used the -D option as specified, to start the server. Is it necessary to use the -i option so that my server can listen, or is the documentation just too old? If yes, what is the syntax for the same?
 
Thanks.
George.

Joris Dobbelsteen <Joris@familiedobbelsteen.nl> wrote:
>-----Original Message-----
>From: Andy Shellam [mailto:andy.shellam-lists@mailnetwork.co.uk]
>Sent: woensdag 25 april 2007 21:25
>To: Joris Dobbelsteen
>Cc: George Heller; pgadmin-support@postgresql.org
>Subject: Re: [pgadmin-support] Server not listening
>
>I concur, but just so you know I suggested SSH so George can
>get up and running quickly while diagnosing the problems later
>as it requires a lot of information he doesn't seem to have.
>We've already established he has SSH access so it seemed an
>obvious way to connect so he could actually begin to use PostgreSQL.

Hopefully you took no offence while I took this a sharp turn.

I agree that this would be probably a good idea to get it working.
Alternatively it might seem easier to have a temporary set up on the
local computer, if feasable.

[snip]

- Joris Dobbelsteen



Ahhh...imagining that irresistible "new car" smell?
Check out new cars at Yahoo! Autos.

Re: Server not listening

От
"Joris Dobbelsteen"
Дата:
 

From: George Heller [mailto:george.heller@yahoo.com]
Sent: dinsdag 1 mei 2007 1:43
To: Joris Dobbelsteen; andy.shellam-lists@mailnetwork.co.uk
Cc: pgadmin-support@postgresql.org
Subject: RE: [pgadmin-support] Server not listening

Hi,
 
Ok, I have reached to the point where the SSH tunelling works, and I am able to connect using it to PgAdmin. But I still want to know what exactly is wrong with the other setup.
 
I just came across this in the postgres documentation, about starting the postmaster with an -i option, if you want your server to accept TCP/IP connections.
You already accept TCP/IP connections, since it works through SSH tunnelling (which is in fact a TCP connection, only with SSH doing some operations inbetween.
So this is very unlikely to be the problem (furthermore its documentation for the 7.4 version of postgresql).
 
[snip]
 
Please try performing the operations mentioned in my previous e-mail. These will reveal more details about your network setup and it might bring us closer to pinpointing the problem (and excluding other possibilities). At this point there isn't enough information available to identify what could be the problem.
 
- Joris
 

Re: Server not listening

От
Raymond O'Donnell
Дата:
On 01/05/2007 00:43, George Heller wrote:

> I just used the -D option as specified, to start the server. Is it
> necessary to use the -i option so that my server can listen, or is

Hi George,

As i understand it the -i option works, but the preferred way is to set 
the appropriate options in postgresql.conf.

Ray.


---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
---------------------------------------------------------------


Re: Server not listening

От
andy.shellam-lists@mailnetwork.co.uk
Дата:
Hi George,

As Joris said, we need you to try what he has suggested.
The fact you can now connect via SSH proves PostgreSQL is set up and
configured correctly, which would point to a firewall or intermediate router
blocking your connections.

On the server (as root), do "iptables -L" or "/usr/local/sbin/iptables -L" if
the previous doesn't work, and post the full output so we can see if a
software firewall is blocking.

And please try and get some information about your network - who set the
server up, is there a hardware firewall or router firewall in between you and
the server, etc.

Thanks

Andy.

George Heller <george.heller@yahoo.com> wrote:

> Hi,
>    
>   Ok, I have reached to the point where the SSH tunelling works, and I am
able
> to connect using it to PgAdmin. But I still want to know what exactly is
wrong
> with the other setup.
>    
>   I just came across this in the postgres documentation, about starting the
> postmaster with an -i option, if you want your server to accept TCP/IP
> connections. 
>   http://www.postgresql.org/docs/7.4/static/postmaster-start.html
>    
>   I just used the -D option as specified, to start the server. Is it
necessary
> to use the -i option so that my server can listen, or is the documentation
just
> too old? If yes, what is the syntax for the same?
>    
>   Thanks.
>   George.
> 
> Joris Dobbelsteen <Joris@familiedobbelsteen.nl> wrote:
>   >-----Original Message-----
> >From: Andy Shellam [mailto:andy.shellam-lists@mailnetwork.co.uk] 
> >Sent: woensdag 25 april 2007 21:25
> >To: Joris Dobbelsteen
> >Cc: George Heller; pgadmin-support@postgresql.org
> >Subject: Re: [pgadmin-support] Server not listening
> >
> >I concur, but just so you know I suggested SSH so George can 
> >get up and running quickly while diagnosing the problems later 
> >as it requires a lot of information he doesn't seem to have. 
> >We've already established he has SSH access so it seemed an 
> >obvious way to connect so he could actually begin to use PostgreSQL.
> 
> Hopefully you took no offence while I took this a sharp turn.
> 
> I agree that this would be probably a good idea to get it working.
> Alternatively it might seem easier to have a temporary set up on the
> local computer, if feasable.
> 
> [snip]
> 
> - Joris Dobbelsteen
> 
> 
> 
>        
> ---------------------------------
> Ahhh...imagining that irresistible "new car" smell?
>  Check outnew cars at Yahoo! Autos.
> 
> !DSPAM:37,4636eb7689291063614559!
> 

_________________________________________________________
DISCLAIMER

This e-mail was sent through a Mail Network server.
The Mail Network accepts no liability for it's content.





Re: Server not listening

От
"Joris Dobbelsteen"
Дата:
George,
 
In my opinion this table looks a little odd. The server seems to be accepting everything. If not, I'm missing something here. If the first rule(s) of RH-Firewall-1-INPUT don't hit, at least the line denoting postgres should. Otherwise its the default policy. This doesn't seem to be a problem in any way.
 
Up to the next step. On the client (XP) execute:
ipconfig /all
tracert <postgresql_hostname/ip>
 
On the server, also run ifconfig and provide the output. This provides some additional information in case later steps went wrong.
 
 
Secondly we are going to see what's going on at the network level. This is a little more involved and has a couple steps done together.
 
On the server, try running "tcpdump port 5432". Just let it running while you are trying to connect to the postgresql server.
 
On the client (XP) try to connect. Please use, from the command prompt, use "telnet <postgresql_hostname/ip> 5432".
If you get a "Could not open a connection to ..." indicate if it takes less than 5 seconds or, say, roughly 20 seconds. This gives some more information about the possible cause. (In the first case, the remote system denied it, while in the latter there is a timeout).
 
After this return to the server. You should see a lot of packets flying (having flown) over the screen. Every now and them you should see a line include something like ack. You should not see any lines listing rst, or nothing at all.
Alternatively, if you are not sure, capture this information to a file and mail it.
 
You should see something like this:
=================================
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
00:32:02.896456 IP 192.168.10.161.3885 > shushan.postgresql: S 2704075561:2704075561(0) win 65535 <mss 1460,nop,wscale 2,nop,nop,sackOK>
00:32:03.107584 IP shushan.postgresql > 192.168.10.161.3885: S 662668163:662668163(0) ack 2704075562 win 5840 <mss 1460,nop,nop,sackOK,nop,wscale 2>
00:32:03.107743 IP 192.168.10.161.3885 > shushan.postgresql: . ack 1 win 49275
00:32:03.107796 IP 192.168.10.161.3885 > shushan.postgresql: P 1:9(8) ack 1 win 49275
00:32:03.107848 IP shushan.postgresql > 192.168.10.161.3885: . ack 9 win 1460
00:32:03.107898 IP shushan.postgresql > 192.168.10.161.3885: P 1:2(1) ack 9 win 1460
00:32:02.897474 IP 192.168.10.161.3885 > shushan.postgresql: P 9:50(41) ack 2 win 49274
00:32:02.899190 IP shushan.postgresql > 192.168.10.161.3885: P 2:15(13) ack 50 win 1460
00:32:02.900353 IP 192.168.10.161.3885 > shushan.postgresql: P 50:91(41) ack 15 win 49271
00:32:02.912700 IP shushan.postgresql > 192.168.10.161.3885: P 15:296(281) ack 91 win 1460
00:32:02.914380 IP 192.168.10.161.3885 > shushan.postgresql: P 91:227(136) ack 296 win 49201
00:32:02.954465 IP shushan.postgresql > 192.168.10.161.3885: . ack 227 win 1728
00:32:03.201125 IP shushan.postgresql > 192.168.10.161.3885: P 296:468(172) ack 227 win 1728
00:32:03.202817 IP 192.168.10.161.3885 > shushan.postgresql: P 227:265(38) ack 468 win 49158
00:32:03.203245 IP shushan.postgresql > 192.168.10.161.3885: . ack 265 win 1728
00:32:03.205695 IP shushan.postgresql > 192.168.10.161.3885: P 468:512(44) ack 265 win 1728
00:32:03.207206 IP 192.168.10.161.3885 > shushan.postgresql: P 265:288(23) ack 512 win 49147
00:32:03.225787 IP shushan.postgresql > 192.168.10.161.3885: P 512:680(168) ack 288 win 1728
<continues on and on>
====================================
 
If you don't see something like this there is probably an intermediate system in your way.
 
- Joris



From: George Heller [mailto:george.heller@yahoo.com]
Sent: dinsdag 1 mei 2007 23:57
To: andy.shellam-lists@mailnetwork.co.uk; Joris Dobbelsteen
Cc: pgadmin-support@postgresql.org
Subject: Re: [pgadmin-support] Server not listening

Hi Andy/Joris,
 
This is what my /sbin/iptables -L looks like:
 
Chain INPUT (policy ACCEPT)
target     prot opt source               destination        
RH-Firewall-1-INPUT  all  --  anywhere             anywhere           
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination        
RH-Firewall-1-INPUT  all  --  anywhere             anywhere           
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination        
Chain RH-Firewall-1-INPUT (2 references)
target     prot opt source               destination        
ACCEPT     all  --  anywhere             anywhere           
ACCEPT     all  --  anywhere             anywhere           
ACCEPT     all  --  anywhere             anywhere           
ACCEPT     icmp --  anywhere             anywhere            icmp any
ACCEPT     ipv6-crypt--  anywhere             anywhere           
ACCEPT     ipv6-auth--  anywhere             anywhere           
ACCEPT     udp  --  anywhere             224.0.0.251         udp dpt:5353
ACCEPT     udp  --  anywhere             anywhere            udp dpt:ipp
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:http
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:https
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ftp
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:smtp
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:postgres
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited
Thanks.
George

andy.shellam-lists@mailnetwork.co.uk wrote:
Hi George,

As Joris said, we need you to try what he has suggested.
The fact you can now connect via SSH proves PostgreSQL is set up and
configured correctly, which would point to a firewall or intermediate router
blocking your connections.

On the server (as root), do "iptables -L" or "/usr/local/sbin/iptables -L" if
the previous doesn't work, and post the full output so we can see if a
software firewall is blocking.

And please try and get some information about your network - who set the
server up, is there a hardware firewall or router firewall in between you and
the server, etc.

Thanks

Andy.

George Heller wrote:

> Hi,
>
> Ok, I have reached to the point where the SSH tunelling works, and I am
able
> to connect using it to PgAdmin. But I still want to know what exactly is
wrong
> with the other setup.
>
> I just came across this in the postgres documentation, about starting the
> postmaster with an -i option, if you want your server to accept TCP/IP
> connections.
> http://www.postgresql.org/docs/7.4/static/postmaster-start.html
>
> I just used the -D option as specified, to start the server. Is it
necessary
> to use the -i option so that my server can listen, or is the documentation
just
> too old? If yes, what is the syntax for the same?
>
> Thanks.
> George.
>
> Joris Dobbelsteen wrote:
> >-----Original Message-----
> >From: Andy Shellam [mailto:andy.shellam-lists@mailnetwork.co.uk]
> >Sent: woensdag 25 april 2007 21:25
> >To: Joris Dobbelsteen
> >Cc: George Heller; pgadmin-support@postgresql.org
> >Subject: Re: [pgadmin-support] Server not listening
> >
> >I concur, but just so you know I suggested SSH so George can
> >get up and running quickly while diagnosing the problems later
> >as it requires a lot of information he doesn't seem to have.
> >We've already established he has SSH access so it seemed an
> >obvious way to connect so he could actually begin to use PostgreSQL.
>
> Hopefully you took no offence while I took this a sharp turn.
>
> I agree that this would be probably a good idea to get it working.
> Alternatively it might seem easier to have a temporary set up on the
> local computer, if feasable.
>
> [snip]
>
> - Joris Dobbelsteen
>
>
>
>
> ---------------------------------
> Ahhh...imagining that irresistible "new car" smell?
> Check outnew cars at Yahoo! Autos.
>
> !DSPAM:37,4636eb7689291063614559!
>

_________________________________________________________
DISCLAIMER

This e-mail was sent through a Mail Network server.
The Mail Network accepts no liability for it's content.





Ahhh...imagining that irresistible "new car" smell?
Check out new cars at Yahoo! Autos.

Re: Server not listening

От
George Heller
Дата:
Hi Andy/Joris,
 
This is what my /sbin/iptables -L looks like:
 
Chain INPUT (policy ACCEPT)
target     prot opt source               destination        
RH-Firewall-1-INPUT  all  --  anywhere             anywhere           
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination        
RH-Firewall-1-INPUT  all  --  anywhere             anywhere           
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination        
Chain RH-Firewall-1-INPUT (2 references)
target     prot opt source               destination        
ACCEPT     all  --  anywhere             anywhere           
ACCEPT     all  --  anywhere             anywhere           
ACCEPT     all  --  anywhere             anywhere           
ACCEPT     icmp --  anywhere             anywhere            icmp any
ACCEPT     ipv6-crypt--  anywhere             anywhere           
ACCEPT     ipv6-auth--  anywhere             anywhere           
ACCEPT     udp  --  anywhere             224.0.0.251         udp dpt:5353
ACCEPT     udp  --  anywhere             anywhere            udp dpt:ipp
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:http
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:https
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ftp
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:smtp
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:postgres
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited
Thanks.
George

andy.shellam-lists@mailnetwork.co.uk wrote:
Hi George,

As Joris said, we need you to try what he has suggested.
The fact you can now connect via SSH proves PostgreSQL is set up and
configured correctly, which would point to a firewall or intermediate router
blocking your connections.

On the server (as root), do "iptables -L" or "/usr/local/sbin/iptables -L" if
the previous doesn't work, and post the full output so we can see if a
software firewall is blocking.

And please try and get some information about your network - who set the
server up, is there a hardware firewall or router firewall in between you and
the server, etc.

Thanks

Andy.

George Heller wrote:

> Hi,
>
> Ok, I have reached to the point where the SSH tunelling works, and I am
able
> to connect using it to PgAdmin. But I still want to know what exactly is
wrong
> with the other setup.
>
> I just came across this in the postgres documentation, about starting the
> postmaster with an -i option, if you want your server to accept TCP/IP
> connections.
> http://www.postgresql.org/docs/7.4/static/postmaster-start.html
>
> I just used the -D option as specified, to start the server. Is it
necessary
> to use the -i option so that my server can listen, or is the documentation
just
> too old? If yes, what is the syntax for the same?
>
> Thanks.
> George.
>
> Joris Dobbelsteen wrote:
> >-----Original Message-----
> >From: Andy Shellam [mailto:andy.shellam-lists@mailnetwork.co.uk]
> >Sent: woensdag 25 april 2007 21:25
> >To: Joris Dobbelsteen
> >Cc: George Heller; pgadmin-support@postgresql.org
> >Subject: Re: [pgadmin-support] Server not listening
> >
> >I concur, but just so you know I suggested SSH so George can
> >get up and running quickly while diagnosing the problems later
> >as it requires a lot of information he doesn't seem to have.
> >We've already established he has SSH access so it seemed an
> >obvious way to connect so he could actually begin to use PostgreSQL.
>
> Hopefully you took no offence while I took this a sharp turn.
>
> I agree that this would be probably a good idea to get it working.
> Alternatively it might seem easier to have a temporary set up on the
> local computer, if feasable.
>
> [snip]
>
> - Joris Dobbelsteen
>
>
>
>
> ---------------------------------
> Ahhh...imagining that irresistible "new car" smell?
> Check outnew cars at Yahoo! Autos.
>
> !DSPAM:37,4636eb7689291063614559!
>

_________________________________________________________
DISCLAIMER

This e-mail was sent through a Mail Network server.
The Mail Network accepts no liability for it's content.





Ahhh...imagining that irresistible "new car" smell?
Check out new cars at Yahoo! Autos.