Ask Your Question
0

IllegalStateException on netconf hello message.

asked 2014-11-14 22:26:40 -0700

kotetsu gravatar image

I tried to connect to connect Juniper Firefly that support for netconf and not support netconf monitoring, by the below link sequence.

OpenDaylight Controller:Config:Examples:Netconf

  1. feature:install odl-netconf-connector-all
  2. add node and check it via Restconf
  3. create custom YANG schema file and put it cashe/schema/
  4. mod node yang-module-capabilities via Restconf

Then, ODL connects FireFly(netconf server) via netconf, but it cause "java.lang.IllegalStateException on netconf hello" on hello message.Below is data/log/karaf.log .

2014-11-15 13:49:16,604 | INFO  | oupCloseable-7-2 | AbstractSessionNegotiator        | 632 - org.opendaylight.controller.protocol-framework - 0.5.0.Helium | Unexpected error during negotiation
io.netty.handler.codec.DecoderException: java.lang.IllegalStateException: Hello message not received, instead received: <hello>
  <capabilities>
    <capability>urn:ietf:params:xml:ns:netconf:base:1.0</capability>
    <capability>urn:ietf:params:xml:ns:netconf:capability:candidate:1.0</capability>
    <capability>urn:ietf:params:xml:ns:netconf:capability:confirmed-commit:1.0</capability>
    <capability>urn:ietf:params:xml:ns:netconf:capability:validate:1.0</capability>
    <capability>urn:ietf:params:xml:ns:netconf:capability:url:1.0?protocol=http,ftp,file</capability>
    <capability>http://xml.juniper.net/netconf/junos/1.0</capability>
    <capability>http://xml.juniper.net/dmi/system/1.0</capability>
  </capabilities>
  <session-id>3474</session-id>
</hello>

        at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:280)[650:io.netty.codec:4.0.23.Final]
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:149)[650:io.netty.codec:4.0.23.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)[629:io.netty.transport:4.0.23.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)[629:io.netty.transport:4.0.23.Final]
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:163)[650:io.netty.codec:4.0.23.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)[629:io.netty.transport:4.0.23.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)[629:io.netty.transport:4.0.23.Final]
        at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)[629:io.netty.transport:4.0.23.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)[629:io.netty.transport:4.0.23.Final]
        at io.netty.channel.AbstractChannelHandlerContext.access$700(AbstractChannelHandlerContext.java:32)[629:io.netty.transport:4.0.23.Final]
        at io.netty.channel.AbstractChannelHandlerContext$8.run(AbstractChannelHandlerContext.java:324)[629:io.netty.transport:4.0.23.Final]
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:380)[630:io.netty.common:4.0.23.Final]
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)[629:io.netty.transport:4.0.23.Final]
        at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)[630:io.netty.common:4.0.23.Final]
        at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)[630:io.netty.common:4.0.23.Final]
        at java.lang.Thread.run(Thread.java:745)[:1.7.0_65]
Caused by: java.lang.IllegalStateException: Hello message not received, instead received: <hello>
  <capabilities>
    <capability>urn:ietf:params:xml:ns:netconf ...
(more)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-11-17 08:39:56 -0700

Maros gravatar image

The problem is that the hello message does not contain required namespace: xmlns="urn:ietf:params:xml:ns:netconf:base:1.0

e.g. http://tools.ietf.org/html/rfc6241#section-8.1

Is there a reason for the device not to include the namespace ?

edit flag offensive delete publish link more

Comments

Thank you for your reply. I understand why does this Exception occured on my device. I can't know why JuniperNetworks implement like that.

kotetsu ( 2014-11-18 07:12:44 -0700 )edit

You could try to modify the ODL controller code to not check namespace for hello message. This class https://github.com/opendaylight/controller/blob/master/opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/messages/NetconfHelloMessage.java and method isHelloMessage(Document). Just remove the namespace checks.

Maros ( 2015-03-13 08:29:40 -0700 )edit
Login/Signup to Answer

Question Tools

Follow
2 followers

Stats

Asked: 2014-11-14 22:26:40 -0700

Seen: 334 times

Last updated: Nov 17 '14