Thread: Cannot Access Remote Server

Cannot Access Remote Server

From
Tom Browder
Date:
I have a remote server running postgresql (9.0.4).  I have been able
to use the dbms via ssh and via phppgadmin.

Now I would like to use pgadminIII but I cannot get the server
connection.  I am running the Ubuntu version og pgadmin (1.10.5).

I have this setting in my postgresql.conf:
 listen_addresses = '*'

And these in my pg_hba.conf:

local   all             all                                     md5
host    all             all             127.0.0.1/32            md5
host    all             all             ::1/128                 md5
host  all             admin        xxx.xxx.xxx.xxx/32         md5
host  all             postgres     xxx.xxx.xxx.xxx/32         md5

where xxx.xxx.xxx.xxx is the external IP of my home network.

I can ping my server fine.

I appreciate any ideas.

Best regards,

-Tom
Niceville, Florida, USA


Re: Cannot Access Remote Server

From
Thom Brown
Date:
On 18 August 2011 22:26, Tom Browder <tom.browder@gmail.com> wrote:
I have a remote server running postgresql (9.0.4).  I have been able
to use the dbms via ssh and via phppgadmin.

Now I would like to use pgadminIII but I cannot get the server
connection.  I am running the Ubuntu version og pgadmin (1.10.5).

I have this setting in my postgresql.conf:

 listen_addresses = '*'

And these in my pg_hba.conf:

local   all             all                                     md5
host    all             all             127.0.0.1/32            md5
host    all             all             ::1/128                 md5
host  all             admin        xxx.xxx.xxx.xxx/32         md5
host  all             postgres     xxx.xxx.xxx.xxx/32         md5

where xxx.xxx.xxx.xxx is the external IP of my home network.

I can ping my server fine.

I appreciate any ideas.

What message comes up when failing to connect? 

--
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: Cannot Access Remote Server

From
Tom Browder
Date:
On Thu, Aug 18, 2011 at 16:33, Thom Brown <thom@linux.com> wrote:
> On 18 August 2011 22:26, Tom Browder <tom.browder@gmail.com> wrote:
>>
>> I have a remote server running postgresql (9.0.4).  I have been able
>> to use the dbms via ssh and via phppgadmin.
>>
>> Now I would like to use pgadminIII but I cannot get the server
>> connection.  I am running the Ubuntu version og pgadmin (1.10.5).
>>
>> I have this setting in my postgresql.conf:
>>
>>  listen_addresses = '*'
>>
>> And these in my pg_hba.conf:
>>
>> local   all             all                                     md5
>> host    all             all             127.0.0.1/32            md5
>> host    all             all             ::1/128                 md5
>> host  all             admin        xxx.xxx.xxx.xxx/32         md5
>> host  all             postgres     xxx.xxx.xxx.xxx/32         md5
>>
>> where xxx.xxx.xxx.xxx is the external IP of my home network.
>>
>> I can ping my server fine.
>>
>> I appreciate any ideas.

[Sorry, I meant to add that but got distracted.]

> What message comes up when failing to connect?

The window shows:
 connecting to server:5432 (grayed out)    (icon: time passing whil waiting...)
 I give up and try to close the window and get
   pgAdmin III is not responding...      [force quit][wait]
 I wait and eventually get a message window that says:

Server doesn't listen

The server doesn't accept connections: the connection library reports
could not connect to server: Connection timed out Is the server running on
host "xxx.xxx.xxx.xxx" and accepting TCP/IP connections on port 5432?
...

I'm checking my logs...

I can't find anything unusual on my local hoist or the remote host.

Thanks.

-Tom


Re: Cannot Access Remote Server

From
Guillaume Lelarge
Date:
On Thu, 2011-08-18 at 20:41 -0500, Tom Browder wrote:
> On Thu, Aug 18, 2011 at 16:33, Thom Brown <thom@linux.com> wrote:
> > On 18 August 2011 22:26, Tom Browder <tom.browder@gmail.com> wrote:
> >>
> >> I have a remote server running postgresql (9.0.4).  I have been able
> >> to use the dbms via ssh and via phppgadmin.
> >>
> >> Now I would like to use pgadminIII but I cannot get the server
> >> connection.  I am running the Ubuntu version og pgadmin (1.10.5).
> >>
> >> I have this setting in my postgresql.conf:
> >>
> >>  listen_addresses = '*'
> >>
> >> And these in my pg_hba.conf:
> >>
> >> local   all             all                                     md5
> >> host    all             all             127.0.0.1/32            md5
> >> host    all             all             ::1/128                 md5
> >> host  all             admin        xxx.xxx.xxx.xxx/32         md5
> >> host  all             postgres     xxx.xxx.xxx.xxx/32         md5
> >>
> >> where xxx.xxx.xxx.xxx is the external IP of my home network.
> >>
> >> I can ping my server fine.
> >>
> >> I appreciate any ideas.
> 
> [Sorry, I meant to add that but got distracted.]
> 
> > What message comes up when failing to connect?
> 
> The window shows:
> 
>   connecting to server:5432 (grayed out)
>      (icon: time passing whil waiting...)
> 
>   I give up and try to close the window and get
> 
>     pgAdmin III is not responding...
>        [force quit][wait]
> 
>   I wait and eventually get a message window that says:
> 
> Server doesn't listen
> 
> The server doesn't accept connections: the connection library reports
> could not connect to server: Connection timed out Is the server running on
> host "xxx.xxx.xxx.xxx" and accepting TCP/IP connections on port 5432?
> ...
> 
> I'm checking my logs...
> 
> I can't find anything unusual on my local hoist or the remote host.
> 

If you're speaking about your PostgreSQL logs, I don't expect you'll
find anything as pgAdmin doesn't have access to it. Any firewalls,
routers that could block the connection? Have you tried to connect with
psql from the same computer than pgAdmin?


-- 
Guillaume http://blog.guillaume.lelarge.info http://www.dalibo.com



Re: Cannot Access Remote Server

From
Tom Browder
Date:
On Fri, Aug 19, 2011 at 01:09, Guillaume Lelarge <guillaume@lelarge.info> wrote:
> On Thu, 2011-08-18 at 20:41 -0500, Tom Browder wrote:
>> >> I have a remote server running postgresql (9.0.4).  I have been able
>> >> to use the dbms via ssh and via phppgadmin.
>> >>
>> >> Now I would like to use pgadminIII but I cannot get the server
>> >> connection.  I am running the Ubuntu version og pgadmin (1.10.5).
...
> Any firewalls, routers that could block the connection?

> Have you tried to connect with psql from the same computer than pgAdmin?

Just tried--no contact.

I muddled around in my notes--had same trouble I now see with mysql
and had to open up its port with iptables.  I just tried the same
thing for postgresql and did:

# iptables -A INPUT -p tcp --destination-port 5432 -s x.x.x.x

where x.x.x.x is my external IP from my home network.  I restarted
postgresql just in case but no connection.

Ideas?

Thanks.

-Tom