[Spread-users] Trouble binding to specific interface

Dave Parker dparker at nocpulse.com
Thu Nov 15 23:40:49 EST 2001


That fixed the problem.  It's starting up and binding to 4803 tcp & udp
and 4804 udp for just localhost.  

Two things:

1) it seems it's binding to 1083 on every interface as well:

from netstat: udp        0      0 *:1083                  *:* 

from lsof: spread    7168     root    6u  IPv4      22871              
UDP *:1083

Is there an option for whatever that is too?

2) (I'll have an answer for this myself very shortly, but...) How will
spread deal with binding to a point-to-point interface (i.e. netmask
255.255.255.255)?


Thanks again!



Jonathan Stanton wrote:
> 
> Ah Ha. A special case where you do not need a broadcast bind because there
> is only one daemon running, so if you try to do the broadcast bind you end
> up binding to 0.0.0.0 instead of 127.0.0.255. I've attached a patch to this
> email that fixes the problem for me.
> 
> Tell me if you find any more quirks like this.
> 
> Thanks,
> 
> Jonathan
> 
> On Thu, Nov 15, 2001 at 07:32:33PM -0800, Dave Parker wrote:
> > I'm trying to set up a spread daemon such that it only listens on the
> > loopback interface, thus:
> >
> > DebugFlags = { PRINT EXIT }
> > EventLogFile = /var/log/spread.log
> > EventTimeStamp
> > DangerousMonitor = true
> > Spread_Segment  127.0.0.255:4803 {
> >         localhost               127.0.0.1  {
> >                 D 127.0.0.1
> >                 C 127.0.0.1
> >         }
> > }
> >
> > It is however consistently failing to start:
> >
> > [Fri 16 Nov 2001 03:17:25] DL_init_channel: bind error for port 4803,
> > already running
> >
> > An strace reveals:
> >
> > socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3
> > bind(3, {sin_family=AF_INET, sin_port=htons(4803),
> > sin_addr=inet_addr("0.0.0.0")}}, 16) = 0
> > setsockopt(3, SOL_SOCKET, SO_BROADCAST, [1], 4) = 0
> > socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 5
> > bind(5, {sin_family=AF_INET, sin_port=htons(4803),
> > sin_addr=inet_addr("127.0.0.1")}}, 16) = -1 EADDRINUSE (Address already
> > in use)
> >
> > Any ideas?
> >
> >
> > _______________________________________________
> > Spread-users mailing list
> > Spread-users at lists.spread.org
> > http://lists.spread.org/mailman/listinfo/spread-users
> 
> --
> -------------------------------------------------------
> Jonathan R. Stanton         jonathan at cs.jhu.edu
> Dept. of Computer Science
> Johns Hopkins University
> -------------------------------------------------------
> 
>   ------------------------------------------------------------------------
> 
>    net_bcast.patchName: net_bcast.patch
>                   Type: Plain Text (text/plain)





More information about the Spread-users mailing list