Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetOPCNodeList java.lang.IllegalArgumentException: Value underflow #68

Open
vladislav-klass opened this issue Dec 19, 2024 · 1 comment

Comments

@vladislav-klass
Copy link

vladislav-klass commented Dec 19, 2024

when fetching node list with GetOPCNodeList from my opcua server, I get this error message if I set Recursive Depth > 6. If Recursive Depth <= 6 everything works fine.

org.opcfoundation.ua.common.ServiceResultException: Bad_InternalError (code=0x80020000, description="2147614720, Value underflow") at org.opcfoundation.ua.transport.tcp.io.TcpConnection$ReadThread.run(TcpConnection.java:1006) Caused by: java.lang.IllegalArgumentException: Value underflow at org.opcfoundation.ua.builtintypes.UnsignedInteger.<init>(UnsignedInteger.java:126) at org.opcfoundation.ua.encoding.binary.BinaryDecoder.getExpandedNodeId(BinaryDecoder.java:709) at org.opcfoundation.ua.core.EncodeableSerializer$83.getEncodeable(EncodeableSerializer.java:2501) at org.opcfoundation.ua.encoding.utils.AbstractSerializer.getEncodeable(AbstractSerializer.java:136) at org.opcfoundation.ua.encoding.utils.SerializerComposition.getEncodeable(SerializerComposition.java:105) at org.opcfoundation.ua.encoding.binary.BinaryDecoder.getEncodeableArray(BinaryDecoder.java:622) at org.opcfoundation.ua.core.EncodeableSerializer$84.getEncodeable(EncodeableSerializer.java:2529) at org.opcfoundation.ua.encoding.utils.AbstractSerializer.getEncodeable(AbstractSerializer.java:136) at org.opcfoundation.ua.encoding.utils.SerializerComposition.getEncodeable(SerializerComposition.java:105) at org.opcfoundation.ua.encoding.binary.BinaryDecoder.getEncodeableArray(BinaryDecoder.java:622) at org.opcfoundation.ua.core.EncodeableSerializer$86.getEncodeable(EncodeableSerializer.java:2579) at org.opcfoundation.ua.encoding.utils.AbstractSerializer.getEncodeable(AbstractSerializer.java:136) at org.opcfoundation.ua.encoding.utils.SerializerComposition.getEncodeable(SerializerComposition.java:105) at org.opcfoundation.ua.encoding.binary.BinaryDecoder.getMessage(BinaryDecoder.java:1062) at org.opcfoundation.ua.transport.tcp.io.TcpConnection$ReadThread.run(TcpConnection.java:928)

I fetched the same data with the most recent release of open62541 client and it works fine. I can retrieve the full node list at any depth with that client.

I suspect that the server might be returning large arrays, complex structures, or certain NodeIds or references that the legacy UA-Java stack cannot correctly parse.

Anyone managed to run the extension with UA-Java version > 1.3.343?

Running the extension in the latest nifi 2.0 container.

@vladislav-klass
Copy link
Author

Since this issue is likely due to the unmaintained UA-Java Stack dependency, I am trying out this repo instead
now: https://github.com/linksmart/nifi-opc-ua-bundles?tab=readme-ov-file

It's based on the actively maintained Eclipse Milo OPCUA Java stack + SDK, instead of the outdated and unmaintained UA-Java Stack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant