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.

Reading Time

More
23 May 2017 11:23 #5176 by Captain_Dash
Replied by Captain_Dash on topic Reading Time
No my code is not throwing exceptions, I believe you misunderstood the output because of the callstack. We are using Ozcode for Debugging and the lines in the output are only tracepoints produced by Ozcode. so the code should be fine there.

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

More
23 May 2017 10:22 #5175 by support
Replied by support on topic Reading Time
It looks like that your code throws exceptions at

OpcUaAxisMapper.cs:line 239

Can you please check that. Exceptions should not be thrown in event handlers (which, in fact, also applies to code that handles the updates from the mapping).

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

More
23 May 2017 08:10 #5174 by Captain_Dash
Replied by Captain_Dash on topic Reading Time
Ok, How can we determine the origin of this error with WireShark? What are possible indicators?

I added the output from the visual studio output window, because some exceptions are thrown. And below that i added the log entries which were written by your client.


 @OZCODE 1 logEntryEventArgs.Message:  #VAR"OPC-UA engine SDK configuration successfully provided by \"OpcLabs.EasyOpc.UA.Toolkit.InternalSdkConfigurationProvider\"."#VAR  @OZCALLSTACK { at ProjectName.HWComponents.PlcAxes.PlcMapping.OpcUaAxisMapper.EasyUaClientOnLogEntry(Object sender, LogEntryEventArgs logEntryEventArgs) in D:\Projekte\visual studio\ProjectName\HWComponents.PlcAxes\HWComponents.PlcAxes\PlcMapping\OpcUaAxisMapper.cs:line 239
at OpcLabs.BaseLib.Widgets.NotifyingWidget.SafeCriticalCallback(String name, Action action)
at OpcLabs.EasyOpc.UA.EasyUAClient.RaiseLogEntry(LogEntryEventArgs eventArgs)
at System.Threading.Tasks.Task.Execute()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
} @STACKEND
 @OZCODE 1 logEntryEventArgs.Message:  #VAR"The OPC-UA engine has determined the client certificate parameters as listed below.\nSubjectName: Task Runner Application\nApplicationName: Task Runner Application\nApplicationUri: urn:LISL395120:JetBrains.ReSharper.TaskRunner.CLR45.x64:108.0.0.0\n"#VAR  @OZCALLSTACK { at ProjectName.HWComponents.PlcAxes.PlcMapping.OpcUaAxisMapper.EasyUaClientOnLogEntry(Object sender, LogEntryEventArgs logEntryEventArgs) in D:\Projekte\visual studio\ProjectName\HWComponents.PlcAxes\HWComponents.PlcAxes\PlcMapping\OpcUaAxisMapper.cs:line 239
at OpcLabs.BaseLib.Widgets.NotifyingWidget.SafeCriticalCallback(String name, Action action)
at OpcLabs.EasyOpc.UA.EasyUAClient.RaiseLogEntry(LogEntryEventArgs eventArgs)
at System.Threading.Tasks.Task.Execute()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
} @STACKEND
 @OZCODE 1 logEntryEventArgs.Message:  #VAR"The OPC-UA engine has determined the application configuration parameters as listed below. \r\nProductUri: urn:literal:string:Psi.Features%5CUnitTesting"#VAR  @OZCALLSTACK { at ProjectName.HWComponents.PlcAxes.PlcMapping.OpcUaAxisMapper.EasyUaClientOnLogEntry(Object sender, LogEntryEventArgs logEntryEventArgs) in D:\Projekte\visual studio\ProjectName\HWComponents.PlcAxes\HWComponents.PlcAxes\PlcMapping\OpcUaAxisMapper.cs:line 239
at OpcLabs.BaseLib.Widgets.NotifyingWidget.SafeCriticalCallback(String name, Action action)
at OpcLabs.EasyOpc.UA.EasyUAClient.RaiseLogEntry(LogEntryEventArgs eventArgs)
at System.Threading.Tasks.Task.Execute()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
} @STACKEND
'JetBrains.ReSharper.TaskRunner.CLR45.x64.exe' (CLR v4.0.30319: NUnit HWComponents.PlcAxes.Tests): Loaded 'BoxedAppSDK.Managed'. Cannot find or open the PDB file.
 @OZCODE 1 logEntryEventArgs.Message:  #VAR"The OPC-UA engine has successfully connected to the underlying subsystems."#VAR  @OZCALLSTACK { at ProjectName.HWComponents.PlcAxes.PlcMapping.OpcUaAxisMapper.EasyUaClientOnLogEntry(Object sender, LogEntryEventArgs logEntryEventArgs) in D:\Projekte\visual studio\ProjectName\HWComponents.PlcAxes\HWComponents.PlcAxes\PlcMapping\OpcUaAxisMapper.cs:line 239
at OpcLabs.BaseLib.Widgets.NotifyingWidget.SafeCriticalCallback(String name, Action action)
at OpcLabs.EasyOpc.UA.EasyUAClient.RaiseLogEntry(LogEntryEventArgs eventArgs)
at System.Threading.Tasks.Task.Execute()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
} @STACKEND
'JetBrains.ReSharper.TaskRunner.CLR45.x64.exe' (CLR v4.0.30319: NUnit HWComponents.PlcAxes.Tests): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel\v4.0_4.0.0.0__b77a5c561934e089\System.ServiceModel.dll'. Symbols loaded.
'JetBrains.ReSharper.TaskRunner.CLR45.x64.exe' (CLR v4.0.30319: NUnit HWComponents.PlcAxes.Tests): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.IdentityModel\v4.0_4.0.0.0__b77a5c561934e089\System.IdentityModel.dll'. Symbols loaded.
'JetBrains.ReSharper.TaskRunner.CLR45.x64.exe' (CLR v4.0.30319: NUnit HWComponents.PlcAxes.Tests): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_64\System.Transactions\v4.0_4.0.0.0__b77a5c561934e089\System.Transactions.dll'. Symbols loaded.
'JetBrains.ReSharper.TaskRunner.CLR45.x64.exe' (CLR v4.0.30319: NUnit HWComponents.PlcAxes.Tests): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.VisualStudio.Diagnostics.ServiceModelSink\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Diagnostics.ServiceModelSink.dll'. Symbols loaded.
'JetBrains.ReSharper.TaskRunner.CLR45.x64.exe' (CLR v4.0.30319: NUnit HWComponents.PlcAxes.Tests): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Net.Http\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Net.Http.dll'. Symbols loaded.
Exception thrown: 'System.Net.WebException' in System.dll
Exception thrown: 'System.Net.WebException' in System.dll
Exception thrown: 'System.ServiceModel.EndpointNotFoundException' in System.ServiceModel.dll
Exception thrown: 'System.ServiceModel.EndpointNotFoundException' in System.ServiceModel.Internals.dll
Exception thrown: 'System.ServiceModel.EndpointNotFoundException' in System.ServiceModel.Internals.dll
Exception thrown: 'System.ServiceModel.EndpointNotFoundException' in mscorlib.dll
Exception thrown: 'Opc.Ua.ServiceResultException' in Opc.Ua.Core
Exception thrown: 'Opc.Ua.ServiceResultException' in Opc.Ua.Core
Exception thrown: 'System.Net.Sockets.SocketException' in System.dll
Exception thrown: 'System.Net.WebException' in System.dll
Exception thrown: 'System.Net.Sockets.SocketException' in System.dll
Exception thrown: 'System.Net.WebException' in System.dll
Exception thrown: 'System.Net.InternalException' in System.dll
Exception thrown: 'Opc.Ua.ServiceResultException' in Opc.Ua.Core
Exception thrown: 'System.Net.InternalException' in System.dll
Exception thrown: 'System.ServiceModel.EndpointNotFoundException' in System.ServiceModel.dll
Exception thrown: 'System.ServiceModel.EndpointNotFoundException' in System.ServiceModel.Internals.dll
Exception thrown: 'System.ServiceModel.EndpointNotFoundException' in System.ServiceModel.Internals.dll
Exception thrown: 'System.ServiceModel.EndpointNotFoundException' in System.ServiceModel.Internals.dll
Exception thrown: 'System.ServiceModel.EndpointNotFoundException' in System.ServiceModel.Internals.dll
Exception thrown: 'System.ServiceModel.EndpointNotFoundException' in mscorlib.dll
 @OZCODE 1 logEntryEventArgs.Message:  #VAR"The OPC-UA client session with connect sequence number 1 is connecting to endpoint URL \"opc.tcp://serverName:4840/UADiscovery\"."#VAR  @OZCALLSTACK { at ProjectName.HWComponents.PlcAxes.PlcMapping.OpcUaAxisMapper.EasyUaClientOnLogEntry(Object sender, LogEntryEventArgs logEntryEventArgs) in D:\Projekte\visual studio\ProjectName\HWComponents.PlcAxes\HWComponents.PlcAxes\PlcMapping\OpcUaAxisMapper.cs:line 239
at OpcLabs.BaseLib.Widgets.NotifyingWidget.SafeCriticalCallback(String name, Action action)
at OpcLabs.EasyOpc.UA.EasyUAClient.RaiseLogEntry(LogEntryEventArgs eventArgs)
at System.Threading.Tasks.Task.Execute()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
} @STACKEND
Exception thrown: 'Opc.Ua.ServiceResultException' in Opc.Ua.Core
 @OZCODE 1 logEntryEventArgs.Message:  #VAR"OPC-UA endpoint selection on discovery URL \"opc.tcp://serverName:4840/UADiscovery\" candidate report (1 entries) follows.\r\n[0:Winner(1000+0)]."#VAR  @OZCALLSTACK { at ProjectName.HWComponents.PlcAxes.PlcMapping.OpcUaAxisMapper.EasyUaClientOnLogEntry(Object sender, LogEntryEventArgs logEntryEventArgs) in D:\Projekte\visual studio\ProjectName\HWComponents.PlcAxes\HWComponents.PlcAxes\PlcMapping\OpcUaAxisMapper.cs:line 239
at OpcLabs.BaseLib.Widgets.NotifyingWidget.SafeCriticalCallback(String name, Action action)
at OpcLabs.EasyOpc.UA.EasyUAClient.RaiseLogEntry(LogEntryEventArgs eventArgs)
at System.Threading.Tasks.Task.Execute()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
} @STACKEND
 @OZCODE 1 logEntryEventArgs.Message:  #VAR"The OPC-UA server endpoint URL \"opc.tcp://192.168.38.103:4840\" with security policy URI \"opcfoundation.org/UA/SecurityPolicy#None\" and transport policy URI \"opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary\", selected using discovery on endpoint URL \"opc.tcp://serverName:4840/UADiscovery\", has zero security level. Using this endpoint is not recommended and is only supported for backward compatibility. This happens when no other endpoints are available and eligible for selection."#VAR  @OZCALLSTACK { at ProjectName.HWComponents.PlcAxes.PlcMapping.OpcUaAxisMapper.EasyUaClientOnLogEntry(Object sender, LogEntryEventArgs logEntryEventArgs) in D:\Projekte\visual studio\ProjectName\HWComponents.PlcAxes\HWComponents.PlcAxes\PlcMapping\OpcUaAxisMapper.cs:line 239
at OpcLabs.BaseLib.Widgets.NotifyingWidget.SafeCriticalCallback(String name, Action action)
at OpcLabs.EasyOpc.UA.EasyUAClient.RaiseLogEntry(LogEntryEventArgs eventArgs)
at System.Threading.Tasks.Task.Execute()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
} @STACKEND
 @OZCODE 1 logEntryEventArgs.Message:  #VAR"The preliminary OPC-UA server endpoint URL selected using discovery on endpoint URL \"opc.tcp://serverName:4840/UADiscovery\" differs in host name or port number from the discovery endpoint. The original endpoint URL \"opc.tcp://192.168.38.103:4840\" has been replaced by \"opc.tcp://serverName:4840/\"."#VAR  @OZCALLSTACK { at ProjectName.HWComponents.PlcAxes.PlcMapping.OpcUaAxisMapper.EasyUaClientOnLogEntry(Object sender, LogEntryEventArgs logEntryEventArgs) in D:\Projekte\visual studio\ProjectName\HWComponents.PlcAxes\HWComponents.PlcAxes\PlcMapping\OpcUaAxisMapper.cs:line 239
at OpcLabs.BaseLib.Widgets.NotifyingWidget.SafeCriticalCallback(String name, Action action)
at OpcLabs.EasyOpc.UA.EasyUAClient.RaiseLogEntry(LogEntryEventArgs eventArgs)
at System.Threading.Tasks.Task.Execute()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
} @STACKEND
 @OZCODE 1 logEntryEventArgs.Message:  #VAR"The OPC-UA client session with connect sequence number 1 has selected an OPC-UA endpoint for discovery URL \"opc.tcp://serverName:4840/UADiscovery\" with following parameters:\r\nEndpoint URL \"opc.tcp://serverName:4840/\", message security mode 'None', security policy URI \"opcfoundation.org/UA/SecurityPolicy#None\", transport profile URI \"opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary\"."#VAR  @OZCALLSTACK { at ProjectName.HWComponents.PlcAxes.PlcMapping.OpcUaAxisMapper.EasyUaClientOnLogEntry(Object sender, LogEntryEventArgs logEntryEventArgs) in D:\Projekte\visual studio\ProjectName\HWComponents.PlcAxes\HWComponents.PlcAxes\PlcMapping\OpcUaAxisMapper.cs:line 239
at OpcLabs.BaseLib.Widgets.NotifyingWidget.SafeCriticalCallback(String name, Action action)
at OpcLabs.EasyOpc.UA.EasyUAClient.RaiseLogEntry(LogEntryEventArgs eventArgs)
at System.Threading.Tasks.Task.Execute()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
} @STACKEND
 @OZCODE 1 logEntryEventArgs.Message:  #VAR"The OPC-UA client session with connect sequence number 1 user token selection on endpoint URL \"opc.tcp://serverName:4840/UADiscovery\" candidate report (1 entries) follows.\n[0:Winner(\"\")]."#VAR  @OZCALLSTACK { at ProjectName.HWComponents.PlcAxes.PlcMapping.OpcUaAxisMapper.EasyUaClientOnLogEntry(Object sender, LogEntryEventArgs logEntryEventArgs) in D:\Projekte\visual studio\ProjectName\HWComponents.PlcAxes\HWComponents.PlcAxes\PlcMapping\OpcUaAxisMapper.cs:line 239
at OpcLabs.BaseLib.Widgets.NotifyingWidget.SafeCriticalCallback(String name, Action action)
at OpcLabs.EasyOpc.UA.EasyUAClient.RaiseLogEntry(LogEntryEventArgs eventArgs)
at System.Threading.Tasks.Task.Execute()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
} @STACKEND
 @OZCODE 1 logEntryEventArgs.Message:  #VAR"The OPC-UA server on endpoint URL \"opc.tcp://serverName:4840/UADiscovery\" returned an empty list of software certificates."#VAR  @OZCALLSTACK { at ProjectName.HWComponents.PlcAxes.PlcMapping.OpcUaAxisMapper.EasyUaClientOnLogEntry(Object sender, LogEntryEventArgs logEntryEventArgs) in D:\Projekte\visual studio\ProjectName\HWComponents.PlcAxes\HWComponents.PlcAxes\PlcMapping\OpcUaAxisMapper.cs:line 239
at OpcLabs.BaseLib.Widgets.NotifyingWidget.SafeCriticalCallback(String name, Action action)
at OpcLabs.EasyOpc.UA.EasyUAClient.RaiseLogEntry(LogEntryEventArgs eventArgs)
at System.Threading.Tasks.Task.Execute()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
} @STACKEND
 @OZCODE 1 logEntryEventArgs.Message:  #VAR"The OPC-UA server on endpoint URL \"opc.tcp://serverName:4840/UADiscovery\" did not return a valid software certificate for product URI \"http://www.3s-software.com\" listed in server endpoints. The server returned 0 software certificate(s) in total."#VAR  @OZCALLSTACK { at ProjectName.HWComponents.PlcAxes.PlcMapping.OpcUaAxisMapper.EasyUaClientOnLogEntry(Object sender, LogEntryEventArgs logEntryEventArgs) in D:\Projekte\visual studio\ProjectName\HWComponents.PlcAxes\HWComponents.PlcAxes\PlcMapping\OpcUaAxisMapper.cs:line 239
at OpcLabs.BaseLib.Widgets.NotifyingWidget.SafeCriticalCallback(String name, Action action)
at OpcLabs.EasyOpc.UA.EasyUAClient.RaiseLogEntry(LogEntryEventArgs eventArgs)
at System.Threading.Tasks.Task.Execute()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
} @STACKEND
 @OZCODE 1 logEntryEventArgs.Message:  #VAR"The OPC-UA server on endpoint URL \"opc.tcp://serverName:4840/UADiscovery\" returned an empty server signature."#VAR  @OZCALLSTACK { at ProjectName.HWComponents.PlcAxes.PlcMapping.OpcUaAxisMapper.EasyUaClientOnLogEntry(Object sender, LogEntryEventArgs logEntryEventArgs) in D:\Projekte\visual studio\ProjectName\HWComponents.PlcAxes\HWComponents.PlcAxes\PlcMapping\OpcUaAxisMapper.cs:line 239
at OpcLabs.BaseLib.Widgets.NotifyingWidget.SafeCriticalCallback(String name, Action action)
at OpcLabs.EasyOpc.UA.EasyUAClient.RaiseLogEntry(LogEntryEventArgs eventArgs)
at System.Threading.Tasks.Task.Execute()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
} @STACKEND
 @OZCODE 1 logEntryEventArgs.Message:  #VAR"The OPC-UA client session with connect sequence number 1 has successfully connected to endpoint URL \"opc.tcp://serverName:4840/UADiscovery\". The server-assigned session Id is \"ns=1;i=2\"."#VAR  @OZCALLSTACK { at ProjectName.HWComponents.PlcAxes.PlcMapping.OpcUaAxisMapper.EasyUaClientOnLogEntry(Object sender, LogEntryEventArgs logEntryEventArgs) in D:\Projekte\visual studio\ProjectName\HWComponents.PlcAxes\HWComponents.PlcAxes\PlcMapping\OpcUaAxisMapper.cs:line 239
at OpcLabs.BaseLib.Widgets.NotifyingWidget.SafeCriticalCallback(String name, Action action)
at OpcLabs.EasyOpc.UA.EasyUAClient.RaiseLogEntry(LogEntryEventArgs eventArgs)
at System.Threading.Tasks.Task.Execute()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
} @STACKEND
 @OZCODE 1 logEntryEventArgs.Message:  #VAR"The OPC-UA publishing counts (either the keep-alive count, or the lifetime count, or both) had to be adjusted on the client session with connect sequence number 1 to endpoint URL \"opc.tcp://serverName:4840/UADiscovery\". Old/new/maximum keep-alive count: 34560/34560/4294967295. Old/new/maximum lifetime count: 103680/34560/4294967295."#VAR  @OZCALLSTACK { at ProjectName.HWComponents.PlcAxes.PlcMapping.OpcUaAxisMapper.EasyUaClientOnLogEntry(Object sender, LogEntryEventArgs logEntryEventArgs) in D:\Projekte\visual studio\ProjectName\HWComponents.PlcAxes\HWComponents.PlcAxes\PlcMapping\OpcUaAxisMapper.cs:line 239
at OpcLabs.BaseLib.Widgets.NotifyingWidget.SafeCriticalCallback(String name, Action action)
at OpcLabs.EasyOpc.UA.EasyUAClient.RaiseLogEntry(LogEntryEventArgs eventArgs)
at System.Threading.Tasks.Task.Execute()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
} @STACKEND
 @OZCODE 1 logEntryEventArgs.Message:  #VAR"When creating or modifying a monitored item, the OPC-UA server on endpoint URL \"opc.tcp://serverName:4840/UADiscovery\" has revised the sampling interval to 5000 milliseconds; the requested sampling interval was 15000 milliseconds. Further such warnings on this session will not be logged."#VAR  @OZCALLSTACK { at ProjectName.HWComponents.PlcAxes.PlcMapping.OpcUaAxisMapper.EasyUaClientOnLogEntry(Object sender, LogEntryEventArgs logEntryEventArgs) in D:\Projekte\visual studio\ProjectName\HWComponents.PlcAxes\HWComponents.PlcAxes\PlcMapping\OpcUaAxisMapper.cs:line 239
at OpcLabs.BaseLib.Widgets.NotifyingWidget.SafeCriticalCallback(String name, Action action)
at OpcLabs.EasyOpc.UA.EasyUAClient.RaiseLogEntry(LogEntryEventArgs eventArgs)
at System.Threading.Tasks.Task.Execute()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
} @STACKEND
 @OZCODE 1 logEntryEventArgs.Message:  #VAR"The OPC-UA publishing counts (either the keep-alive count, or the lifetime count, or both) had to be adjusted on the client session with connect sequence number 1 to endpoint URL \"opc.tcp://serverName:4840/UADiscovery\". Old/new/maximum keep-alive count: 518400/518400/4294967295. Old/new/maximum lifetime count: 1555200/518400/4294967295."#VAR  @OZCALLSTACK { at ProjectName.HWComponents.PlcAxes.PlcMapping.OpcUaAxisMapper.EasyUaClientOnLogEntry(Object sender, LogEntryEventArgs logEntryEventArgs) in D:\Projekte\visual studio\ProjectName\HWComponents.PlcAxes\HWComponents.PlcAxes\PlcMapping\OpcUaAxisMapper.cs:line 239
at OpcLabs.BaseLib.Widgets.NotifyingWidget.SafeCriticalCallback(String name, Action action)
at OpcLabs.EasyOpc.UA.EasyUAClient.RaiseLogEntry(LogEntryEventArgs eventArgs)
at System.Threading.Tasks.Task.Execute()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
} @STACKEND
The thread 0x2d9c has exited with code 0 (0x0).
The thread 0x2e0c has exited with code 0 (0x0).
The thread 0x2440 has exited with code 0 (0x0).
The thread 0x2a94 has exited with code 0 (0x0).
The thread 0x2cf4 has exited with code 0 (0x0).
The thread 0x2018 has exited with code 0 (0x0).
The thread 0x1e24 has exited with code 0 (0x0).
Exception thrown: 'Opc.Ua.ServiceResultException' in Opc.Ua.Core
 @OZCODE 1 logEntryEventArgs.Message:  #VAR"Failed to perform subscription changes on the OPC-UA client session with connect sequence number 1 to endpoint URL \"opc.tcp://serverName:4840/UADiscovery\". There were 0 removal(s), 0 modification(s) and 27 addition(s) to apply. Further such errors on this session will not be logged. BadSessionIdInvalid"#VAR  @OZCALLSTACK { at ProjectName.HWComponents.PlcAxes.PlcMapping.OpcUaAxisMapper.EasyUaClientOnLogEntry(Object sender, LogEntryEventArgs logEntryEventArgs) in D:\Projekte\visual studio\ProjectName\HWComponents.PlcAxes\HWComponents.PlcAxes\PlcMapping\OpcUaAxisMapper.cs:line 239
at OpcLabs.BaseLib.Widgets.NotifyingWidget.SafeCriticalCallback(String name, Action action)
at OpcLabs.EasyOpc.UA.EasyUAClient.RaiseLogEntry(LogEntryEventArgs eventArgs)
at System.Threading.Tasks.Task.Execute()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
} @STACKEND
Exception thrown: 'Opc.Ua.ServiceResultException' in Opc.Ua.Core
The thread 0x1698 has exited with code 0 (0x0).
The thread 0x2704 has exited with code 0 (0x0).
The thread 0x2488 has exited with code 0 (0x0).
Exception thrown: 'System.ObjectDisposedException' in System.dll
 @OZCODE 1 logEntryEventArgs.Message:  #VAR"The OPC-UA engine is disconnecting from the underlying subsystems."#VAR  @OZCALLSTACK { at ProjectName.HWComponents.PlcAxes.PlcMapping.OpcUaAxisMapper.EasyUaClientOnLogEntry(Object sender, LogEntryEventArgs logEntryEventArgs) in D:\Projekte\visual studio\ProjectName\HWComponents.PlcAxes\HWComponents.PlcAxes\PlcMapping\OpcUaAxisMapper.cs:line 239
at OpcLabs.BaseLib.Widgets.NotifyingWidget.SafeCriticalCallback(String name, Action action)
at OpcLabs.EasyOpc.UA.EasyUAClient.RaiseLogEntry(LogEntryEventArgs eventArgs)
at System.Threading.Tasks.Task.Execute()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
} @STACKEND
 @OZCODE 1 logEntryEventArgs.Message:  #VAR"The OPC-UA client session with connect sequence number 1 is disconnecting from endpoint URL \"opc.tcp://serverName:4840/UADiscovery\"."#VAR  @OZCALLSTACK { at ProjectName.HWComponents.PlcAxes.PlcMapping.OpcUaAxisMapper.EasyUaClientOnLogEntry(Object sender, LogEntryEventArgs logEntryEventArgs) in D:\Projekte\visual studio\ProjectName\HWComponents.PlcAxes\HWComponents.PlcAxes\PlcMapping\OpcUaAxisMapper.cs:line 239
at OpcLabs.BaseLib.Widgets.NotifyingWidget.SafeCriticalCallback(String name, Action action)
at OpcLabs.EasyOpc.UA.EasyUAClient.RaiseLogEntry(LogEntryEventArgs eventArgs)
at System.Threading.Tasks.Task.Execute()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
} @STACKEND
Exception thrown: 'Opc.Ua.ServiceResultException' in Opc.Ua.Core
Exception thrown: 'Opc.Ua.ServiceResultException' in OpcLabs.EasyOpcUA.dll
Exception thrown: 'Opc.Ua.ServiceResultException' in Opc.Ua.Core
Exception thrown: 'Opc.Ua.ServiceResultException' in Opc.Ua.Core
Exception thrown: 'Opc.Ua.ServiceResultException' in Opc.Ua.Core
 @OZCODE 1 logEntryEventArgs.Message:  #VAR"Failed to close the OPC-UA client session (with connect sequence number 1) to endpoint URL \"opc.tcp://serverName:4840/UADiscovery\". This error is generally ignored.\r\n BadSessionIdInvalid"#VAR  @OZCALLSTACK { at ProjectName.HWComponents.PlcAxes.PlcMapping.OpcUaAxisMapper.EasyUaClientOnLogEntry(Object sender, LogEntryEventArgs logEntryEventArgs) in D:\Projekte\visual studio\ProjectName\HWComponents.PlcAxes\HWComponents.PlcAxes\PlcMapping\OpcUaAxisMapper.cs:line 239
at OpcLabs.BaseLib.Widgets.NotifyingWidget.SafeCriticalCallback(String name, Action action)
at OpcLabs.EasyOpc.UA.EasyUAClient.RaiseLogEntry(LogEntryEventArgs eventArgs)
at System.Threading.Tasks.Task.Execute()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
} @STACKEND
 @OZCODE 1 logEntryEventArgs.Message:  #VAR"The OPC-UA client session with connect sequence number 1 has disconnected from endpoint URL \"opc.tcp://serverName:4840/UADiscovery\"."#VAR  @OZCALLSTACK { at ProjectName.HWComponents.PlcAxes.PlcMapping.OpcUaAxisMapper.EasyUaClientOnLogEntry(Object sender, LogEntryEventArgs logEntryEventArgs) in D:\Projekte\visual studio\ProjectName\HWComponents.PlcAxes\HWComponents.PlcAxes\PlcMapping\OpcUaAxisMapper.cs:line 239
at OpcLabs.BaseLib.Widgets.NotifyingWidget.SafeCriticalCallback(String name, Action action)
at OpcLabs.EasyOpc.UA.EasyUAClient.RaiseLogEntry(LogEntryEventArgs eventArgs)
at System.Threading.Tasks.Task.Execute()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
} @STACKEND
The thread 0x291c has exited with code 0 (0x0).
Exception thrown: 'System.IO.EndOfStreamException' in JetBrains.ReSharper.TaskRunnerFramework.dll
 @OZCODE 1 logEntryEventArgs.Message:  #VAR"The OPC-UA engine has disconnected from the underlying subsystems."#VAR  @OZCALLSTACK { at ProjectName.HWComponents.PlcAxes.PlcMapping.OpcUaAxisMapper.EasyUaClientOnLogEntry(Object sender, LogEntryEventArgs logEntryEventArgs)
at OpcLabs.BaseLib.Widgets.NotifyingWidget.SafeCriticalCallback(String name, Action action)
at OpcLabs.EasyOpc.UA.EasyUAClient.RaiseLogEntry(LogEntryEventArgs eventArgs)
at System.Threading.Tasks.Task.Execute()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
} @STACKEND
Exception thrown: 'System.Threading.ThreadAbortException' in mscorlib.dll
The program '[11956] JetBrains.ReSharper.TaskRunner.CLR45.x64.exe' has exited with code 0 (0x0).


The log entries

logEntryEventArgs.Message: "OPC-UA engine SDK configuration successfully provided by \"OpcLabs.EasyOpc.UA.Toolkit.InternalSdkConfigurationProvider\"." 
logEntryEventArgs.Message: "The OPC-UA engine has determined the client certificate parameters as listed below.\nSubjectName: Task Runner Application\nApplicationName: Task Runner Application\nApplicationUri: urn:LISL395120:JetBrains.ReSharper.TaskRunner.CLR45.x64:108.0.0.0\n" 
logEntryEventArgs.Message: "The OPC-UA engine has determined the application configuration parameters as listed below. \r\nProductUri: urn:literal:string:Psi.Features%5CUnitTesting" 
logEntryEventArgs.Message: "The OPC-UA engine has successfully connected to the underlying subsystems." 
logEntryEventArgs.Message: "The OPC-UA client session with connect sequence number 1 is connecting to endpoint URL \"opc.tcp://serverName:4840/UADiscovery\"." 
logEntryEventArgs.Message: "OPC-UA endpoint selection on discovery URL \"opc.tcp://serverName:4840/UADiscovery\" candidate report (1 entries) follows.\r\n[0:Winner(1000+0)]." 
logEntryEventArgs.Message: "The OPC-UA server endpoint URL \"opc.tcp://192.168.38.103:4840\" with security policy URI \"opcfoundation.org/UA/SecurityPolicy#None\" and transport policy URI \"opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary\", selected using discovery on endpoint URL \"opc.tcp://serverName:4840/UADiscovery\", has zero security level. Using this endpoint is not recommended and is only supported for backward compatibility. This happens when no other endpoints are available and eligible for selection." 
logEntryEventArgs.Message: "The preliminary OPC-UA server endpoint URL selected using discovery on endpoint URL \"opc.tcp://serverName:4840/UADiscovery\" differs in host name or port number from the discovery endpoint. The original endpoint URL \"opc.tcp://192.168.38.103:4840\" has been replaced by \"opc.tcp://serverName:4840/\"." 
logEntryEventArgs.Message: "The OPC-UA client session with connect sequence number 1 has selected an OPC-UA endpoint for discovery URL \"opc.tcp://serverName:4840/UADiscovery\" with following parameters:\r\nEndpoint URL \"opc.tcp://serverName:4840/\", message security mode 'None', security policy URI \"opcfoundation.org/UA/SecurityPolicy#None\", transport profile URI \"opcfoundation.org/UA-Profile/Transport/uatcp-uasc-uabinary\"." 
logEntryEventArgs.Message: "The OPC-UA client session with connect sequence number 1 user token selection on endpoint URL \"opc.tcp://serverName:4840/UADiscovery\" candidate report (1 entries) follows.\n[0:Winner(\"\")]." 
logEntryEventArgs.Message: "The OPC-UA server on endpoint URL \"opc.tcp://serverName:4840/UADiscovery\" returned an empty list of software certificates." 
logEntryEventArgs.Message: "The OPC-UA server on endpoint URL \"opc.tcp://serverName:4840/UADiscovery\" did not return a valid software certificate for product URI \"http://www.3s-software.com\" listed in server endpoints. The server returned 0 software certificate(s) in total." 
logEntryEventArgs.Message: "The OPC-UA server on endpoint URL \"opc.tcp://serverName:4840/UADiscovery\" returned an empty server signature." 
logEntryEventArgs.Message: "The OPC-UA client session with connect sequence number 1 has successfully connected to endpoint URL \"opc.tcp://serverName:4840/UADiscovery\". The server-assigned session Id is \"ns=1;i=2\"." 
logEntryEventArgs.Message: "The OPC-UA publishing counts (either the keep-alive count, or the lifetime count, or both) had to be adjusted on the client session with connect sequence number 1 to endpoint URL \"opc.tcp://serverName:4840/UADiscovery\". Old/new/maximum keep-alive count: 34560/34560/4294967295. Old/new/maximum lifetime count: 103680/34560/4294967295." 
logEntryEventArgs.Message: "When creating or modifying a monitored item, the OPC-UA server on endpoint URL \"opc.tcp://serverName:4840/UADiscovery\" has revised the sampling interval to 5000 milliseconds; the requested sampling interval was 15000 milliseconds. Further such warnings on this session will not be logged." 
logEntryEventArgs.Message: "The OPC-UA publishing counts (either the keep-alive count, or the lifetime count, or both) had to be adjusted on the client session with connect sequence number 1 to endpoint URL \"opc.tcp://serverName:4840/UADiscovery\". Old/new/maximum keep-alive count: 518400/518400/4294967295. Old/new/maximum lifetime count: 1555200/518400/4294967295." 
logEntryEventArgs.Message: "Failed to perform subscription changes on the OPC-UA client session with connect sequence number 1 to endpoint URL \"opc.tcp://serverName:4840/UADiscovery\". There were 0 removal(s), 0 modification(s) and 27 addition(s) to apply. Further such errors on this session will not be logged. BadSessionIdInvalid" 
logEntryEventArgs.Message: "The OPC-UA engine is disconnecting from the underlying subsystems." 
logEntryEventArgs.Message: "The OPC-UA client session with connect sequence number 1 is disconnecting from endpoint URL \"opc.tcp://serverName:4840/UADiscovery\"." 
logEntryEventArgs.Message: "Failed to close the OPC-UA client session (with connect sequence number 1) to endpoint URL \"opc.tcp://serverName:4840/UADiscovery\". This error is generally ignored.\r\n BadSessionIdInvalid" 
logEntryEventArgs.Message: "The OPC-UA client session with connect sequence number 1 has disconnected from endpoint URL \"opc.tcp://serverName:4840/UADiscovery\"." 
logEntryEventArgs.Message: "The OPC-UA engine has disconnected from the underlying subsystems." 

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

More
23 May 2017 06:40 #5173 by support
Replied by support on topic Reading Time
Thank you. This error originates in the target OPC server - but it should not normally happen.
"BadSessionIdInvalid" means that either 1) our component is sending an invalid session ID in some OPC UA request to the server, or 2) we are doing it right, but the server improperly thinks that it is wrong. It is most likely a consequence of some communication problem that has happened even before the request in question.

Unfortunately this is a kind of error that on itself does not tell enough, so the Wireshark capture is the next logical step to do.

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

More
22 May 2017 09:00 #5172 by Captain_Dash
Replied by Captain_Dash on topic Reading Time
Ok, I just mapped the Exception of the values to a separate property and extracted some information.

HelpLink
at Opc.Ua.ClientBase.ValidateResponse(ResponseHeader header)
at Opc.Ua.SessionClient.Read(RequestHeader requestHeader, Double maxAge, TimestampsToReturn timestampsToReturn, ReadValueIdCollection nodesToRead, DataValueCollection& results, DiagnosticInfoCollection& diagnosticInfos)
at OpcLabs.EasyOpc.UA.Toolkit.UAClientSession.<>c__DisplayClass55_0.<ReadDataValues>b__2()
at OpcLabs.EasyOpc.UA.Toolkit.UAEngineBase.PerformSdkAction(UASdkCallType callType, Func`1 usingFunction, String name, Action sdkAction)

Internal Code
2149908480

Message
BadSessionIdInvalid

ServiceResult
StatusCode: {BadSessionIdInvalid} = 0x80250000 (2149908480)


ServiceTargetSite
{Void ValidateResponse(Opc.Ua.ResponseHeader)}


Can you provide some information why this error occurs? Unfortunately I could not find any proper information in the documentation.

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

More
22 May 2017 05:17 - 22 May 2017 05:21 #5171 by support
Replied by support on topic Reading Time
The Read is completed when Read call on the mapper returns. The other way to figure it out would be to put in an extra logic into each mapped member and check whether you have them all collected, but that would terribly complicate the code.

The read operation does have a timeout. Timeouts are one of possible reasons for the issue you are seeing.

But, the main thing you should do first, is to add error checking to your code. You are know mapping just the "values" themselves, and in case of error, there is no value, and therefore nothing is stored to your mapped members. So, you d not get the value, but you also throw away the error information.

Please study this: opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...rame.html#Mapping%20Kinds.html . Basically, you either need to map additional members with Kind = UADataMappingKind.Exception or similar, OR instead of mapping your members with the default kind (UADataMappingKind.Value), which only stores the value when there is no error, map the whole result structure (UADataMappingKind.Result), which will ALWAYS get an information about the result, and then extract either the value or error info (e.g. .Exception) from there.

Only after this is done (and the behavior analyzed - whether there are errors and if so, of which kind), further analysis such as that with Wireshark would make sense.

As to the Wireshark analysis, we can help with it or do it, but the logs are usually quite big, and the work can be very tedious. For this reason, it is really important to start with the simplest case that already shows some symptoms of problems.

Best regards
Last edit: 22 May 2017 05:21 by support.

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

More
19 May 2017 13:00 - 19 May 2017 14:30 #5168 by Captain_Dash
Replied by Captain_Dash on topic Reading Time
Just for clarification for me, when I need to know that all values have been read i have to perfom the read action, because there is no mechanism from the subsription working out of the box, that will inform me that the mapper read all the initial values?

How should this extra logic should be implemented? Where is the hook to get into this?

Does the read operation have some kind of timeout? Or why is this stopping after 80 seconds without reading a value?

Ok we will try to analyze this with Wireshark, are there some advices you can provide for finding the issue?
Last edit: 19 May 2017 14:30 by Captain_Dash. Reason: adding a question

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

More
19 May 2017 09:53 #5167 by support
Replied by support on topic Reading Time
I think that most likely this is a server issue. I do not see anything wrong on your side.

The way to figure this out would be to get a Wireshark capture of the communication between the client and the server, and then analyze it (ideally, with some smaller configuration - as long as it shows some unusual slowness or other issues).

The fact that you can use clients like UA Expert without problems does not, unfortunately, tell much. The problem with these clients is that they have a "workflow" that is quite different from what a production OPC client does. With these UI-based sample clients, you typically 1) establish a connection, and then wait a second or two, 2) subscribe to a node, and wait, 3) maybe read or write a node, and wait again.

A real-life OPC client (like yours), however, does many things in quick succession - it connects, subscribes to maybe tens of hundreds of nodes, reads them as well, etc.

Unfortunately, some OPC servers are not tested well with this kind of load - and have problems with it.

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

More
19 May 2017 09:39 #5166 by support
Replied by support on topic Reading Time
Thank you for the details.

When a client makes a subscription, an OPC Server is required to provide values of all nodes requested. In this sense, a Read is not necessary; a Subscribe guarantees that you get the values anyway.

But, with Subscribe, unless you put in an extra logic, you do not actually KNOW when the server has done its job and has sent all the initial updates.

On the other hand, if you call Read, the operation will not finish until the server provides/has values for all the nodes requested. So, even if you ask for 1000 nodes and the server has the value for 999 of them and needs to wait for 1, the whole operation will not finish until this single result is also available.

I will respond to your second post separately.

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

More
19 May 2017 07:51 #5165 by Captain_Dash
Replied by Captain_Dash on topic Reading Time
Today its not working with the 250 ms SamplingInterval anymore, I am really confused. I tried to change the plc device on the server. We are using a codesys server. When I set the device to Control Win V3 I was able to read all values in 2.5 seconds, but that is not the device we want to use. We need to set the device to Control RTE V3, and in this case the reading takes about 80 seconds and is not successful. No value will be read. I also tried a connection with UAExpert which was fine, values could be read and watched.

also as a side note I try to explain the current state:

The structure I want to map looks like this
    [UANamespace("CODESYSSPV3/3S/IecVarAccess")]
    [UAType]
    public class MappedMotionAxis : BindablePropertyBase, IMappedMotionAxis
    {
        private AxisMeta metaInfo = new AxisMeta();
 
        private AxisControl controlProperties = new AxisControl();
 
        [UANode(BrowsePath = ".meta")]
        public AxisMeta MetaInfo => metaInfo;
 
        [UANode(BrowsePath = ".control")]
        public AxisControl ControlProperties => controlProperties;
    }

in AxisControl and AxisMeta are the properties defined similiar to the one in a previous post.

When using the control RTE V3 device it behaves as following.
When we comment out either MetaInfo or AxisControl we are able to read successful with long time waiting.

AxisMeta --> 20 seconds
AxisControl --> 60 seconds

When we try to read all informations it takes 80 seconds and the values are not read.

The Logging put out the following message:

Failed to perform subscription changes on the OPC-UA client session with connect sequence number 1 to endpoint URL \"opc.tcp://serverName:4840/UADiscovery\". There were 0 removal(s), 0 modification(s) and 27 addition(s) to apply. Further such errors on this session will not be logged. BadSessionIdInvalid" 


How can I get to know what went wrong?

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

Moderators: support
Time to create page: 0.243 seconds