pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
psql: could not connect to server: No route to host
7+ messages / 6 participants
[nested] [flat]

* psql: could not connect to server: No route to host
@ 2012-04-26 04:39 Kevin Kempter <cs_dba@consistentstate.com>
  2012-04-26 04:50 ` Re: psql: could not connect to server: No route to host Tom Lane <tgl@sss.pgh.pa.us>
  2012-04-26 11:49 ` Fwd: psql: could not connect to server: No route to host Ricardo Benatti <rbenatti@gmail.com>
  0 siblings, 2 replies; 7+ messages in thread

From: Kevin Kempter @ 2012-04-26 04:39 UTC (permalink / raw)
  To: pgsql-admin

Hi all;

I've setup PostgreSQL to talk across servers thousand of times... not 
sure what I'm doing wrong, maybe I'm just over-tired.


I have 2 scientific linux VM's running in vmware workstation

server 1 - 192.168.1.125
server 2 - 192.168.1.127

I've disabled selinux on both servers

Ive instaled PostgreSQL 9.1.3 on both servers

I have listen_addresses on server 1 set to '*'

postgres=# show listen_addresses ;
  listen_addresses
------------------
  *
(1 row)


I've added this to the pg_hba.conf file of server 1:
host     all             all             192.168.1.0/24        trust


I can scp files between the servers

Then from server 2 I run this:

$ psql -h 192.168.1.125
psql: could not connect to server: No route to host
         Is the server running on host "192.168.1.125" and accepting
         TCP/IP connections on port 5432?


am i loosing my mind?


thanks in advance



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: psql: could not connect to server: No route to host
  2012-04-26 04:39 psql: could not connect to server: No route to host Kevin Kempter <cs_dba@consistentstate.com>
@ 2012-04-26 04:50 ` Tom Lane <tgl@sss.pgh.pa.us>
  2012-04-26 11:29   ` Re: psql: could not connect to server: No route to host Matheus de Oliveira <matioli.matheus@gmail.com>
  2012-04-26 15:36   ` Re: psql: could not connect to server: No route to host Kevin Kempter <cs_dba@consistentstate.com>
  1 sibling, 2 replies; 7+ messages in thread

From: Tom Lane @ 2012-04-26 04:50 UTC (permalink / raw)
  To: Kevin Kempter <cs_dba@consistentstate.com>; +Cc: pgsql-admin

Kevin Kempter <cs_dba@consistentstate.com> writes:
> I can scp files between the servers

Really?

> $ psql -h 192.168.1.125
> psql: could not connect to server: No route to host

Because that is not a Postgres problem, that is a network connectivity
problem.  I'd bet that there's something wrong with the VM
configuration, such that the VM host isn't connecting 192.168.1.* in one
VM to 192.168.1.* in the other.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: psql: could not connect to server: No route to host
  2012-04-26 04:39 psql: could not connect to server: No route to host Kevin Kempter <cs_dba@consistentstate.com>
  2012-04-26 04:50 ` Re: psql: could not connect to server: No route to host Tom Lane <tgl@sss.pgh.pa.us>
@ 2012-04-26 11:29   ` Matheus de Oliveira <matioli.matheus@gmail.com>
  1 sibling, 0 replies; 7+ messages in thread

From: Matheus de Oliveira @ 2012-04-26 11:29 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Kevin Kempter <cs_dba@consistentstate.com>; pgsql-admin

On Thu, Apr 26, 2012 at 1:50 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> Kevin Kempter <cs_dba@consistentstate.com> writes:
> > I can scp files between the servers
>
> Really?
>
> > $ psql -h 192.168.1.125
> > psql: could not connect to server: No route to host
>
> Because that is not a Postgres problem, that is a network connectivity
> problem.  I'd bet that there's something wrong with the VM
> configuration, such that the VM host isn't connecting 192.168.1.* in one
> VM to 192.168.1.* in the other.
>
>                        regards, tom lane
>
>
Or the port is not 5432. Or a Firewall is blocking the connection.

--
Matheus de Oliveira

Bacharelado em Ciências de Computação
Laboratório de Computação de Alto Desempenho -
LCAD<http://www.lcad.icmc.usp.br/;
Instituto de Ciências Matemáticas e de Computação -
ICMC<http://www.icmc.usp.br/;
Universidade de São Paulo - USP <http://www.sc.usp.br/;

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: psql: could not connect to server: No route to host
  2012-04-26 04:39 psql: could not connect to server: No route to host Kevin Kempter <cs_dba@consistentstate.com>
  2012-04-26 04:50 ` Re: psql: could not connect to server: No route to host Tom Lane <tgl@sss.pgh.pa.us>
@ 2012-04-26 15:36   ` Kevin Kempter <cs_dba@consistentstate.com>
  2012-04-27 09:44     ` Re: psql: could not connect to server: No route to host Frank Lanitz <frank@frank.uvena.de>
  1 sibling, 1 reply; 7+ messages in thread

From: Kevin Kempter @ 2012-04-26 15:36 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin

On 04/25/2012 10:50 PM, Tom Lane wrote:
> Kevin Kempter<cs_dba@consistentstate.com>  writes:
>> I can scp files between the servers
> Really?
>
>> $ psql -h 192.168.1.125
>> psql: could not connect to server: No route to host
> Because that is not a Postgres problem, that is a network connectivity
> problem.  I'd bet that there's something wrong with the VM
> configuration, such that the VM host isn't connecting 192.168.1.* in one
> VM to 192.168.1.* in the other.
>
> 			regards, tom lane

Scientific Linux turns on the firewall by default. It lets me scp via 
username & passwd but wouldn't allow the port 5432 tcp connection till I 
disabled it.  I like Scientific because it seems that they are a large 
team and as a project seem to have better long term viability than other 
RH based projects but a couple of their defaults drive me nuts. Like 
this one, and the default install of yum-autoupdate






^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: psql: could not connect to server: No route to host
  2012-04-26 04:39 psql: could not connect to server: No route to host Kevin Kempter <cs_dba@consistentstate.com>
  2012-04-26 04:50 ` Re: psql: could not connect to server: No route to host Tom Lane <tgl@sss.pgh.pa.us>
  2012-04-26 15:36   ` Re: psql: could not connect to server: No route to host Kevin Kempter <cs_dba@consistentstate.com>
@ 2012-04-27 09:44     ` Frank Lanitz <frank@frank.uvena.de>
  0 siblings, 0 replies; 7+ messages in thread

From: Frank Lanitz @ 2012-04-27 09:44 UTC (permalink / raw)
  To: Kevin Kempter <cs_dba@consistentstate.com>; pgsql-admin

Am 26.04.2012 17:36, schrieb Kevin Kempter:
> Scientific Linux turns on the firewall by default. It lets me scp via
> username & passwd but wouldn't allow the port 5432 tcp connection till I
> disabled it.  I like Scientific because it seems that they are a large
> team and as a project seem to have better long term viability than other
> RH based projects but a couple of their defaults drive me nuts. Like
> this one, and the default install of yum-autoupdate

At least for the driving nuts thing I'm 110% on your page ;)

cheers,
Frank



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Fwd: psql: could not connect to server: No route to host
  2012-04-26 04:39 psql: could not connect to server: No route to host Kevin Kempter <cs_dba@consistentstate.com>
@ 2012-04-26 11:49 ` Ricardo Benatti <rbenatti@gmail.com>
  2012-04-27 20:50   ` Re: psql: could not connect to server: No route to host Scott Marlowe <scott.marlowe@gmail.com>
  1 sibling, 1 reply; 7+ messages in thread

From: Ricardo Benatti @ 2012-04-26 11:49 UTC (permalink / raw)
  To: pgsql-admin

the port is listening in VM ?

netstat -nat
>
> Active Internet connections (servers and established)
> Proto Recv-Q Send-Q Local Address           Foreign Address
> State
> tcp        0      0 0.0.0.0:80 <http://0.0.0.0/;              0.0.0.0:*
> LISTEN
> tcp        0      0 127.0.0.1:3350          0.0.0.0:*
> LISTEN
> tcp        0      0 0.0.0.0:22              0.0.0.0:*
> LISTEN
> tcp        0      0 0.0.0.0:631             0.0.0.0:*
> LISTEN
> *tcp        0      0 127.0.0.1:5432          0.0.0.0:*
> LISTEN     *
>


released access [ postgresql.conf ] for connections tcp ??

# - Connection Settings -
>
> #listen_addresses = '*'                 # what IP address(es) to listen on;
>                                         # comma-separated list of
> addresses;
>                                         *# defaults to 'localhost', '*' =
> all*
>                                         # (change requires restart)
> port = 5432                             # (change requires restart)
> max_connections = 100                   # (change requires restart)
>


your network is configured in:  pg_hba.conf


# IPv4 local connections:
> host    all         all         127.0.0.1/32          trust
> host    all         all         192.168.0.0/16        trust
>


Hope this help.

*Ricardo Benatti
*




---------- Forwarded message ----------
From: Kevin Kempter <cs_dba@consistentstate.com>
Date: Thu, Apr 26, 2012 at 1:39 AM
Subject: [ADMIN] psql: could not connect to server: No route to host
To: pgsql-admin@postgresql.org


Hi all;

I've setup PostgreSQL to talk across servers thousand of times... not sure
what I'm doing wrong, maybe I'm just over-tired.


I have 2 scientific linux VM's running in vmware workstation

server 1 - 192.168.1.125
server 2 - 192.168.1.127

I've disabled selinux on both servers

Ive instaled PostgreSQL 9.1.3 on both servers

I have listen_addresses on server 1 set to '*'

postgres=# show listen_addresses ;
 listen_addresses
------------------
 *
(1 row)


I've added this to the pg_hba.conf file of server 1:
host     all             all             192.168.1.0/24        trust


I can scp files between the servers

Then from server 2 I run this:

$ psql -h 192.168.1.125
psql: could not connect to server: No route to host
       Is the server running on host "192.168.1.125" and accepting
       TCP/IP connections on port 5432?


am i loosing my mind?


thanks in advance

-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/**mailpref/pgsql-admin<http://www.postgresql.org/mailpref/pgsql-admin;

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: psql: could not connect to server: No route to host
  2012-04-26 04:39 psql: could not connect to server: No route to host Kevin Kempter <cs_dba@consistentstate.com>
  2012-04-26 11:49 ` Fwd: psql: could not connect to server: No route to host Ricardo Benatti <rbenatti@gmail.com>
@ 2012-04-27 20:50   ` Scott Marlowe <scott.marlowe@gmail.com>
  0 siblings, 0 replies; 7+ messages in thread

From: Scott Marlowe @ 2012-04-27 20:50 UTC (permalink / raw)
  To: Ricardo Benatti <rbenatti@gmail.com>; +Cc: pgsql-admin

I'm assuming this is a reply that has the quoted two deep stuff in it
from the OP to you, Ricardo.

On Thu, Apr 26, 2012 at 5:49 AM, Ricardo Benatti <rbenatti@gmail.com> wrote:
>
>
> the port is listening in VM ?
>
>> netstat -nat
>>
>> Active Internet connections (servers and established)
>> Proto Recv-Q Send-Q Local Address           Foreign Address         State
>> tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN
>> tcp        0      0 127.0.0.1:3350          0.0.0.0:*               LISTEN
>> tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
>> tcp        0      0 0.0.0.0:631             0.0.0.0:*               LISTEN
>> tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN

This doesn't show the port listening on an external interface, only the internal

> released access [ postgresql.conf ] for connections tcp ??
>
>> # - Connection Settings -
>>
>> #listen_addresses = '*'                 # what IP address(es) to listen on;

That line is still commented out.

Uncomment listen_addresses and restart the server and try again.


^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2012-04-27 20:50 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-04-26 04:39 psql: could not connect to server: No route to host Kevin Kempter <cs_dba@consistentstate.com>
2012-04-26 04:50 ` Tom Lane <tgl@sss.pgh.pa.us>
2012-04-26 11:29   ` Matheus de Oliveira <matioli.matheus@gmail.com>
2012-04-26 15:36   ` Kevin Kempter <cs_dba@consistentstate.com>
2012-04-27 09:44     ` Frank Lanitz <frank@frank.uvena.de>
2012-04-26 11:49 ` Ricardo Benatti <rbenatti@gmail.com>
2012-04-27 20:50   ` Scott Marlowe <scott.marlowe@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox