Professional OPC
Development Tools

logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

OPC-UA client session is disconnecting, why?

More
02 Apr 2016 09:35 #3973 by support
Thank you.

Regarding the license: Most likely you have QuickOPC 5.3x on your invoice, and therefore you are licensed to use the current version (5.35) as well. The only case in which you would be license to 5.30 and not to 5.35 would be if you have purchased an earlier version (5.2x) and a maintenance contract, and the maintenance contract (which is time-limited) would then only cover the versions released during that time. If you are not sure, use the contact form (www.opclabs.com/company/contact/form/3-contact-form ) to identify yourself (with reference to this forum post), and we will look up the license information for you.

The code you have sent appears correct for most part, but there is one omission that is particularly relevant to the problem at hand. The issue is that you do not test for (and do not log) the .Exception property of the incoming event arguments. Please study the best Practices section of the documentation (Concepts), and especially this chapter: "Always test the Exception property before accessing the actual result (Value, Vtq, or AttributeData property)". The .Exception is the main channel through which you receive an indication that something went wrong, and the fact that you are not logging it means that we are missing the primary source of information about the problem. In addition, by properly testing for non-nullness of .Exception, you can get rid of the issue with accessing a null AttributeData - for which you have an unnecessary try/catch block. When .Exception is non-null, the AttributeData is always null. And vice versa: When .Exception is null (i.e. "No Error"), the AttributeData is always non-null.

My suggestion is therefore to 1) change the code as indicated, 2) rebuild with 5.35, 3) retest.

Best regards
The following user(s) said Thank You: openventure

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

More
31 Mar 2016 08:38 #3969 by openventure
Thanks for your clear answer, above is my reply.

1) i received many error messages on subscription
3/29/2016 8:39:43 AM: node=LG_ST200_1.ST200_1.PC_.Signals.LifeBit Object reference not set to an instance of an object.
3/29/2016 8:39:43 AM: at Tecnologic.Service.LineService.easyUAClient_MonitoredItemChanged(Object sender, EasyUAMonitoredItemChangedEventArgs e)
In attachment the complete log file and the code.

2) Yes, I mean it stop trying, for this reason I must restart it. It is happened sometime, in average one time by week.

Asap I have a chance, I update to 5.35, I may have some trouble with my licence? it's a developer licence + free runtime.

Best Regards.
Attachments:

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

More
30 Mar 2016 10:49 #3963 by support
OK, here are two things: 1) What and why causes the issue, and 2) what happens afterwards.

ad 1) The log itself does not give enough information. What kind of error do you receive in the event subscription handler?

If possible, please provide a code (or skeleton of it) that you use to handle the incoming data changes.

ad 2) The expected behavior of the component is to automatically restore the connection after it has failed - in this case, after 10 seconds, as indicated in the log entries. Are you saying that it does not happen?


Note that we no longer support version 5.30. For any more involved investigation, an upgrade to current version (5.35) would be required. Besides a chance that it could resolve the problem, it would probably provide better diagnostics output.

Best regards
The following user(s) said Thank You: openventure

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

More
29 Mar 2016 13:43 #3962 by openventure
I have a windows service that implements an OPC UE client with library version 5.30.

It run for days 24h by day with many opc ue tag subscriptions.

Sometimes I receive a disconnection for an unknown reason and I must restart the service to restore the application

I'm using kepserverex 5.14 as opc ue server.

these are the errors log I had from EasyUAClient.LogEntry.

3/29/2016 8:39:50 AM: OPC Event 0: OPCLabs-UAEngine message:The OPC-UA client session is disconnecting from endpoint URL "opc.tcp://10.74.137.71:49320".
3/29/2016 8:39:50 AM: OPC Event 0: OPCLabs-UAEngine message:The OPC-UA client session has disconnected from endpoint URL "opc.tcp://10.74.137.71:49320".
3/29/2016 8:39:50 AM: OPC Event 0: OPCLabs-UAEngine message:The OPC-UA client session on endpoint URL "opc.tcp://10.74.137.71:49320" failed at tick 588491307 and will retry in 10000 milliseconds.
3/29/2016 8:39:50 AM: OPC Event 0: OPCLabs-UAEngine message:The OPC-UA client session on endpoint URL "opc.tcp://10.74.137.71:49320" failed at tick 588491338 and will retry in 10000 milliseconds.

Do this mean something for someone?
Why I received 2 failed at tick...etc and then I don't receive anything anymore?

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

Moderators: support
Time to create page: 0.071 seconds