[OPNFLWPLUG-587] Message deserialization failed -- ClassCastException Created: 02/Jan/16  Updated: 27/Sep/21  Resolved: 22/Jun/17

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

Type: Bug
Reporter: Anil Vishnoi Assignee: Anil Vishnoi
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Duplicate
is duplicated by OPNFLWJAVA-72 Issue Detected between Nicira Extensi... Resolved
External issue ID: 4862
Priority: Normal

 Description   

I am using Openflowplugin alternate design (openflowplugin*-li features) with ovsdb and when ovsdb tries to install flows to the switch, it sees following exception. I think this will happen irrespective to whatever openflowplugin design you use. Because of this flow installation is failing.

2016-01-02 13:35:59,829 | WARN | entLoopGroup-9-1 | OFDecoder | 256 - org.opendaylight.openflowjava.openflow-protocol-impl - 0.7.0.SNAPSHOT | Message deserialization failed
java.lang.ClassCastException: org.opendaylight.openflowjava.nx.codec.match.TunIpv4SrcCodec cannot be cast to org.opendaylight.openflowjava.protocol.api.extensibility.HeaderDeserializer
at org.opendaylight.openflowjava.protocol.impl.util.ListDeserializer.deserializeHeaders(ListDeserializer.java:79)[256:org.opendaylight.openflowjava.openflow-protocol-impl:0.7.0.SNAPSHOT]
at org.opendaylight.openflowjava.protocol.impl.deserialization.factories.MultipartReplyMessageFactory.createTableFeaturesProperties(MultipartReplyMessageFactory.java:444)[256:org.opendaylight.openflowjava.openflow-protocol-impl:0.7.0.SNAPSHOT]
at org.opendaylight.openflowjava.protocol.impl.deserialization.factories.MultipartReplyMessageFactory.setTableFeatures(MultipartReplyMessageFactory.java:379)[256:org.opendaylight.openflowjava.openflow-protocol-impl:0.7.0.SNAPSHOT]
at org.opendaylight.openflowjava.protocol.impl.deserialization.factories.MultipartReplyMessageFactory.deserialize(MultipartReplyMessageFactory.java:232)[256:org.opendaylight.openflowjava.openflow-protocol-impl:0.7.0.SNAPSHOT]
at org.opendaylight.openflowjava.protocol.impl.deserialization.factories.MultipartReplyMessageFactory.deserialize(MultipartReplyMessageFactory.java:149)[256:org.opendaylight.openflowjava.openflow-protocol-impl:0.7.0.SNAPSHOT]
at org.opendaylight.openflowjava.protocol.impl.deserialization.DeserializationFactory.deserialize(DeserializationFactory.java:59)[256:org.opendaylight.openflowjava.openflow-protocol-impl:0.7.0.SNAPSHOT]
at org.opendaylight.openflowjava.protocol.impl.core.OFDecoder.decode(OFDecoder.java:55)[256:org.opendaylight.openflowjava.openflow-protocol-impl:0.7.0.SNAPSHOT]
at org.opendaylight.openflowjava.protocol.impl.core.OFDecoder.decode(OFDecoder.java:28)[256:org.opendaylight.openflowjava.openflow-protocol-impl:0.7.0.SNAPSHOT]
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89)[112:io.netty.codec:4.0.33.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)[111:io.netty.transport:4.0.33.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)[111:io.netty.transport:4.0.33.Final]
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:276)[112:io.netty.codec:4.0.33.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:263)[112:io.netty.codec:4.0.33.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)[111:io.netty.transport:4.0.33.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)[111:io.netty.transport:4.0.33.Final]
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:276)[112:io.netty.codec:4.0.33.Final]
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:354)[112:io.netty.codec:4.0.33.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:244)[112:io.netty.codec:4.0.33.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)[111:io.netty.transport:4.0.33.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)[111:io.netty.transport:4.0.33.Final]
at io.netty.handler.timeout.ReadTimeoutHandler.channelRead(ReadTimeoutHandler.java:152)[114:io.netty.handler:4.0.33.Final]
at org.opendaylight.openflowjava.protocol.impl.core.IdleHandler.channelRead(IdleHandler.java:39)[256:org.opendaylight.openflowjava.openflow-protocol-impl:0.7.0.SNAPSHOT]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)[111:io.netty.transport:4.0.33.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)[111:io.netty.transport:4.0.33.Final]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846)[111:io.netty.transport:4.0.33.Final]
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)[111:io.netty.transport:4.0.33.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)[111:io.netty.transport:4.0.33.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)[111:io.netty.transport:4.0.33.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)[111:io.netty.transport:4.0.33.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:349)[111:io.netty.transport:4.0.33.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)[110:io.netty.common:4.0.33.Final]
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)[110:io.netty.common:4.0.33.Final]
at java.lang.Thread.run(Thread.java:745)[:1.7.0_80]



 Comments   
Comment by Anil Vishnoi [ 02/Jan/16 ]

FYI..I am using following OVS version

  1. ovs-vsctl show
    8a1b87c4-b1db-48e3-b68e-b108b75832cb
    ovs_version: "2.4.0"
Comment by Luis Gomez [ 04/Jan/16 ]

This can be related to https://bugs.opendaylight.org/show_bug.cgi?id=4473, right?

Comment by Anil Vishnoi [ 04/Jan/16 ]

yes luis, it looks like we need this patch.

Comment by Robert Varga [ 27/Jan/16 ]

TunIpv4SrcCodec needs to implement HeaderDeserializer interface. Unfortunately the registry implementation is not really helpful with diagnosing this mismatch.

https://git.opendaylight.org/gerrit/33633 adds the appropriate catch, with a warning and recovery code.

The real fix must be delivered to openflowplugin, though.

Comment by Shuva Jyoti Kar [ 19/May/16 ]

cherry picked Robert's changes to master to catch the ClassCastException

https://git.opendaylight.org/gerrit/#/c/39097/

Comment by Miroslav Macko [ 24/Aug/16 ]

Hello Shuva,

What is the status here? Are there still some issues or it can be closed?

Thanks,
Miro

Comment by Shuva Jyoti Kar [ 27/Aug/16 ]

we don't see the ClassCast exception but as mentioned by Robert, the correct fix is to implement HeaderDeserializer interface and that should be done in the ofplugin

Comment by Tomas Slusny [ 01/Jun/17 ]

Created patch that implements HeaderSerializer and HeaderDeserializer for match nicira extensions here: https://git.opendaylight.org/gerrit/#/c/58117/

Comment by Tomas Slusny [ 22/Jun/17 ]

Fix for this bug was merged, so I am closing this one for now. Please reopen if you are still facing this issue.

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