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: 77
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: 321
Member Since:
February 11, 2020
sp_UserOnlineSmall Online

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: 77
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: 518

Currently Online: Matti Siponen
13 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

ibrahim: 75

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 680

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6259

Newest Members:

elviralangwell4, Donnavek, Eddiefauth, DonaldPooma, fidelduke938316, Jan-Pfizer, DavidROunc, fen.pang@woodside.com, aytule

Moderators: Jouni Aro: 1009, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 983, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 321, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1