Professional OPC
Development Tools

logos

Failed to detect server disconnect/subscription update

More
03 Apr 2019 08:44 #7292 by veda
Sent you an email with all the necessary logs.

Please Log in or Create an account to join the conversation.

More
02 Apr 2019 20:02 #7291 by support
I agree that there is a similarity to the issue you have referenced.

Can you obtain the logs (including Wireshark), as you have done for that other issue? (I suppose that your app can log every notification from QuickOPC, so that I can tell when they have come - and more importantly, when they haven't).

Thank you

Please Log in or Create an account to join the conversation.

More
02 Apr 2019 11:57 #7289 by veda
The new build did not solve this issue.

A "workaround" for this problem is to add a subscription on the OPC server that is continously updated. When we add a counter or similar we do not see the problem.

If we do not subscribe to values that updates at regular intervals we see the problem after only some minutes. To us the behaviour is very similar to www.opclabs.com/forum/ua-connections/2588-badsessionclosed-c...ect-of-server-when-subscribing , except that we do not get disconnect events. This is not good.

Please Log in or Create an account to join the conversation.

More
28 Mar 2019 12:34 #7283 by veda
At startup our client reads all requested subscription variables into a List of EasyUAMonitoredItemArguments (done separately for each OPC Server). When all items are added we call EasyUAClient.SubscribeMultipleMonitoredItems with the list as argument. When we later on add a new subscription (rarely), this is done by adding the new variable to the same List and again call EasyUAClient.SubscribeMultipleMonitoredItems with the whole list as argument. This is what I mean by adding a new subscription to the server.

Will also try to see if the other related post has done some good for this problem as well.

Please Log in or Create an account to join the conversation.

More
25 Mar 2019 10:32 - 25 Mar 2019 10:32 #7272 by support
Thank you. I suggest that this issue it put to hold until www.opclabs.com/forum/ua-connections/2616-unable-to-reconnect-to-opc-server#7200 is resolved, as there is a (small) possibility that they are related.

In the meantime, can you please clarify something. It has to do with the usage of the term "subscription" in your original post. Unfortunately, the term "subscription" is overloaded, so it can mean multiple things, and it is important for the analysis to understand what is it that you had in mind.

Let me explain:
The underlying software uses following model for OPC UA communication:
- An engine: maintains client Sessions to OPC UA servers.
- A (client) session: Basically, a communication channel to a single server endpoint. Allows to call UA services such as Read, Write, Browse, etc. Maintains subscriptions.
- A (client) subscription: Lives on a session. Maintains Monitored Items, and receives/manages the data updates. All monitored items under one subscription share some common characteristics (the update rate, mainly).
- A monitored item. Part of a subscription - the individual piece of data being subscribed to.

So, we have one meaning of "subscription" - above. But this model is more or less hidden from you, and when you use the EasyUAClient, you make calls such as SubscribeDataChange, which already encompasses all of the above (creates these objects as needed) - and, here we have the second meaning of the term "subscription".

When you wrote "If we add a new subscription to the same server, it seams like we do not get any callbacks on the new subscription either ", did the newly added item have the same subscription parameters (update rate, mainly) as any existing ones on that server, or did it use the same parameters? This gets to the distinction between the first and second meaning of the term. This is relevant, because with different parameters, EasyUAClient will create a new client subscription, but with the same parameters, it will just add a monitored item to the same subscription. The resulting communication and general behavior is then different. For example, it would be unlikely that if the "old" and "new" item were on the same client subscription, that one of them would work and the other not - if so, I would prefer to see the Wireshark logs and see if it might be the server to blame. And there are other differences, too.

Regards
Last edit: 25 Mar 2019 10:32 by support.

Please Log in or Create an account to join the conversation.

More
21 Mar 2019 12:58 #7254 by veda
Have activated LogEntry on the client. There are no errors reported from the EasyUAClient.

Have also logged each time a callback is triggered for a given value of the server with issues. After a while the server stops reporting callbacks on all values on that server. We have never received callback on ServerConditionChanged, so the client still thinks the server has "Connected" state.

A new instance of the client in parallel works as expected.

Please Log in or Create an account to join the conversation.

More
21 Mar 2019 10:05 #7252 by veda
Will add logging for LogEntry and verify and report back. We have not enabled LogEntry for production build (where we saw the issue).

Please Log in or Create an account to join the conversation.

More
21 Mar 2019 10:02 #7251 by support
Hello.

Before I go further on this, I want to check one thing. When you observe these issue, are you sure there there is no "INTERNAL ERROR" reported through the LogEntry, whatsoever, during the run of the process? Because, if it were, it has to be resolved first, as it might be causing any kind of issue later on.

Regards

Please Log in or Create an account to join the conversation.

More
21 Mar 2019 09:11 #7249 by veda
First observation:
We see an issue with some subscribed variables/values not being updated after the client has been running for some hours/days. If I start a second instance of the same client code on a different machine this client will receive update of subscription updates. So I end up with two identical clients running on two servers connected to the same OPC Server. The client that has been running for a long time will stop reporting updates (only some values, not all), while the newely started client will work as expected.

Additional note: The OPC server we see the problem realted to has very seldom updates of values.

Second observation:
If we add a new subscription to the same server, it seams like we do not get any callbacks on the new subscription either (can not verify directly, but status is "bad" and hence not updated by the DataChangeNotification callback). We have not received any callbacks on ServerConditionChanged about disconnect, even though the client behaves like it is not connected. If we start a new (additional) instance of the client, this new instance works as expected and will receive callbacks as designed.

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.222 seconds

      

 Recommend this on Google