pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedlistening on tcp socket instead of unix domain
2+ messages / 2 participants
[nested] [flat]
* listening on tcp socket instead of unix domain
@ 2005-06-25 17:58 David Bear <David.Bear@asu.edu>
2005-06-25 19:49 ` Re: listening on tcp socket instead of unix domain Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 2+ messages in thread
From: David Bear @ 2005-06-25 17:58 UTC (permalink / raw)
To: pgsql-admin
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"
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: listening on tcp socket instead of unix domain
2005-06-25 17:58 listening on tcp socket instead of unix domain David Bear <David.Bear@asu.edu>
@ 2005-06-25 19:49 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2005-06-25 19:49 UTC (permalink / raw)
To: David.Bear@asu.edu; +Cc: pgsql-admin
David Bear <David.Bear@asu.edu> writes:
> 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.
It looks fine to me. The reason there are two listening sockets is most
likely that one is IPv4 and the other is IPv6 --- netstat's default display
fails to distinguish this (at least on Linux), but you can see it if you
do "netstat -l -n".
> Moreover, when attempting to create an ssh tunnel to connect to
> postgres from a windows box, the connection fails.
You're going to have to give more detail (like exactly what you tried
and exactly what happened) if you want help with that. It could be a
firewall issue, but that's strictly a guess.
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2005-06-25 19:49 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-06-25 17:58 listening on tcp socket instead of unix domain David Bear <David.Bear@asu.edu>
2005-06-25 19:49 ` Tom Lane <tgl@sss.pgh.pa.us>
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