问题
Whenever I want to run sshd.py example in mininet or some custome code I have written myself I get
*** Creating network
*** Adding controller
*** Adding hosts:
h1 h2 h3 h4 h5
*** Adding switches:
s1
*** Adding links:
(h1, s1) (h2, s1) (h3, s1) (h4, s1) (h5, s1)
*** Configuring hosts
h1 h2 h3 h4 h5
*** Starting controller
Cannot find required executable controller.
Please make sure that it is installed and available in your $PATH:
(/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
Though $ sudo mn --test pingall
works fine!
I guess I should find the open flow controller executable and add it to the path but I don't know where is it located. but the test create a controller and works fine!
I have tried to reinstalling mininet with
$ ~/mininet/util/install.sh -a or [-fnv]
回答1:
Stumbled upon the same issue with mininet on Ubuntu. Try to explicitly specify the controller class when constructing a Mininet object, e.g. instead of
net = Mininet(topo)
do
from mininet.node import OVSController
net = Mininet(topo = topo, controller = OVSController)
That solved the problem in my case.
回答2:
I wish the message was like
Cannot find required executable "controller".
Anyway, as long as you have ovs-controller installed e.g. provided by 'openvswitch-controller' package on debian like platform, all you have to do is
sudo ln /usr/bin/ovs-controller /usr/bin/controller
回答3:
In the newst versions of OVS, the ovs-controller was renamed to test-controller.
First install the openvswitch-testcontroller if you haven't with the following command:
sudo apt-get install openvswitch-testcontroller
Second, create a symbolic link to the test-controller:
sudo ln /usr/bin/ovs-testcontroller /usr/bin/controller
That works for me.
You also, can review this link: http://installfights.blogspot.com.co/2016/09/cannot-find-required-executable.html
回答4:
I had the same problem and I solved it by installing the new version of mininet (2.1.0). With the 2.0.0 version I couldn't do anything.
回答5:
ubuntu@ubuntu:~$ cd mininet/examples
ubuntu@ubuntu:~/mininet/examples$ dir
baresshd.py hwintf.py multipoll.py scratchnetuser.py
consoles.py limit.py multitest.py simpleperf.py
controllers2.py linearbandwidth.py popenpoll.py sshd.py
controllers.py milsontest.py popen.py tree1024.py
cpu.py miniedit.py README treeping64.py
emptynet.py multiping.py scratchnet.py
ubuntu@ubuntu:~/mininet/examples$ nano sshd.py
ubuntu@ubuntu:~/mininet/examples$ sudo python sshd.py
Have you tried this?
OR, if you using sudo mn command then try :
sudo mn --controller=remote
回答6:
I had the same problem, so I removed mininet and instead installing again with "apt-get install mininet", I downloaded the source and installed everything that is included in the Mininet VM. This solved the problem.
Just check out the "Option 2: Native Installation from Source" on the website: http://mininet.org/download/#option-1-mininet-vm-installation-easy-recommended
回答7:
There is a problem with installation as far as I perceived. I tried the mininet VM and everything works fine in it.
来源:https://stackoverflow.com/questions/17341076/mininet-cannot-find-required-executable-controller