Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Publish (onDataChange) comes twice after short network failure
May 5, 2022
11:25, EEST
Avatar
rocket science
Member
Members
Forum Posts: 88
Member Since:
March 16, 2017
sp_UserOfflineSmall Offline

Hi,

I had an issue after a short network failure which seems to result in the onDataChanges coming twice for a subscription. (SDK Version is 4.3.0)

So what I could see in the logs is that it seems the connection to the Opc Server (KepServer EX) was lost

2022-05-03 09:47:17,464|SecureChannelTcp|INFO |-51827812 Closed
2022-05-03 09:47:17,464|TcpConnection |INFO |EQPC01/10.24.226.69:49320 Closed
2022-05-03 09:47:17,464|TcpConnection |INFO |EQPC01/10.24.226.69:49320 Closed (expected)
2022-05-03 09:47:17,464|TcpConnection |INFO |EQPC01/10.24.226.69:49320 Connecting
2022-05-03 09:47:17,464|TcpConnection |INFO |Connected (non-reverse), handshake completed, local=/10.24.226.92:51630, remote=EQPC01/10.24.226.69:49320

~ 5 seconds later the connection was back again. According to the logs, it seems that the session was reactivated.

2022-05-03 09:47:22,729|UaClient |INFO |reconnect: Reconnected to server (session reactivated)

After the reconnect I’m always getting the onDataChanges twice per change for the monitored item which is in the subscription

2022-05-03 09:50:43,433|MySubscription |INFO |onDataChange(new value is [DataValue(value=5985, statusCode=GOOD (0x00000000) "", sourceTimestamp=05/03/22 13:50:43.3237153 GMT, sourcePicoseconds=0, serverTimestamp=05/03/22 13:50:43.3237153 GMT, serverPicoseconds=0)], old value was [DataValue(value=5984, statusCode=GOOD (0x00000000) "", sourceTimestamp=05/03/22 13:46:55.2981594 GMT, sourcePicoseconds=0, serverTimestamp=05/03/22 13:46:55.2981594 GMT, serverPicoseconds=0)]
2022-05-03 09:50:43,433|MySubscription |INFO |onDataChange(new value is [DataValue(value=5985, statusCode=GOOD (0x00000000) "", sourceTimestamp=05/03/22 13:50:43.3237153 GMT, sourcePicoseconds=0, serverTimestamp=05/03/22 13:50:43.3237153 GMT, serverPicoseconds=0)], old value was [DataValue(value=5984, statusCode=GOOD (0x00000000) "", sourceTimestamp=05/03/22 13:46:55.2981594 GMT, sourcePicoseconds=0, serverTimestamp=05/03/22 13:46:55.2981594 GMT, serverPicoseconds=0)]

I get this onDataChanges twice as long as the client application was running. After restarting the client application anb subscribing to the data item ‘from scratch’ everthing was back to normal so I got the onDataChange only once per change.

I wonder if this might be a problem in the client SDK when a session is reactivated, or it might be a problem of the KepServer EX ?

Any thoughts on this?

May 5, 2022
14:19, EEST
Avatar
Matti Siponen
Moderator
Members

Moderators
Forum Posts: 346
Member Since:
February 11, 2020
sp_UserOfflineSmall Offline

Hello,

Would you be able replicate this error and use Wireshark to capture communication between the Client and KepServer EX starting from when MonitoredItems are created for the first time to the Client receiving duplicate DataChangeNotifications after reconnecting? You can send the capture log to uajava-support@prosysopc.com for analysis.

Alternatively, you can set your Client’s logging level to debug to see whenever MonitoredItems are added to a Subscription. The log entries should look like “addItem: [item]”, where [item] is an instance of MonitoredItemBase class. If the Client is creating duplicates of MonitoredItems after reconnecting, there could be an error in the SDK.

May 5, 2022
16:25, EEST
Avatar
rocket science
Member
Members
Forum Posts: 88
Member Since:
March 16, 2017
sp_UserOfflineSmall Offline

Hi,

unfortunatly I’ve not been able yet to reproduce it, but if I’ve found a way I will provide a Wireshark capture.

Thank you!

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 1919

Currently Online:
16 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Heikki Tahvanainen: 402

hbrackel: 144

rocket science: 88

pramanj: 86

Francesco Zambon: 83

Ibrahim: 78

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

Member Stats:

Guest Posters: 0

Members: 737

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1524

Posts: 6451

Newest Members:

jonathonmcintyre, fannielima, kristiewinkle8, rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0

Administrators: admin: 1