node startup crash

Serge Aleynikov serge@REDACTED
Tue Apr 26 22:21:07 CEST 2005

Per Hedeland wrote:
>>In case of this server netstat ("netstat -a | grep 4369") wasn't seeing 
>>anything listening on,
> That's not to be expected - what you should see is a LISTEN on

Yes, but this wasn't happening.

>>epmd starts by binding to port 4369 using INADDR_ANY (telling the kernel 
>>to choose the IP address for it).  So, since the loopback address 
>>"" was taken by some other process, it bound to some other IP 
>>address ("" in case of this host) defined by the eth0 
> Actually no, that would be broken behaviour - binding to the wildcard
> INADDR_ANY should fail with EADDRINUSE in that case. And EADDRNOTAVAIL
> does not mean that the address is used by some other process, but that
> the address simply doesn't exist locally. Presumably no connections to
> could be made on your box, regardless of port.

You mean that the address is said to be badly specified in case when you 
are getting EADDRINUSE despite the fact that SO_REUSEADDR is specified? 
  I also expected the epmd to fail with EADDRINUSE, but this wasn't 

> Just curious, did you check that the loopback interface actually had
> configured before doing that? 

Surely.  /sbin/ifconfig showed it listed.

> If it did, you probably had some
> mess-up in your routing tables - Linux (probably other OSes too)
> determines whether an address is local through a routing lookup:
> $ ip route ls table local | grep
> ...
> local dev lo  proto kernel  scope host  src 
> The route gets put there "automagically" by the kernel when the address
> is configured on the interface, but it's possible to delete it...

This I didn't try, but will keep that in mind if I happen to encounter 
the same issue.



More information about the erlang-questions mailing list