[CONTROLLER-1040] Issue with Big size schema Created: 24/Nov/14  Updated: 25/Jul/23  Resolved: 27/Mar/15

Status: Resolved
Project: controller
Component/s: netconf
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Dhirendra Kumar Trivedi Assignee: Maros Marsalek
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 CONTROLLER-1038 Message transfer halt while transferi... Resolved
External issue ID: 2424

 Description   

My device schema is of size around 7MB. If i manually put that schema in cache/schema directory, controller is
able to compile this and establish connection with the device and able to respond to restconf queries.
But when controller fetches it from the device using get-schema, i see such exceptions

io.netty.handler.codec.DecoderException: org.xml.sax.SAXParseException; lineNumber: 18008; columnNumber: 83; The content of elements must consist of well-formed character data or markup.
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]

io.netty.handler.codec.DecoderException: org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 16; Content is not allowed in prolog.
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:280) [bundlefile:4.0.23.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:205) [bundlefile:4.0.23.Final]

Just to verify that the schema which is being fetched by device does not have any issue, I downloaded that schema through
get-schema and compiled using pyang and it compiled well.



 Comments   
Comment by Tony Tkacik [ 24/Nov/14 ]

Could you provide more information about offending message or model?

It seems some character in YANG model is treated differently / incorrectly during download,
from log you provided it is hard to determine what really happened?

Comment by Dhirendra Kumar Trivedi [ 24/Nov/14 ]

(In reply to Tony Tkacik from comment #1)
> Could you provide more information about offending message or model?
Message what i got, have already provided in description.
>
> It seems some character in YANG model is treated differently / incorrectly
> during download,

True, that is why I mentioned in description that i fetched the schema from
the device manually using get-schema and tried compiling with pyang(open source
yang compiler) and it compiled well. Also when i put the same schema in
controller's cache/schema directory, controller does not throw any error while
coming up. So it seems like controller's yang compiler is able to build
that schema and is able build schema context for the device.
That is why i suspect some buffer issue which is surfacing in case of
big schema.

> from log you provided it is hard to determine what really happened?
Let me know what all logs do i need to enable and provide you opendaylight.log

Comment by Tony Tkacik [ 24/Nov/14 ]

Possible duplicate of CONTROLLER-1038. Need confirmation from Maros Marsalek, who is Netconf maintainer.

Comment by Maros Marsalek [ 25/Nov/14 ]

Marking 2421 as duplicate(even though it was reported first, this bug contains more information). I was able to reproduce this problem and the transfer of the get-schema response stopped half way through. With logs set to debug, the SSH library (probably) stopped the transfer and requested a window resize with no response. This needs further investigation.

However I did not get the SAXParseException, can you check the response of get-schema from your device manually (using curl or wget) ? I just want to verify that the produced xml is well formed.

Comment by Marian Dubai [ 18/Dec/14 ]

Error caused by incorrect handling of ssh connection protocol message SSH_MSG_CHANNEL_WINDOW_ADJUST in mina-sshd.
Fix proposal pull out:
https://github.com/apache/mina-sshd/pull/10

Comment by Maros Marsalek [ 20/Feb/15 ]

The fix in the SSH library has been merged. We need to increase the version of the lib to the newest one after the nearest release.

Comment by Maros Marsalek [ 25/Mar/15 ]

New version of apache mina sshd (0.14) was released, needs to be bumped in ODL and tested.

Comment by Maros Marsalek [ 25/Mar/15 ]

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

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