Opc-ua failure - decoder

I’m on 8.0.16

Today I got periodic failure over OPC-UA… “Error decoding symmetric message”

org.eclipse.milo.opcua.stack.core.channel.MessageDecodeException: UaException: status=Bad_SequenceNumberInvalid, message=expected sequence number 125017 but received 125018

at org.eclipse.milo.opcua.stack.core.channel.ChunkDecoder.decode(ChunkDecoder.java:99)

at org.eclipse.milo.opcua.stack.core.channel.ChunkDecoder.decodeSymmetric(ChunkDecoder.java:79)

at org.eclipse.milo.opcua.stack.client.transport.uasc.UascClientMessageHandler.lambda$onSecureMessage$11(UascClientMessageHandler.java:635)

at org.eclipse.milo.opcua.stack.core.channel.SerializationQueue.lambda$decode$1(SerializationQueue.java:61)

at org.eclipse.milo.opcua.stack.core.util.ExecutionQueue$Task.run(ExecutionQueue.java:119)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.base/java.lang.Thread.run(Unknown Source)

Caused by: org.eclipse.milo.opcua.stack.core.UaException: expected sequence number 125017 but received 125018

at org.eclipse.milo.opcua.stack.core.channel.ChunkDecoder$AbstractDecoder.decode(ChunkDecoder.java:207)

at org.eclipse.milo.opcua.stack.core.channel.ChunkDecoder.decode(ChunkDecoder.java:91)

… 7 common frames omitted

What server are you connected to? Siemens by chance?

CODESYS softPLC (COntrol Win V3 x64)

Well taken at face value this error message means we received a message with an unexpected sequence number, either out of order or missing completely.

Without proof otherwise this is an issue with the server. If you can capture this happening on Wireshark we can figure that out for sure.

Ignition and CODESY run on same PC

That doesn’t really matter. The error can still occur and you can still get a Wireshark capture.

Error decoding symmetric message.zip (753.6 KB)

Attached a wireshark analyse

What are the IPs and ports involved? I don’t see any OPC UA traffic in the capture.

Found somethings ?

No, your capture doesn’t have any OPC UA traffic.

If the connection is being made via localhost make sure you select the loopback adapter in Wireshark.

You might also consider calling support and getting their help with this.

Will be better with that one…
OPC-UA Error.zip (255.5 KB)

Perfect, this capture has OPC UA traffic and it clearly shows that this is a bug in the server.

Packets 430 and 431 arrive out of order - 430 has a sequence number of 99070 and 431 has a sequence number of 99069.

If you aren’t using the latest CODESYS version I’d upgrade and if this is still a problem you’ll have to open a ticket with their support and report it.

Thanks, I will check with support