[BGPCEP-167] Sending "Administrative reset" message causes "BGP Error code 6 and subcode 3 not recognized" exception Created: 14/Nov/14  Updated: 03/Mar/19  Resolved: 18/Nov/14

Status: Resolved
Project: bgpcep
Component/s: BGP
Affects Version/s: Bugzilla Migration
Fix Version/s: Bugzilla Migration

Type: Bug
Reporter: Jozef Behran Assignee: Unassigned
Resolution: Done 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: 2395

 Description   

Version of bgpcep is is 0.3.1 (could not find any field where to state this). The "version" field contains only "unspecified". Exact commit cannot be determined as I only have .jar files to work with. This bug is reportedly fixed in 0.4.0 but I have not tested that yet.

When the speaker tries to close the connection gracefully, it sends a NOTIFICATION message with the request "Administrative Reset". It then waits for ODL to confirm the "Administrative Reset" by closing the connection and after that it knows the ODL handled it OK and closes the connection. At least EXABGP is doing this.

However when BGPCEP receives the "Administrative Reset" message, it crashes with the "BGP Error code 6 and subcode 3 not recognized" error. The session then remains stuck and any other connections attempts from the same host will fail due to "Equal sessions with same direction" error.

Here is the part of the log relevant to this bug:

15:03:26.927 UTC [nettyThreadgroupModule$NioEventLoopGroupCloseable-5-5] TRACE o.o.p.b.r.i.BGPByteToMessageDecoder - Received to decode: ffffffffffffffffffffffffffffffff0027030603506565722044652d636f6e66696775726564
2014-11-14 15:03:26.928 UTC [nettyThreadgroupModule$NioEventLoopGroupCloseable-5-5] TRACE o.o.p.b.p.i.m.BGPNotificationMessageParser - Started parsing of notification message: 0603506565722044652d636f6e66696775726564
2014-11-14 15:03:26.939 UTC [nettyThreadgroupModule$NioEventLoopGroupCloseable-5-5] WARN i.n.channel.DefaultChannelPipeline - An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
io.netty.handler.codec.DecoderException: java.lang.IllegalArgumentException: BGP Error code 6 and subcode 3 not recognized.
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:280) [bundlefile:4.0.23.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:149) [bundlefile:4.0.23.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [bundlefile:4.0.23.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) [bundlefile:4.0.23.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:163) [bundlefile:4.0.23.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [bundlefile:4.0.23.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) [bundlefile:4.0.23.Final]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787) [bundlefile:4.0.23.Final]
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:130) [bundlefile:4.0.23.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511) [bundlefile:4.0.23.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468) [bundlefile:4.0.23.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) [bundlefile:4.0.23.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) [bundlefile:4.0.23.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) [bundlefile:4.0.23.Final]
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137) [bundlefile:4.0.23.Final]
at java.lang.Thread.run(Unknown Source) [na:1.7.0_67]
Caused by: java.lang.IllegalArgumentException: BGP Error code 6 and subcode 3 not recognized.
at org.opendaylight.protocol.bgp.parser.BGPError.forValue(BGPError.java:198) ~[na:na]
at org.opendaylight.protocol.bgp.parser.impl.message.BGPNotificationMessageParser.parseMessageBody(BGPNotificationMessageParser.java:81) ~[na:na]
at org.opendaylight.protocol.bgp.parser.impl.message.BGPNotificationMessageParser.parseMessageBody(BGPNotificationMessageParser.java:30) ~[na:na]
at org.opendaylight.protocol.bgp.parser.spi.pojo.SimpleMessageRegistry.parseBody(SimpleMessageRegistry.java:31) ~[na:na]
at org.opendaylight.protocol.bgp.parser.spi.AbstractMessageRegistry.parseMessage(AbstractMessageRegistry.java:61) ~[na:na]
at org.opendaylight.protocol.bgp.rib.impl.BGPByteToMessageDecoder.decode(BGPByteToMessageDecoder.java:41) ~[na:na]
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:249) [bundlefile:4.0.23.Final]
... 15 common frames omitted



 Comments   
Comment by Dana Kutenicsova [ 18/Nov/14 ]

Fixed in master with commit: https://git.opendaylight.org/gerrit/#/c/12147/

Generated at Wed Feb 07 19:12:14 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.