Mininet OVS-Controller can 't be loaded and run

12,871

Solution 1

I had the exact same problem when I upgraded to Open vSwitch 2.1. In the release notes of ovs (NEWS) I found this:

  - ovs-controller has been renamed test-controller.  It is no longer
     packaged or installed by default, because too many users assumed
     incorrectly that ovs-controller was a necessary or desirable part
     of an Open vSwitch deployment.

I also found test-controller under ./tests/test-controller (source distribution), so I just tried

sudo cp tests/test-controller /usr/bin/ovs-controller

and that works fine for me! I'm using Mininet 2.1 as well, but I had to do the above for it to work. Here's the output:

$ sudo mn --controller=ovsc
*** Creating network
*** Adding controller
*** Adding hosts:
h1 h2
*** Adding switches:
s1
*** Adding links:
(h1, s1) (h2, s1)
*** Configuring hosts
h1 h2
*** Starting controller
*** Starting 1 switches
s1
*** Starting CLI:
mininet> pingall
*** Ping: testing ping reachability
h1 -> h2
h2 -> h1
*** Results: 0% dropped (2/2 received)
mininet>

It's interesting that they discourage the use of test-controller, and even more so that Mininet seems to rely on it. Perhaps there is a better executable for this purpose?

Let me know if this works for you!

Solution 2

As pointer by csl above, You have to install openvswitch controller separately. In ubuntu that's what worked for me:

sudo apt-get install openvswitch-testcontroller
sudo cp /usr/bin/ovs-testcontroller /usr/bin/ovs-controller

Solution 3

A cleaner way to install would have been to use the Ubuntu package upgrades. This would make future upgrades of OVS and removal easier. An example is at http://gregorygee.wordpress.com/2013/10/24/another-way-to-upgrade-open-vswitch-in-mininet/.

If you you installed Open vSwitch from source and want to remove it, then just go back to the source directory and run 'make uninstall'.

BTW, I have found that if you didn't have an installation of Open vSwitch on your system prior to installing from source, Open vSwitch installation would not include the system startup scripts, so you would have to install them manually. It's best to try and install Open vSwtich using packaging scripts.

Share:
12,871

Related videos on Youtube

Milson
Author by

Milson

“There are essentially two things that will make you wise -- the books you read and the people you meet.” ― Jack Canfield I am Human Kind and you?

Updated on June 04, 2022

Comments

  • Milson
    Milson almost 2 years

    When ever I try to login SSH to my mininet VM from Host terminal it shows Permission denied error and even from within VM terminal where the Mininet is hosted using command:

    sudo mn --topo single,3 --mac --switch ovsk --controller remote`
    

    it shows the following error:

    ubuntu@ubuntu:~$ sudo mn
    *** Creating network
    *** Adding controller
    *** Adding hosts:
    h1 h2
    *** Adding links:
    (h1, s1) (h2, s1)
    *** Configuring hosts
    h1 h2
    *** Starting controller
    Cannot find required executable ovs-controller.
    Please make sure that it is installed and availabe in your $PATH:
    (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin/:/bin)
    ubuntu@ubuntu:~$
    

    So I can't continue using the SDN network! How can it be fixed manually and why this error happens!

    • Milson
      Milson almost 10 years
      ya @csl that works fine with --controller=remote
    • csl
      csl almost 10 years
      Ok, well, then this question has been solved, I believe! :)
    • csl
      csl almost 10 years
      By the way, I've sent an email about this issue on mininet-discuss: mailman.stanford.edu/pipermail/mininet-discuss/2014-April/…
    • Milson
      Milson almost 10 years
      Yes i got it thanks ! csl
  • csl
    csl almost 10 years
    A fair point, but this only solves the install/uninstall part; not the problem with the missing (or renamed) binary in ovs 2.1.
  • Milson
    Milson almost 10 years
    @Greg : install Open vSwtich using packaging scripts is it available with ubuntu 12.04 LTS ?
  • Greg
    Greg almost 10 years
    Ubuntu 12.04 comes with OVS 1.4.3. My blog post says how to create newer packages of OVS. As for the missing binary, it is unknown what Mininet will do going forward with the OVS controller. The latest Ubuntu 14.04 packages of OVS is 2.0.1, which still contains the ovs-controller. So once an Ubuntu release comes out that doesn't include ovs-controller, then Mininet will have to be updated.
  • Pierz
    Pierz almost 6 years
    You can just soft link it: sudo ln -s /usr/bin/ovs-testcontroller /usr/bin/controller