Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Apr 2010 19:14:14 -0700
From:      Jeremy Chadwick <freebsd@jdc.parodius.com>
To:        "Mikhail T." <mi+thun@aldan.algebra.com>
Cc:        stable@FreeBSD.org
Subject:   Re: binding on 127.0.0.1 not working after upgrade to 7.3
Message-ID:  <20100406021414.GA96148@icarus.home.lan>
In-Reply-To: <4BBA8D9F.7000006@aldan.algebra.com>
References:  <4BBA8D9F.7000006@aldan.algebra.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Apr 05, 2010 at 09:25:51PM -0400, Mikhail T. wrote:
> Hello!
> 
> I just rebuilt my system from 7.2-stable to 7.3. The first thing to fail
> upon restart was the PostgreSQL-server. But there are other failures --
> for example, webmin is unreachable at its usual https://localhost:10000/
> 
> ktrace-ing postgres reveals:
> 
>      19875 postgres CALL  bind(0x3,0x8015190f0,0x10)
>      19875 postgres STRU  struct sockaddr { AF_INET, 127.0.0.1:5432 }
>      19875 postgres RET   bind -1 errno 49 Can't assign requested address
>      19875 postgres CALL  socket(PF_LOCAL,SOCK_DGRAM,0)
>      19875 postgres RET   socket 4
> 
> 
> I rebuilt postgress server anew, just in case, but it is still
> failing... Changing the listen_addresses from 'localhost' to
> 'my.lan.ip.add' allows the server to start-up, but now I need to change
> the configuration of the local applications...
> 
> Similarly, 'ssh localhost' no longer works, although `ssh my.lan.ip.add'
> works...
> 
> The only unusual thing about my system is that I build with
> `NO_INET6=yes'. But it all worked with the kernel from a month ago...
> The ::1-definition in /etc/hosts is now commented-out, but that didn't
> help any...
> 
> Please, advise. Thanks!

Check ifconfig -a and make sure lo0 appears / has a correct IP address,
and the interface is up.

Also, if the machine has firewall rules, make sure they're written so
that lo0 is excluded from the list (in pf.conf, 'set skip on lo0' does
the trick).

-- 
| Jeremy Chadwick                                   jdc@parodius.com |
| Parodius Networking                       http://www.parodius.com/ |
| UNIX Systems Administrator                  Mountain View, CA, USA |
| Making life hard for others since 1977.              PGP: 4BD6C0CB |




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100406021414.GA96148>