Thread: connectivity problem
Hi Everybody,
I am having difficulty connecting to postgres service from
a remote machine on the network.
My postgres (8.3.6, on Linux) is running on a machine
(vixen) and I would like to connect to it from another host.
The host (named blitzen, runs linux as well) appears in
pg_hba.conf of vixen as:
host canon all 172.16.1.106/32 md5 # blitzen
and when I issue "psql canon" from blitzen, it complains as:
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
I think the complaint means that blitzen is not running
postmaster/postgres.
The host id of server (vixen) is 107 and I have no problem
ssh'ing from blitzen:
[tsakai@blitzen Gallo]$ nslookup vixen
Server: 127.0.0.1
Address: 127.0.0.1#53
Non-authoritative answer:
Name: vixen.egcrc.org
Address: 172.16.1.107
[tsakai@blitzen Gallo]$ ssh -l tsakai 172.16.1.107
Last login: Fri Apr 10 12:16:57 2009 from 05-141.egcrc.org
[tsakai@vixen ~]$
How can I get a response from postmaster via psql from a
client machine? I would appreciate any help. Thank you.
Regards,
Tena Sakai
tsakai@gallo.ucsf.edu
On Fri, Apr 10, 2009 at 1:39 PM, Tena Sakai <tsakai@gallo.ucsf.edu> wrote: > Hi Everybody, > > I am having difficulty connecting to postgres service from > a remote machine on the network. > > My postgres (8.3.6, on Linux) is running on a machine > (vixen) and I would like to connect to it from another host. > > The host (named blitzen, runs linux as well) appears in > pg_hba.conf of vixen as: > host canon all 172.16.1.106/32 md5 # blitzen > > and when I issue "psql canon" from blitzen, it complains as: > psql: could not connect to server: No such file or directory > Is the server running locally and accepting > connections on Unix domain socket "/tmp/.s.PGSQL.5432"? You need to adjust the listen_address setting in postgresql.conf.
Check out using a .pgpass file in your home directory on blitzen:
http://www.postgresql.org/docs/current/static/libpq-pgpass.html
From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Tena Sakai
Sent: Friday, April 10, 2009 2:40 PM
To: pgsql-admin@postgresql.org
Subject: [ADMIN] connectivity problem
Hi Everybody,
I am having difficulty connecting to postgres service from
a remote machine on the network.
My postgres (8.3.6, on Linux) is running on a machine
(vixen) and I would like to connect to it from another host.
The host (named blitzen, runs linux as well) appears in
pg_hba.conf of vixen as:
host canon all 172.16.1.106/32 md5 # blitzen
and when I issue "psql canon" from blitzen, it complains as:
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
I think the complaint means that blitzen is not running
postmaster/postgres.
The host id of server (vixen) is 107 and I have no problem
ssh'ing from blitzen:
[tsakai@blitzen Gallo]$ nslookup vixen
Server: 127.0.0.1
Address: 127.0.0.1#53
Non-authoritative answer:
Name: vixen.egcrc.org
Address: 172.16.1.107
[tsakai@blitzen Gallo]$ ssh -l tsakai 172.16.1.107
Last login: Fri Apr 10 12:16:57 2009 from 05-141.egcrc.org
[tsakai@vixen ~]$
How can I get a response from postmaster via psql from a
client machine? I would appreciate any help. Thank you.
Regards,
Tena Sakai
tsakai@gallo.ucsf.edu
Hi Everybody,
I am having difficulty connecting to postgres service from
a remote machine on the network.
My postgres (8.3.6, on Linux) is running on a machine
(vixen) and I would like to connect to it from another host.
The host (named blitzen, runs linux as well) appears in
pg_hba.conf of vixen as:
host canon all 172.16.1.106/32 md5 # blitzen
and when I issue "psql canon" from blitzen, it complains as:
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
Do you have PGHOST set? If not, psql is going to try to connect to your local instance of PG via unix sockets. You either need:
export PGHOST=vixen
psql canon
OR
psql -h vixen canon
--Scott
Hi Scott,
Thank you for your reply, but...
postgresql.conf has:
listen_addresses = '*'
Is there anything else I am missing?
Tena Sakai
tsakai@gallo.ucsf.edu
-----Original Message-----
From: Scott Marlowe [mailto:scott.marlowe@gmail.com]
Sent: Fri 4/10/2009 12:42 PM
To: Tena Sakai
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] connectivity problem
On Fri, Apr 10, 2009 at 1:39 PM, Tena Sakai <tsakai@gallo.ucsf.edu> wrote:
> Hi Everybody,
>
> I am having difficulty connecting to postgres service from
> a remote machine on the network.
>
> My postgres (8.3.6, on Linux) is running on a machine
> (vixen) and I would like to connect to it from another host.
>
> The host (named blitzen, runs linux as well) appears in
> pg_hba.conf of vixen as:
> host canon all 172.16.1.106/32 md5 # blitzen
>
> and when I issue "psql canon" from blitzen, it complains as:
> psql: could not connect to server: No such file or directory
> Is the server running locally and accepting
> connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
You need to adjust the listen_address setting in postgresql.conf.
Hi Scott,
> export PGHOST=vixen
> psql canon
> OR
> psql -h vixen canon
Yes, yes, yes! That is it.
Many thanks.
Regards,
Tena Sakai
tsakai@gallo.ucsf.edu
-----Original Message-----
From: Scott Mead [mailto:scott.lists@enterprisedb.com]
Sent: Fri 4/10/2009 1:03 PM
To: Tena Sakai
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] connectivity problem
On Fri, Apr 10, 2009 at 3:39 PM, Tena Sakai <tsakai@gallo.ucsf.edu> wrote:
> Hi Everybody,
>
> I am having difficulty connecting to postgres service from
> a remote machine on the network.
>
> My postgres (8.3.6, on Linux) is running on a machine
> (vixen) and I would like to connect to it from another host.
>
> The host (named blitzen, runs linux as well) appears in
> pg_hba.conf of vixen as:
> host canon all 172.16.1.106/32 md5 # blitzen
>
> and when I issue "psql canon" from blitzen, it complains as:
> psql: could not connect to server: No such file or directory
> Is the server running locally and accepting
> connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
>
Do you have PGHOST set? If not, psql is going to try to connect to your
local instance of PG via unix sockets. You either need:
export PGHOST=vixen
psql canon
OR
psql -h vixen canon
--Scott