pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Daniel J. Summers <daniel.lists@djs-consulting.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Ubuntu 10.04 - Cannot Create TCP/IP Sockets
Date: Wed, 05 May 2010 12:54:24 -0400
Message-ID: <5253.1273078464@sss.pgh.pa.us> (raw)
In-Reply-To: <11068.1272983067@sss.pgh.pa.us>
References: <4BDE46F4.4070401@djs-consulting.com>
	<1CA7FF980DA3824F9A5C31532B7A40DCCDCE01FD@LCXCLMB01.LCDS.LOC.GOV>
	<4BDEC707.1090403@gmail.com>
	<14337.1272894755@sss.pgh.pa.us>
	<4BDED7E2.5060304@djs-consulting.com>
	<15098.1272896449@sss.pgh.pa.us>
	<4BDFA003.2080706@djs-consulting.com>
	<11068.1272983067@sss.pgh.pa.us>

I wrote:
> Huh.  Well, there seems to be no other possible conclusion except that
> getaddrinfo() is returning something valid for "127.0.0.1" but not
> for "localhost".  And it's not failing outright for "localhost", but
> returning a sockaddr that bind() won't actually accept.

For the archives: some off-list investigation revealed that Daniel's
machine is resolving "localhost" as "localhost.us", which resolves as
216.240.187.169, which of course is not a local address on his machine
so the bind() fails.

It's not immediately clear to me why his machine is resolving it like
that --- there's no search directive in /etc/resolv.conf, and even more
interestingly nslookup doesn't react that way --- but maybe Ubuntu has
some other configuration setting for DNS search path.  The other
interesting question is what in the world made the owners of the .us
domain think it'd be a good idea to offer a translation of "localhost"
that's not 127.0.0.1.  But anyway, this seems to be a DNS configuration
problem and not a Postgres bug.

			regards, tom lane



view thread (13+ messages)

Message-ID: <5253.1273078464@sss.pgh.pa.us>
Permalink:  ../5253.1273078464@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/5253.1273078464@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, daniel.lists@djs-consulting.com
  Subject: Re: Ubuntu 10.04 - Cannot Create TCP/IP Sockets
  In-Reply-To: <5253.1273078464@sss.pgh.pa.us>

* 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