Ask Your Question
0

Address already in use during ./karaf run

asked 2014-12-10 03:43:19 -0700

bhavesh07 gravatar image

updated 2014-12-10 13:31:51 -0700

I'm seeing the exception below. What's going on?

opendaylight-user@root>
opendaylight-user@root>Exception in thread "Thread-35" java.net.BindException: Address already in use
    at sun.nio.ch.Net.bind0(Native Method)
    at sun.nio.ch.Net.bind(Net.java:444)
    at sun.nio.ch.Net.bind(Net.java:436)
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214)
    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:475)
    at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1021)
    at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:455)
    at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:440)
    at io.netty.channel.ChannelDuplexHandler.bind(ChannelDuplexHandler.java:38)
    at io.netty.handler.logging.LoggingHandler.bind(LoggingHandler.java:240)
    at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:455)
    at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:440)
    at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:844)
    at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:194)
    at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:340)
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:380)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
    at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
    at java.lang.Thread.run(Thread.java:745)

opendaylight-user@root>
edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted
3

answered 2014-12-10 13:30:21 -0700

To add to CASP3R's (good) answer, that's almost always a result of an already-running instance of ODL.

Check for unexpected java process with pgrep java, or ODL directly with ./bin/status. Kill the ODL instance with pkill java or ./bin/stop.

edit flag offensive delete publish link more

Comments

2

Another thing to check (maybe it's not an ODL controller running) is the open TCP ports. Check if OpenFlow is listening (e.g. port 6633 is up with a check in linux using netstat -na)

jamoluhrsen ( 2014-12-10 14:20:29 -0700 )edit

Yeah, the port 6633 is up and listens OVS-Controller. Do I need to kill this process before running karaf....???

bhavesh07 ( 2014-12-10 20:28:17 -0700 )edit

Yep, the OpenDaylight controller needs to listen to 6633, to run OpenFlow.

Chris O'Shea ( 2014-12-10 21:17:32 -0700 )edit
1

answered 2014-12-10 13:22:00 -0700

Moderators

This normally happens when there more than one controller running, check if there any old controller still running.

  • Mac/Unix - "PS -ef | grep java"
  • Windows- Task manager check for java process
edit flag offensive delete publish link more

Comments

There were no other controller running. Also I have already filtered out and killed all the JAVA processes before running karaf.

bhavesh07 ( 2014-12-10 20:20:21 -0700 )edit
0

answered 2014-12-11 19:42:31 -0700

Ashwini_Mhatre gravatar image

updated 2014-12-11 19:44:23 -0700

you can also try following command: "PS -ef | grep karaf" kill the <pid karaf="" of=""></pid>

Note:if you want to come out from karaf prompt use command:-shutdown so you will not face this problem again

edit flag offensive delete publish link more
0

answered 2015-05-08 10:36:47 -0700

runamuck gravatar image

updated 2015-05-08 12:58:00 -0700

I had this exact error on Ubuntu 14.04. If you see this error, kill your karaf service. Then execute:

sudo service openvswitch-switch stop

Then start your karaf service. Give it enough time to start all the modules. You will not see that error.

Then, with OpenDaylight running (either background the process or open another shell) execute

sudo service openvswitch-switch start

Now you can use ovs. You can use mininet, for example, to create virtual ovsk switches.

edit flag offensive delete publish link more
Login/Signup to Answer

Stats

Asked: 2014-12-10 03:43:19 -0700

Seen: 2,052 times

Last updated: May 08 '15