intrig-unicamp / mininet-wifi

Emulator for Software-Defined Wireless Networks
https://mn-wifi.readthedocs.io/
Other
443 stars 241 forks source link

`examples/vanet.py` does not run #216

Closed 1kastner closed 5 years ago

1kastner commented 5 years ago

I tried to run examples/vanet.py but for hours nothing was done.

USER@PC:/.../mininet-wifi/examples$ sudo python vanet.py
[sudo] password for USER:
*** Error setting resource limits. Mininet's performance may be affected.
*** Creating nodes

^CTraceback (most recent call last):
  File "vanet.py", line 84, in <module>
    topology()
  File "vanet.py", line 29, in topology
    max_speed=max_))
  File "/usr/local/lib/python2.7/dist-packages/mininet_wifi-2.3-py2.7.egg/mn_wifi/net.py", line 291, in addCar
    car = cls(name, **defaults)
  File "/usr/local/lib/python2.7/dist-packages/mininet_wifi-2.3-py2.7.egg/mn_wifi/node.py", line 91, in __init__
    self.startShell()
  File "/usr/local/lib/python2.7/dist-packages/mininet_wifi-2.3-py2.7.egg/mn_wifi/node.py", line 152, in startShell
    data = self.read(1024)
  File "/usr/local/lib/python2.7/dist-packages/mininet_wifi-2.3-py2.7.egg/mn_wifi/node.py", line 595, in read
    data = os.read(self.stdout.fileno(), maxbytes - count)
KeyboardInterrupt

I interrupted the process after I was out for a lunch break and two meetings.

I ran this on a "ubuntu as a subsystem on windows 10". Are there some hints you can provide me with? Anything I need to start in the background? I just ran the installer as pointed out in the manual. Thanks a lot in advance.

ramonfontes commented 5 years ago

Hi,

Which kernel version do you have? Can you run sudo mn --wifi?

1kastner commented 5 years ago
USER@PC:/.../mininet-wifi/examples$ sudo mn --wifi
[sudo] password for USER:
*** Error setting resource limits. Mininet's performance may be affected.
*** Creating network
*** Adding controller
*** Adding stations:
^C

Keyboard Interrupt. Shutting down and cleaning up...

*** Removing excess controllers/ofprotocols/ofdatapaths/pings/noxes
killall controller ofprotocol ofdatapath ping nox_corelt-nox_core ovs-openflowd ovs-controllerovs-testcontroller udpbwtest mnexec ivs ryu-manager 2> /dev/null
killall -9 controller ofprotocol ofdatapath ping nox_corelt-nox_core ovs-openflowd ovs-controllerovs-testcontroller udpbwtest mnexec ivs ryu-manager 2> /dev/null
pkill -9 -f "sudo mnexec"
*** Removing junk from /tmp
rm -f /tmp/vconn* /tmp/vlogs* /tmp/*.out /tmp/*.log
*** Removing old X11 tunnels
*** Removing excess kernel datapaths
ps ax | egrep -o 'dp[0-9]+' | sed 's/dp/nl:/'
***  Removing OVS datapaths
ovs-vsctl --timeout=1 list-br
ovs-vsctl: unix:/var/run/openvswitch/db.sock: database connection failed (No such file or directory)
ovs-vsctl --timeout=1 list-br
ovs-vsctl: unix:/var/run/openvswitch/db.sock: database connection failed (No such file or directory)
*** Removing all links of the pattern foo-ethX
ip link show | egrep -o '([-_.[:alnum:]]+-eth[[:digit:]]+)'
ip link show
*** Killing stale mininet node processes
pkill -9 -f mininet:
*** Shutting down stale tunnels
pkill -9 -f Tunnel=Ethernet
pkill -9 -f .ssh/mn
rm -f ~/.ssh/mn/*
*** Cleanup complete.
***  Removing WiFi module and Configurations
libkmod: ERROR ../libkmod/libkmod-module.c:1655 kmod_module_new_from_loaded: could not open /proc/modules: No such file or directory
Error: could not get list of modules: No such file or directory
libkmod: ERROR ../libkmod/libkmod-module.c:1655 kmod_module_new_from_loaded: could not open /proc/modules: No such file or directory
Error: could not get list of modules: No such file or directory
pkill -9 -f hostapd
*** Killing wmediumd
pkill wmediumd
***  Removing fakelb module and Configurations
libkmod: ERROR ../libkmod/libkmod-module.c:1655 kmod_module_new_from_loaded: could not open /proc/modules: No such file or directory
Error: could not get list of modules: No such file or directory

It took quite a while at "Adding stations". I will re-run this when I have more time. Thanks for the fast reply!

ramonfontes commented 5 years ago

It seems that you have problems with your kernel: could not open /proc/modules: No such file or directory

1kastner commented 5 years ago

Maybe I should run this inside a proper virtual machine instead of the "as a subsystem" approach.

ramonfontes commented 5 years ago

Not sure. I don't know how such subsystem of Windows work.

awlane commented 5 years ago

WSL is an interpreter layer between the Linux and Windows kernel API, I don't think that Mininet will work well because it relies on OS level features.