# Opc-ua failure - decoder

**URL:** <https://forum.inductiveautomation.com/t/opc-ua-failure-decoder/40371>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [November 5, 2020, 8:41pm UTC](https://forum.inductiveautomation.com/t/opc-ua-failure-decoder/40371 "2020-11-05T20:41:26Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![luc.martin](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@luc.martin](https://forum.inductiveautomation.com/u/luc.martin)\
**Post date:** [November 5, 2020, 8:41pm UTC](https://forum.inductiveautomation.com/t/opc-ua-failure-decoder/40371/1 "2020-11-05T20:41:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [November 5, 2020, 8:46pm UTC](https://forum.inductiveautomation.com/t/opc-ua-failure-decoder/40371/2 "2020-11-05T20:46:27Z")

</div>

What server are you connected to? Siemens by chance?

---

<div class="post-metadata">

**Author:** ![luc.martin](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@luc.martin](https://forum.inductiveautomation.com/u/luc.martin)\
**Post date:** [November 5, 2020, 8:47pm UTC](https://forum.inductiveautomation.com/t/opc-ua-failure-decoder/40371/3 "2020-11-05T20:47:56Z")

</div>

CODESYS softPLC (COntrol Win V3 x64)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [November 5, 2020, 8:51pm UTC](https://forum.inductiveautomation.com/t/opc-ua-failure-decoder/40371/4 "2020-11-05T20:51:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![luc.martin](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@luc.martin](https://forum.inductiveautomation.com/u/luc.martin)\
**Post date:** [November 5, 2020, 9:24pm UTC](https://forum.inductiveautomation.com/t/opc-ua-failure-decoder/40371/5 "2020-11-05T21:24:07Z")

</div>

Ignition and CODESY run on same PC

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [November 5, 2020, 9:27pm UTC](https://forum.inductiveautomation.com/t/opc-ua-failure-decoder/40371/6 "2020-11-05T21:27:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![luc.martin](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@luc.martin](https://forum.inductiveautomation.com/u/luc.martin)\
**Post date:** [November 5, 2020, 9:40pm UTC](https://forum.inductiveautomation.com/t/opc-ua-failure-decoder/40371/7 "2020-11-05T21:40:57Z")

</div>

[Error decoding symmetric message.zip](https://forum.inductiveautomation.com/uploads/short-url/d7auwQBbiiwxr6o29Y76oHSGX6I.zip) (753.6 KB)

Attached a wireshark analyse

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [November 5, 2020, 9:49pm UTC](https://forum.inductiveautomation.com/t/opc-ua-failure-decoder/40371/8 "2020-11-05T21:49:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![luc.martin](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@luc.martin](https://forum.inductiveautomation.com/u/luc.martin)\
**Post date:** [November 5, 2020, 9:49pm UTC](https://forum.inductiveautomation.com/t/opc-ua-failure-decoder/40371/9 "2020-11-05T21:49:26Z")

</div>

192.168.2.113

---

<div class="post-metadata">

**Author:** ![luc.martin](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@luc.martin](https://forum.inductiveautomation.com/u/luc.martin)\
**Post date:** [November 9, 2020, 3:50pm UTC](https://forum.inductiveautomation.com/t/opc-ua-failure-decoder/40371/10 "2020-11-09T15:50:44Z")

</div>

Found somethings ?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [November 9, 2020, 4:04pm UTC](https://forum.inductiveautomation.com/t/opc-ua-failure-decoder/40371/11 "2020-11-09T16:04:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![luc.martin](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@luc.martin](https://forum.inductiveautomation.com/u/luc.martin)\
**Post date:** [November 9, 2020, 4:59pm UTC](https://forum.inductiveautomation.com/t/opc-ua-failure-decoder/40371/12 "2020-11-09T16:59:49Z")

</div>

Will be better with that one…  
[OPC-UA Error.zip](https://forum.inductiveautomation.com/uploads/short-url/9w6uRmPe8uVWuM2vr5BBcDpgz6b.zip) (255.5 KB)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [November 9, 2020, 5:02pm UTC](https://forum.inductiveautomation.com/t/opc-ua-failure-decoder/40371/13 "2020-11-09T17:02:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![luc.martin](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@luc.martin](https://forum.inductiveautomation.com/u/luc.martin)\
**Post date:** [November 9, 2020, 5:31pm UTC](https://forum.inductiveautomation.com/t/opc-ua-failure-decoder/40371/14 "2020-11-09T17:31:57Z")

</div>

Thanks, I will check with support
