[OPNFLWPLUG-675] bind exception on first running openflow plugin Created: 24/Apr/16  Updated: 27/Sep/21  Resolved: 28/Apr/16

Status: Resolved
Project: OpenFlowPlugin
Component/s: General
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Colin Dixon Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 5789

 Description   

Using Beryllium-SR1, after installing the OpenFlow plugin using:
feature:install odl-openflowplugin-flow-services-rest

When the first switch connects, I see the following exception:
opendaylight-user@root>Exception in thread "Thread-59" java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:463)
at sun.nio.ch.Net.bind(Net.java:455)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:125)
at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:485)
at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1089)
at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:440)
at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:425)
at io.netty.channel.ChannelDuplexHandler.bind(ChannelDuplexHandler.java:38)
at io.netty.handler.logging.LoggingHandler.bind(LoggingHandler.java:197)
at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:440)
at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:425)
at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:903)
at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:198)
at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:348)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:358)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
at java.lang.Thread.run(Thread.java:745)

and I don't see any of the OpenFlow switches actually connect.

Oddly, if you then shut down the controller (via Control-D) and relaunch it the exception doesn't occur and things seem to work right.



 Comments   
Comment by Colin Dixon [ 24/Apr/16 ]

This is when using Mininet 2.1.0.

Comment by Luis Gomez [ 25/Apr/16 ]

Colin, I just tried this and could not reproduce in my end. Normally this kind of failures are detected by the test automation, this is why I run to verify myself.

Comment by Colin Dixon [ 28/Apr/16 ]

I can reproduce this every time in an Vagrant box with the following versions:

vagrant@vagrant-ubuntu-trusty-64:~$ uname -a
Linux vagrant-ubuntu-trusty-64 3.13.0-85-generic #129-Ubuntu SMP Thu Mar 17 20:50:15 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
vagrant@vagrant-ubuntu-trusty-64:~$ java -version
java version "1.7.0_95"
OpenJDK Runtime Environment (IcedTea 2.6.4) (7u95-2.6.4-0ubuntu0.14.04.2)
OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)

I guess I should check the original Beryllium release and maybe try it with java 8.

Comment by Colin Dixon [ 28/Apr/16 ]

This is in a VM with only 2GB of RAM as well, which presumably should still work, but might not be something we're testing. I'll keep trying to pin down exactly why/where this is happening.

It's also frustrating to debug as it's not clear where we're spinning up this thread from the Exception.

Comment by Colin Dixon [ 28/Apr/16 ]

Bumping memory to 4GB did nothing.

Comment by Colin Dixon [ 28/Apr/16 ]

More investigation shows that I really don't need to launch mininet at all. The error just comes up if I install odl-openflowplugin-flow-services and wait about 30 seconds.

Comment by Colin Dixon [ 28/Apr/16 ]

It turns out that installing mininet automatically ran a copy of NOX that was listening on port 6633.

Generated at Wed Feb 07 20:33:05 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.