Professional OPC
Development Tools

logos

SDK version upgrade is stoping and crashing application

More
14 Sep 2019 09:33 #7726 by support
No, it is not normal for connection to have issues, when local.
In fact, it's not normal when remote either - unless there is a known reason for it.

We may need to enable more logging, or capture a Wireshark trace. Let me know when it gets to that point.

Best regards

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

More
13 Sep 2019 19:12 #7725 by Restrepo
Hello Z,

The customer got back to me:

1. He was able to increase the hold period to one minute, but he still seeing the frequent occurrence of the error -

An OPC-UA operation failure with error code -1 (0xFFFFFFFF) occurred,
originating from ''. The inner exception, of type
'OpcLabs.EasyOpc.UA.Engine.UAClientEngineException', contains details about the
problem.
OpcLabs.EasyOpc.UA.OperationModel.UAException: An OPC-UA operation
failure with error code -1 (0xFFFFFFFF) occurred, originating from ''. The inner
exception, of type 'OpcLabs.EasyOpc.UA.Engine.UAClientEngineException', contains
details about the problem. --->
OpcLabs.EasyOpc.UA.Engine.UAClientEngineException: Cannot lock the OPC-UA client
session because it is not available.
+ The client method called was
'ReadMultiple'.
--- End of inner exception stack trace ---
at
OpcLabs.EasyOpc.UA.EasyUAClient.CheckSuccess(OperationResult
operationResult)
at
OpcLabs.EasyOpc.UA.IEasyUAClientExtension.ReadValue(IEasyUAClient client,
UAReadArguments readArguments)
at
OpcLabs.EasyOpc.UA.IEasyUAClientExtension.ReadValue(IEasyUAClient client,
UAEndpointDescriptor endpointDescriptor, UANodeDescriptor nodeDescriptor)

2. He claims that he is already subscribing to nodes inside of the target server. I am currently inquiring about which tags is he subscribing to.

Now, is it normal for the connection to have issues knowing that the server and the client are on the same machine?

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

More
25 Jul 2019 11:16 #7562 by support
Thank you for clarification. I understand it better now.

The "Cannot lock the OPC-UA client session because it is not available." can be legitimate in case there are issues connecting to the server. In can also appear under heavy load during connection process (this is something we may want to improve upon in the future).

The reason I have asked about the nature of the app is as follows: Because QuickOPC maitains connections automatically, certain usage patterns can lead to frequent connections and disconnections - which may not be desirable , and increases the risk of issues like this. So I was trying to determine whether this is the case. So far I am not sure, but it might be. If there are frequent connections and disconnections, the ways to prevent them (and thus hopefully get rid of the error) are:

1. Increase the "hold period" - this is how long QuickOPC keeps the connection when it's no longer in use. See www.opclabs.com/files/onlinedocs/QuickOpc/Latest/User%27s%20...sionParameters~HoldPeriod.html . The default is several seconds, so if the reads are not that frequent, the component will disconnect. You can make it quite long, minutes etc.

2. Alternatively, subscribe to *anything* inside the target server - and keep the subscription for as long the connection is needed. In Web app or Web service, this of course means that the subscribe/unsubscribe calls cvannot be put into the page/request processing: That would only make matters worse and would not keep the connection open. In such apps in needs to be done on a global scope.


Best regards

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

More
25 Jul 2019 11:06 #7561 by support
From: R.
Sent: Wednesday, July 24, 2019 2:39 PM
To: Z.
[...]I wanted to clarify with you that the behavior that the customer is seeing has nothing to do with what is the crash that he is experiencing. I should have done a better job at filtering useless information for the purpose of troubleshooting his issue. The customer is confused and he thinks that the $"{device}._System._NoError" can be read before a read to see if there any issue with the communication. We have explain to him that in order to get the _NoError value to change a read has to be perform first. if that call fails then the _NoError value will change as well. Again, I believe this has nothing to do with Data Client but rather the implementation of the service. Please let me know if you have any questions. Thanks in advance.

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

More
24 Jul 2019 08:33 #7560 by support
Hello.

I am sorry but I do not quite understand this: "I make a call to $"{device}._System._NoError" to see if there is an error and I noticed that unless I subscribe to a tag, that value never changes"."

Can you explain in different words how you understand it?

Thank you

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

More
23 Jul 2019 16:10 #7556 by Restrepo
Hello,

Sorry for the late response. So the CPU runs about 25-40%. The services run 1-2% each, and there is a SQL Server that uses the rest. the application that the customer is having issues with is a service that accepts calls by way of remoting from clients. There are roughly 10 clients making roughly 50 calls a second to the service. There is caching going on in the service, so I can't really say how many calls are getting made to Top Server.

the customer also said : "I do subscribe to a single tag, but I don't use the data. I make a call to $"{device}._System._NoError" to see if there is an error and I noticed that unless I subscribe to a tag, that value never changes".

Please let me know if you would like to see the bulk of the service if you want to see what the customer is doing. Thanks in advance.

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

More
09 Jul 2019 07:41 #7506 by support
Hello.

The first error is probably due to either the "boxing", or inside the code from OPC Foundation which I would have very limited possibilities to fix. If disabling the boxing helps, I suggest to stay with it.

If the second error keeps appearing after the first one has been taken care of, I think that the second error is unrelated to the first one. Before I come up with next xteps, can you please answer:

1. Is this under some kind of heavy load - such as high CPU consumption, be it from the app itself or other processes on the system?
2. What is the nature of the app - which QuickOPC operations it calls, and how frequently? For example, the error you listed comes from "ReadValue". a) how often calls the app ReadValue, or other operations, to one server?, b) is the app also using subscriptions, c) etc. - anything that can help me understand what calls are being made and in which sequence (not in details, but some general idea).

Thank you

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

More
08 Jul 2019 21:05 #7504 by Restrepo
Hello Z,

I am working with a customer that is experiencing the following behavior:

*******************************************************************************************************************************************
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ObjectDisposedException
at System.Runtime.InteropServices.SafeHandle.DangerousAddRef(Boolean ByRef)
at System.StubHelpers.StubHelpers.SafeHandleAddRef(System.Runtime.InteropServices.SafeHandle, Boolean ByRef)
at Microsoft.Win32.Win32Native.SetEvent(Microsoft.Win32.SafeHandles.SafeWaitHandle)
at System.Threading.EventWaitHandle.Set()
at Opc.Ua.Bindings.TcpAsyncOperation`1System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.InternalComplete(Boolean, System.Object)
at Opc.Ua.Bindings.TcpAsyncOperation`1System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.OnTimeout(System.Object)
at System.Threading.TimerQueueTimer.CallCallbackInContext(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.TimerQueueTimer.CallCallback()
at System.Threading.TimerQueueTimer.Fire()
at System.Threading.TimerQueue.FireNextTimers()
at System.Threading.TimerQueue.AppDomainTimerCallback(Int32)

*******************************************************************************************************************************************

and also :


*******************************************************************************************************************************************
OpcLabs.EasyOpc.UA.OperationModel.UAException: An OPC-UA operation failure with error code -1 (0xFFFFFFFF) occurred, originating from ''. The inner exception, of type 'OpcLabs.EasyOpc.UA.Engine.UAClientEngineException', contains details about the problem. ---> OpcLabs.EasyOpc.UA.Engine.UAClientEngineException: Cannot lock the OPC-UA client session because it is not available.
+ The client method called was 'ReadMultiple'.
--- End of inner exception stack trace ---
at OpcLabs.EasyOpc.UA.EasyUAClient.CheckSuccess(OperationResult operationResult)
at OpcLabs.EasyOpc.UA.IEasyUAClientExtension.ReadValue(IEasyUAClient client, UAReadArguments readArguments)
at OpcLabs.EasyOpc.UA.IEasyUAClientExtension.ReadValue(IEasyUAClient client, UAEndpointDescriptor endpointDescriptor, UANodeDescriptor nodeDescriptor)
at Mesabi.MixVision.Opc.Service.OpcServiceLibrary.IsOpcOnline(EasyUAClient opc, String device) in C:\Working\Mesabi\OpcService\Mesabi.MixVision.Opc.Service\OpcServiceLibrary.cs:line 120
at Mesabi.MixVision.Opc.Service.OpcServiceLibrary.GetOpcForCall(String tag) in C:\Working\Mesabi\OpcService\Mesabi.MixVision.Opc.Service\OpcServiceLibrary.cs:line 147
at Mesabi.MixVision.Opc.Service.OpcServiceLibrary.ReadOpcTags(String server, String[] tags, String sender) in C:\Working\Mesabi\OpcService\Mesabi.MixVision.Opc.Service\OpcServiceLibrary.cs:line 0

*******************************************************************************************************************************************

The customer upgraded the quick OPC dlls from 5.50 to 5.54 as well as updating the server to TOP Server 6.6 from V5.21. Since he updated the Dlls he started to get the first exception (The process was terminated due to an unhandled exception) which if I recall correctly, this could possibly be an issue with the "Boxing". We suggested to him to disable the boxing using these instructions - kb.opclabs.com/How_to_disable_prerequisites_boxing - even though we were under the impression that his issue was fixed on version 5.54. but we wanted to see if this had any effect. Ever since he disabled the boxing, he has not seen the exception thrown again; however, the second exception is occurring 2 to 3 times in an hour pretty consistently.

This is only occurring on the production environment which has been updated to the same quick opc version. He has also updated the .NET Runtime to 4.6.2. He is running his service on Server 2016. Have you seen this behavior before? Do you jave any suggestions on what might be the issue? Thanks in advance.

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

Moderators: support
Time to create page: 0.212 seconds

      

 Recommend this on Google