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
Events triggered during network fault are not received afterwards
April 9, 2015
13:29, EEST
Avatar
BenC
Member
Members
Forum Posts: 6
Member Since:
April 1, 2015
sp_UserOfflineSmall Offline

I’m trying to get a sample application running with the Prosys OPA UA Java SDK (2.1.0) that demonstrates a server’s ability to automatically re-transmit / re-publish events that were not successfully received by the client due to short network faults. These network faults are long enough for the client to detect a subscription timeout (SubscriptionAliveListener#onTimeout is called on the client), but short enough for the server to keep the subscription and session open, enabling the session and subscription to be re-assigned to the client when it automatically reconnects.

My server sets up some variable and alarm nodes. My client creates a subscription which monitors these nodes.

What works: the client receives events via MonitoredEventItemListener#onEvent / SubscriptionNotificationListener#onEvent when the network is stable. When I simulate a temporary network fault by dropping all TCP packets on the port my application is using, the client’s TCP channel to the server dies, but afterwards successfully reconnects and gets assigned to the same subscription (same ID) that it originally had. Events triggered after the simulated network fault are also received by the client.

What doesn’t work: events triggered by the server during the network fault do not get received by the client after the network is stable again. My client’s SubscriptionNotificationListener#onMissingData method is called, indicating that it knows that data is missing, but was unable to get it for some reason. I read that missing event data should be automatically requested by the client with the RepublishRequest. I added a RequestResponseListener on my server to check which requests are being made and I do not see any RepublishRequests being processed. I also turned up some log levels to try to find out what’s happening in the background but didn’t see any indication that something’s being re-transmitted – but maybe I just didn’t enable enough logging.

I’ve used the default client and server settings, but also tried it with client KeepSubscriptions=true, subscription RetransmissionEnabled=true, PublishingEnabled=true, etc. without any luck. Does anyone have an idea why this doesn’t work for me? Does the Prosys OPC UA Java SDK really support this republish-feature out-of-the-box or would I need to implement a solution somewhere?

April 9, 2015
13:46, EEST
Avatar
BenC
Member
Members
Forum Posts: 6
Member Since:
April 1, 2015
sp_UserOfflineSmall Offline

Note: I’m noticing that the server frequently logs an INFO message that sounds somewhat bad:

Acknowledge on Subscription 1: 2 – Bad_SequenceNumberUnknown

I’m seeing this not just in my own sample application but also in the official Prosys sample application. I don’t think I ever saw this in version 1.5.0, but that version had a different problem with subscriptions: that version always created a new subscription on client auto-reconnects, rather than re-assigning an existing one.

April 10, 2015
14:39, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1010
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

I tried to reproduce this issue, but could not: events are arriving late after the communication is re-established, if the subscription just stays alive in the server. I tested with the SampleConsoleServer and SampleConsoleClient; listening to Server object for events. I can see this kind of INFO level message in th blog:

Requesting missing NotificationMessage (SequenceNumber=24) from the server using Republish: Target SequenceNumber=24

onMissingData is an indication that the client indeed missed some notification packages and could not republish them from the server. RetransmissionEnabled should be true by default.

I did find out, though, the reason for the Bad_SequenceNumberUnknown warnings: seems that the client is acknowledging alive messages as well, which results to same sequence numbers being acknowledged several times. This should not affect the notifications, though.

If you wish to try the fixed version, you can send email to uajava-support at prosysopc.com to get a beta version.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
16 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

Ibrahim: 76

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 682

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6261

Newest Members:

digitechroshni, LouieWreve, Kickbiche, karrimacvitie5, graciela2073, sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPooma

Moderators: Jouni Aro: 1010, 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