Ticket #1 (closed defect: fixed)

Opened 1 year ago

Last modified 3 months ago

Netsukuku does not start - socket.error: (101, 'ENETUNREACH')

Reported by: zioproto Assigned to:
Priority: major Component: Netsukuku
Version: Netsukuku-SVN Keywords:
Cc: efphe@netsukuku.org, alpt@freaknet.org, clauz@ninux.org, nino@ninux.org, eriol@mornie.org

Description

Reproducible Always

Steps to reproduce the bug:

 $ mkdir ~/netsukuku; cd ~/netsukuku
 $ wget http://www.stackless.com/binaries/stackless-251-export.tar.bz2
 $ tar jxf stackless-251-export.tar.bz2
 $ cd stackless-251-export
 # mkdir -p /opt/stackless
 $ ./configure --prefix=/opt/stackless
 $ make
 # make altinstall
 $ svn co http://dev.hinezumi.org/svnroot/netsukuku/trunk
 $ cd trunk/pyntk
 $ /opt/stackless/bin/python2.5 setup.py build 
 # /opt/stackless/bin/python2.5 setup.py install
 # mkdir /etc/netsukuku
 # touch /etc/netsukuku/netsukuku.conf
 # /opt/stackless/bin/python2.5 ntkd

Output is:

Traceback (most recent call last):
  File "./ntkd", line 77, in <module>
    main()
  File "./ntkd", line 74, in main
    allmicro_run()
  File "/hosthome/SORGENTI/netsukuku/pyntk/ntk/lib/micro.py", line 35, in allmicro_run
    stackless.run()
  File "/hosthome/SORGENTI/netsukuku/pyntk/ntk/core/radar.py", line 337, in run
    while True: self.radar()
  File "/hosthome/SORGENTI/netsukuku/pyntk/ntk/core/radar.py", line 350, in radar
    self.broadcast.radar.reply(self.ntkd_id, self.radar_id)
  File "/hosthome/SORGENTI/netsukuku/pyntk/ntk/lib/rpc.py", line 112, in __call__
    return self.rmt(self._name[1:], *params)
  File "/hosthome/SORGENTI/netsukuku/pyntk/ntk/lib/rpc.py", line 439, in rmt
    self.rpc_call(func_name, params)
  File "/hosthome/SORGENTI/netsukuku/pyntk/ntk/lib/rpc.py", line 417, in rpc_call
    self.connect()
  File "/hosthome/SORGENTI/netsukuku/pyntk/ntk/lib/rpc.py", line 430, in connect
    sk.connect(('<broadcast>', self.port))
  File "/hosthome/SORGENTI/netsukuku/pyntk/ntk/lib/microsock.py", line 186, in connect
    asyncore.dispatcher.connect(self, address)
  File "/opt/stackless/lib/python2.5/asyncore.py", line 316, in connect
    raise socket.error, (err, errorcode[err])
socket.error: (101, 'ENETUNREACH')

Change History

01/26/08 13:02:47 changed by zioproto

# modprobe dummy
# stapy ./ntkd "n='dummy0'"

I tried also this, same behaviour

Or try another network interface (check the interface is up)

I forgot to mention that this happens only if the interface is UP

When the interface is DOWN nothing happens, the process keeps running but no packets are generated on any interface.

01/27/08 11:08:37 changed by zioproto

  • cc changed from efphe@netsukuku.org, alpt@netsukuku.org, clauz@ninux.org, nino@ninux.org to efphe@netsukuku.org, alpt@freaknet.org, clauz@ninux.org, nino@ninux.org.

Reporting same problem with more verbose output dbg=9

host1:/hosthome/SORGENTI/netsukuku/pyntk# /opt/stackless/bin/python2.5 ntkd dbg=9
DEBUG radar scan 3122519505
Traceback (most recent call last):
  File "ntkd", line 77, in <module>
    main()
  File "ntkd", line 74, in main
    allmicro_run()
  File "/hosthome/SORGENTI/netsukuku/pyntk/ntk/lib/micro.py", line 35, in allmicro_run
    stackless.run()
  File "/hosthome/SORGENTI/netsukuku/pyntk/ntk/core/radar.py", line 337, in run
    while True: self.radar()
  File "/hosthome/SORGENTI/netsukuku/pyntk/ntk/core/radar.py", line 350, in radar
    self.broadcast.radar.reply(self.ntkd_id, self.radar_id)
  File "/hosthome/SORGENTI/netsukuku/pyntk/ntk/lib/rpc.py", line 112, in __call__
    return self.rmt(self._name[1:], *params)
  File "/hosthome/SORGENTI/netsukuku/pyntk/ntk/lib/rpc.py", line 439, in rmt
    self.rpc_call(func_name, params)
  File "/hosthome/SORGENTI/netsukuku/pyntk/ntk/lib/rpc.py", line 417, in rpc_call
    self.connect()
  File "/hosthome/SORGENTI/netsukuku/pyntk/ntk/lib/rpc.py", line 430, in connect
    sk.connect(('<broadcast>', self.port))
  File "/hosthome/SORGENTI/netsukuku/pyntk/ntk/lib/microsock.py", line 186, in connect
    asyncore.dispatcher.connect(self, address)
  File "/opt/stackless/lib/python2.5/asyncore.py", line 316, in connect
    raise socket.error, (err, errorcode[err])
socket.error: (101, 'ENETUNREACH')
host1:/hosthome/SORGENTI/netsukuku/pyntk#

01/27/08 11:13:25 changed by zioproto

Maybe the problem is in the broadcast address that is not correctly set. Look my ifconfig output after netsukuk crashes, look at Bcast: 0.0.0.0:

dummy0    Link encap:Ethernet  HWaddr 62:af:58:2f:30:f5  
          inet addr:252.254.7.26  Bcast:0.0.0.0  Mask:255.255.255.255
          UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

This configuration is set by Netsukuku before crashing. I guess the python program tries to send some broadcast data to the interface, but ENETUNREACH comes out because there is not broadcast address to send to. Is this possible?

08/15/08 04:37:16 changed by arpunk

  • priority changed from critical to major.

You need to have at least one working interface already up. This is because the RPC server must have a working interface otherwise it won't start (it needs to send/recv messages via sockets).

Try it again with eth0 up.

02/15/09 02:40:17 changed by eriol

  • cc changed from efphe@netsukuku.org, alpt@freaknet.org, clauz@ninux.org, nino@ninux.org to efphe@netsukuku.org, alpt@freaknet.org, clauz@ninux.org, nino@ninux.org, eriol@mornie.org.

Can you test using trunk rev 1504 and tell me if this bug is present yet?

For me now it works:

stackless:/home/eriol/devel/netsukuku/trunk/pyntk$ ip link show eth0
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
   ...
stackless:/home/eriol/devel/netsukuku/trunk/pyntk$ ./ntkd -i eth0 -d
DEBUG radar scan 1289137826                                         
DEBUG UDP packet from ('133.131.254.30', 48090), dev None           
DEBUG Handling data: radar.reply�A�1�@L�                            
DEBUG _dispatch: radar.reply((3727757985, 1289137826))              
DEBUG func_get: radar.reply                                         
DEBUG dispatch response: None

eth0 is correctly brought up:

stackless:/home/eriol/devel/netsukuku/trunk/pyntk$ ip address show eth0
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
    ...
    inet 133.131.254.30/32 scope global eth0

04/01/09 01:59:32 changed by eriol

  • status changed from new to closed.
  • resolution set to fixed.