I am seeing the following error in my log: [WebExtender-Init] ERROR o.s.o.w.d.jetty.JettyWarDeployer - No Jetty Server found, bailing out
The embedded web server in Beacon named Jetty listens on port 8080 by default, if you are seeing this error then either you already have another instance of Beacon running, or another process is using port 8080. Disable the other process or change its port to fix this error.
At runtime I am getting: Exception in thread "thread name here" java.lang.NoClassDefFoundError: my/class/here.
This is usually due to missing import statements in your bundle's MANIFEST.MF file. The reason is your bundle needs to explicitly tell the OSGi framework that it needs the specified package to be able to run. To fix this in Eclipse:
- Go to the project, then the META-INF folder, and double click MANIFEST.MF
- Once that is opened click the dependencies tab (bottom of the new window)
- On the right side of the window you should see Imported Packages which will likely have existing imports such as org.openflow.protocol, etc
- Either directly add the missing package to this list or
- Click the Automated Management of Dependencies section to expand it, click the Import-Package radio button, then click the add dependencies link which will scan all the Java files in your project and ensure any used classes have proper import statements added to the Manifest
How can I add a new library?
First, make sure that your library has proper MANIFEST.MF configuration to be used as an OSGi bundle. (Projects generally provide separate releases for OSGi bundles.)
- Copy your JAR file into libs/plugins directory.
- Set ECLIPSE_HOME environment variable according to your own Eclipse installation.
- Run libs/build.sh script. (After running build.sh, if you see your bundle missing in libs/plugins, make sure that the library you are about to add has proper MANIFEST.MF configurations.) This will convert the contents of the plugins folder to be in p2 format. (See produced artifacts.xml and content.xml files under libs directory.)
- From within Eclipse, refesh the libs project, close and open the target, and set it again.
- Open your MANIFEST.MF (e.g., net.beaconcontroller.learningswitch/META-INF/MANIFEST.MF), go to Dependencies tab, from within Automated Management of Dependencies, click Add button. Type the name of your bundle, select it from the search results, and click OK.
See add new jar/bundle for the related Forum discussion.
How can I debug OSGi class loader problems?
- In Dependencies tab of your bundle's
org.eclipse.osgi to the list of Automated Management of Dependencies and
org.eclipse.osgi.framework.debug to the list of Imported Packages.
org.eclipse.osgi.framework.debug.Debug.DEBUG_LOADER = true; line to the
startUp() method of your bundle.
You can check other fields of
org.eclipse.osgi.framework.debug.Debug for further debugging options.
I observe excessive controller traffic originating from the switches.
It is highly probable that your network topology contains cycles in itself. And switch broadcasts cause a traffic explosion cycling through the loops in the topology. Try enabling STP (Spanning Tree Protocol) on the switches.
While everything works fine with
Routing bundle causes Beacon to not push any flows to the switch.
While this might happen due to various reasons, a majority of such glitches is expected to be observable by Beacon log messages, but with one significant exception: Switch flows tables must be in clean state before connecting to the controller and no other mechanisms should push flows the the switches, but the controller itself. (See this discussion for further details: https://openflow.stanford.edu/forums/topic/184-1-way-switch-connectivity/) This problem is generally observed with soft-switches (e.g., Open vSwitch), where the fail-mode of the switch is set to open – that is, act as a learning switch when the connection to the controller fails – by default. Hence, while using Beacon, make sure that the switch flow tables are empty before the controller connection.