pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Bear <David.Bear@asu.edu>
To: pgsql-admin@postgresql.org
Subject: listening on tcp socket instead of unix domain
Date: Sat, 25 Jun 2005 10:58:49 -0700
Message-ID: <20050625175849.GA18646@asu.edu> (raw)

Hoping to get postgresql to listen on a tcp socket I made the
following change to postgresql.conf:

#listen_addresses = 'localhost' # what IP interface(s) to listen on;
listen_addresses = 'localhost'  # what IP interface(s) to listen on;
# defaults to localhost, '*' = any
#port = 5432
port = 5432

I understand this to mean, listen on localhost, ie 127.0.0.1.

However, a netstat -l tells me:

netstat -l | grep 5432
unix  2      [ ACC ]     STREAM     LISTENING     732094 /tmp/.s.PGSQL.5432

netstat -l | grep postg
tcp        0      0 localhost:postgresql    *:* LISTEN
tcp        0      0 localhost:postgresql    *:* LISTEN

This doesn't look right. Moreover, when attempting to create an ssh
tunnel to connect to postgres from a windows box, the connection
fails.

Is postgres really listening on a socket that is 'connect-able'
through ssh tunneling?  If so, then would using ssh command

 ssh -L 5432:remotehost:5432 user@remotehost

be sufficient to connect to the postgres running on remote host? This
fails when running psql on the machine with message:

> psql -p 5432
psql: could not connect to server: No such file or directory
...

So, I don't think something is quite working. Please advise.

-- 
David Bear
phone: 	480-965-8257
fax: 	480-965-9189
College of Public Programs/ASU
Wilson Hall 232
Tempe, AZ 85287-0803
 "Beware the IP portfolio, everyone will be suspect of trespassing"



view thread (2+ messages)  latest in thread

Message-ID: <20050625175849.GA18646@asu.edu>
Permalink:  ../20050625175849.GA18646@asu.edu/
Also on:    postgresql.org/message-id/20050625175849.GA18646@asu.edu

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: David.Bear@asu.edu
  Subject: Re: listening on tcp socket instead of unix domain
  In-Reply-To: <20050625175849.GA18646@asu.edu>
  References: <20050625175849.GA18646@asu.edu>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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