Great !
If I set this limit will I still receive all references, ie. this affects only how things travel in the wire ?
I have been experimenting a bit with EncodingOptions, but still haven’t find settings large enough
for things to work.
Ari S.
From: milo-dev <milo-dev-bounces@xxxxxxxxxxx>
On Behalf Of Kevin Herron
Sent: tiistai 15. helmikuuta 2022 21.09
To: milo developer discussions <milo-dev@xxxxxxxxxxx>
Subject: Re: [milo-dev] Max chunk count exceeded
I think we can assume this is the issue.
In the code you're calling in Milo, we're not specifying any max for the number of References returned, and it appears the server is not taking the max message size into account when assembling its response.
For now, I think setting larger EncodingLimits is your best workaround. I will add a "maxReferences" parameter to the BrowseOptions structure that AddressSpace::browseNodes and the other overloads accept and probably set it to some fixed
value to avoid interop problems with servers like this.
When browsing to folder causing the problems there are roughly 64000 tags under it.
Is there any debug logging related to browsing that I could turn on in Milo ?
Ari S.
When you browse the problematic Node in UaExpert how many References are returned?
Hi,
I don’t really remember how I ended up with that code (it has been working just fine for other cases).
Any other way that would give me nodeId, display name and nodeClass would be just fine. Looking
at examples, there seem to be two different ones, BrowseExample and BrowseNodeExample. The
later one looks much like my code.
Unfortunately it is difficult to debug against the problematic server as it’s a production system
at customer and I don’t have direct network access to it from development environment
☹
Ari S.
Okay, that's a good hint.
Do you need to be using the browse call that returns UaNode instances?
Can you step through in the debugger to see where it fails? This call can do quite a bit - it calls Browse, possibly BrowseNext, then reads a bunch of attributes so it can create
all the UaNode instances that it returns.
It's possible the Browse is failing because the server is trying to return more References than fits. It's also possible one of the subsequent Read calls for attributes is failing,
but I think that's less likely since they are only grouped per-Node.
Unfortunately no exposed setting for that right now.
Hi,
I can do that, but it seems that the problem occurs only when I call
client.getAddressSpace().browseNodes(parentNodeId);
At that point the client doesn’t have anything else going on, this is done just after
connection has been opened. So there is no subscription yet.
The server is a very large one, I think that there are thousands of tags.
(Browsing with UaExpert works, but is slow due to amount of tags).
Ari S.
Can you turn the logger for org.eclipse.milo.opcua.sdk.client.subscriptions.OpcUaSubscriptionManager to DEBUG level and then tell me if you get any messages about "Publish service
failure"? Or do you have any other timeout messages that occur during or soon after this decoding error?
You can probably work around by increasing encoding limits but I'd like to narrow it down a little bit. If it's the occasional PublishResponse that is too large then decreasing
the"maxNotificationsPerPublish" parameter when creating a subscription may help.
Hi,
Any workarounds what I could try on my own code if I cannot get capture ?
OpcUaClientConfigBuilder.setEncodingLimits() ?
Ari S.
Maybe if the server allows MessageSecurityMode.sign, but not it it’s only SignAndEncrypt.
Hi,
The server requires encryption on. Would wireshark capture still be interesting ?
Ari S.
It looks like the server is responding with a message that is larger than the agreed upon max message size / max chunk count.
While I think this is ultimately a server issue, if you can get a Wireshark capture then perhaps we can see what kind of Response this is and what Request from the client is provoking
this issue.
Hi,
I’m working with connection to ABB’s RTDB OPC UA server (version 5.0). Otherwise things seem to be working just fine, except
when trying to browse for tags things break like this:
2022-02-03 12:12:25.933 [milo-netty-event-loop-5] ERROR [remote=IMPI3/10.16.16.41:4841]
Exception caught: UaException: status=Bad_TcpMessageTooLarge, message=max chunk count exceeded (64)io.netty.handler.codec.DecoderException: UaException: status=Bad_TcpMessageTooLarge, message=max chunk count exceeded (64) at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:471)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276) at io.netty.handler.codec.ByteToMessageCodec.channelRead(ByteToMessageCodec.java:103) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at java.base/java.lang.Thread.run(Thread.java:829)Caused by: org.eclipse.milo.opcua.stack.core.UaException: max chunk count exceeded (64) at org.eclipse.milo.opcua.stack.client.transport.uasc.UascClientMessageHandler.accumulateChunk(UascClientMessageHandler.java:426)
at org.eclipse.milo.opcua.stack.client.transport.uasc.UascClientMessageHandler.onSecureMessage(UascClientMessageHandler.java:608) at org.eclipse.milo.opcua.stack.client.transport.uasc.UascClientMessageHandler.decodeMessage(UascClientMessageHandler.java:399)
at org.eclipse.milo.opcua.stack.client.transport.uasc.UascClientMessageHandler.decode(UascClientMessageHandler.java:383) at io.netty.handler.codec.ByteToMessageCodec$1.decode(ByteToMessageCodec.java:42) at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:501)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:440) ... 17 common frames omitted
I wonder what I should do to fix this ? Or is this some kind of problem at server side ?
Ari S.
_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/milo-dev
_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/milo-dev
_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/milo-dev
_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/milo-dev
_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/milo-dev
_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/milo-dev
|