Thank for the suggestion.
I tried the vb exemple you suggest.
We are close to the solution.
When i add my host 'opc.tcp://localhost:49320' that is kepserveEX 6.6 I get the warning about 'self signed' and if I "accept the certificat anyway" i get the following errors. so i can' select one node on it.
But The good point is that if I select one node on "opc.tcp://opcua.demo-this.com:51210/UA/SampleServer" and i quit, the next loop all is again on browser (My host with the error and the selected node).
So now I have two issues
- Reproduce this behavior in Delphi
- find a way to Add UA host self signed in VB
Code:
Exceptions
Type: OpcLabs.EasyOpc.UA.Engine.UAEngineException
Data:
HelpLink:
HResult: -2146233088 (0x80131500)
InnerException:
OpcLabs.EasyOpc.UA.Engine.UAEngineException: UA SDK error (Opc.UA.ServiceResult=0x80130000) in 'static Session.Create'. OPC UA service result - {BadSecurityChecksFailed}. Error establishing a connection.
+ Connection attempt #1; last connected at 01/01/0001 00:00:00 (local); unconnected for 00:00:00.
+ The client method called (or event/callback invoked) was 'BrowseMultiple[1]'.
+ The client method called (or event/callback invoked) was 'BrowseMultiple[1]'. ---> OpcLabs.EasyOpc.UA.UAServiceException: OPC UA service result - {BadSecurityChecksFailed}. Error establishing a connection.
--> {BadSecurityChecksFailed}. Error received from remote host: An error occurred verifying security.
--- Fin de la trace de la pile d'exception interne ---
Activity Trace:
Following (9) events were gathered during the action on activity ID [8], in the order of first occurrence:
Exception: {Opc.Ua.ServiceResultException} Self Signed Certificate is not trusted. IssuerName: CN=KEPServerEX/UA Server, O=Unknown, C=FR, DC=DEV-W-TOKYO
Exception: {System.IO.IOException} Descripteur non valide
SDK trace: CreateSession Called. RequestHandle=1, PendingRequestCount=1
[16] SDK trace: Token #0 created. CreatedAt = 08:24:10.212 . Lifetime = 3600000
[7] Exception: {Opc.Ua.ServiceResultException} Error received from remote host: An error occurred verifying security.
3*Exception: {Opc.Ua.ServiceResultException} Error establishing a connection.
SDK trace: CreateSession Completed. RequestHandle=1, PendingRequestCount=0, StatusCode=Bad
Events starting with activity ID in [] may not necessarily be related to the current action.
Data:
ErrorId: OpcLabs.UAEngine=1
7b4d9f28-22a8-41d6-93ea-e4d8c2a75da8:
((8, 1), System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs)
((8, 1), System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs)
((8, 1), Opc.Ua.TraceEventArgs)
((16, 0), Opc.Ua.TraceEventArgs)
((7, 0), System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs)
((8, 1), System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs)
((8, 1), Opc.Ua.TraceEventArgs)
((8, 1), System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs)
((8, 1), System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs)
c3c0e69e-bf8f-4bfa-8e93-816783737e55: 8
8970fe52-aaa4-40f7-9a6e-74cdcee56724: static Session.Create
OpcLabs.EasyOpc.UA.Implementation.ErrorEnhancingEasyUAClient.Processed: True
Error Code: 1
HelpLink:
HResult: -2146232832 (0x80131600)
InnerException:
OpcLabs.EasyOpc.UA.UAServiceException: OPC UA service result - {BadSecurityChecksFailed}. Error establishing a connection.
--> {BadSecurityChecksFailed}. Error received from remote host: An error occurred verifying security.
Data:
ErrorId: Opc.UA.ServiceResult=0x80130000
OpcLabs.EasyOpc.UA.Implementation.ErrorEnhancingEasyUAClient.Processed: True
Help Link:
HResult: -2146232832 (0x80131600)
InnerException:
Internal Code: 2148728832
Message:
OPC UA service result - {BadSecurityChecksFailed}. Error establishing a connection.
--> {BadSecurityChecksFailed}. Error received from remote host: An error occurred verifying security.
Service Result: BadSecurityChecksFailed
Additional Info:
Description: Error establishing a connection.
Inner Result: BadSecurityChecksFailed
Additional Info:
>>> Error received from remote host: An error occurred verifying security.
--- à Opc.Ua.Bindings.TcpAsyncOperation`1.End(Int32 timeout)
--- à Opc.Ua.Bindings.TcpClientChannel.OnConnectOnDemandComplete(Object state)
Description: Error received from remote host: An error occurred verifying security.
Inner Result:
Message: Error received from remote host: An error occurred verifying security.
Qualified Symbolic ID:
Expanded Text:
Is Null: True
Name:
Namespace Index: 0
Namespace URI:
Namespace URI String:
Standard Name:
Status Code: BadSecurityChecksFailed
Code Bits: 32787
Code Bits Symbol: BadSecurityChecksFailed
Condition: 19
Description: An error occurred verifying security.
Flag Bits: 0
Has Data Value Info: False
Info Type: NotUsed
Internal Value: 2148728832
Is Bad: True
Is Good: False
Is Uncertain: False
Limit Info: None
Overflow: False
Semantics Changed: False
Severity: BadOrFailure
Status Info: Error
Structure Changed: False
Text: {BadSecurityChecksFailed}. Error received from remote host: An error occurred verifying security.
Message: Error establishing a connection.
Qualified Symbolic ID:
Expanded Text:
Is Null: True
Name:
Namespace Index: 0
Namespace URI:
Namespace URI String:
Standard Name:
Status Code: BadSecurityChecksFailed
Code Bits: 32787
Code Bits Symbol: BadSecurityChecksFailed
Condition: 19
Description: An error occurred verifying security.
Flag Bits: 0
Has Data Value Info: False
Info Type: NotUsed
Internal Value: 2148728832
Is Bad: True
Is Good: False
Is Uncertain: False
Limit Info: None
Overflow: False
Semantics Changed: False
Severity: BadOrFailure
Status Info: Error
Structure Changed: False
Text:
{BadSecurityChecksFailed}. Error establishing a connection.
--> {BadSecurityChecksFailed}. Error received from remote host: An error occurred verifying security.
Service Target Site: T End(Int32)
DeclaringType: Opc.Ua.Bindings.TcpAsyncOperation`1[T]
Module: Opc.Ua.Core.dll
Assembly: Opc.Ua.Core, Version=1.3.342.0, Culture=neutral, PublicKeyToken=6faddca41dacb409
CustomAttributes:
FullyQualifiedName: C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Assemblies\net47\Opc.Ua.Core.dll
MDStreamVersion: 131072
MetadataToken: 1
ModuleHandle: System.ModuleHandle
MDStreamVersion: 131072
ModuleVersionId: 04dc8823-5d09-4930-92e3-a733b055222c
Name: Opc.Ua.Core.dll
ScopeName: Opc.Ua.Core.dll
Source: Opc.Ua.Core
Stack Trace:
à Opc.Ua.Bindings.TcpAsyncOperation`1.End(Int32 timeout)
à Opc.Ua.Bindings.TcpClientChannel.EndSendRequest(IAsyncResult result)
à Opc.Ua.SessionClient.CreateSession(RequestHeader requestHeader, ApplicationDescription clientDescription, String serverUri, String endpointUrl, String sessionName, Byte[] clientNonce, Byte[] clientCertificate, Double requestedSessionTimeout, UInt32 maxResponseMessageSize, NodeId& sessionId, NodeId& authenticationToken, Double& revisedSessionTimeout, Byte[]& serverNonce, Byte[]& serverCertificate, EndpointDescriptionCollection& serverEndpoints, SignedSoftwareCertificateCollection& serverSoftwareCertificates, SignatureData& serverSignature, UInt32& maxRequestMessageSize)
à OpcLabs.EasyOpc.UA.Sdk.Shims.SessionShim.CreateSession(RequestHeader requestHeader, ApplicationDescription clientDescription, String serverUri, String endpointUrl, String sessionName, Byte[] clientNonce, Byte[] clientCertificate, Double millisecondsRequestedSessionTimeout, UInt32 maxResponseMessageSize, NodeId& sessionId, NodeId& authenticationToken, Double& millisecondsRevisedSessionTimeout, Byte[]& serverNonce, Byte[]& serverCertificate, EndpointDescriptionCollection& serverEndpoints, SignedSoftwareCertificateCollection& serverSoftwareCertificates, SignatureData& serverSignature, UInt32& maxRequestMessageSize)
à Opc.Ua.Client.Session.Open(String sessionName, UInt32 sessionTimeout, IUserIdentity identity, IList`1 preferredLocales, Boolean checkDomain)
à OpcLabs.EasyOpc.UA.Sdk.Shims.SessionShim.Create(ApplicationConfiguration configuration, ConfiguredEndpoint endpoint, Boolean updateBeforeConnect, Boolean checkDomain, String sessionName, UInt32 millisecondsSessionTimeout, Func`2 identityFunction, IList`1 preferredLocales, Action`2 domainCheckError, Action`1 setupSession, Action`1 setupTransportChannel)
à OpcLabs.EasyOpc.UA.Toolkit.Client.UAClientSessionBase.<>c__DisplayClass144_0.<CreateSdkSession>b__2()
à OpcLabs.EasyOpc.UA.Toolkit.UAEngineBase.PerformSdkAction(UASdkCallType callType, Func`1 usingFunction, String name, Action sdkAction)
TargetSite:
Message:
UA SDK error (Opc.UA.ServiceResult=0x80130000) in 'static Session.Create'. OPC UA service result - {BadSecurityChecksFailed}. Error establishing a connection.
+ Connection attempt #1; last connected at 01/01/0001 00:00:00 (local); unconnected for 00:00:00.
+ The client method called (or event/callback invoked) was 'BrowseMultiple[1]'.
+ The client method called (or event/callback invoked) was 'BrowseMultiple[1]'.
Source:
Stack Trace:
== Activity Trace ==
Following (9) events were gathered during the action on activity ID [8], in the order of first occurrence:
Exception: {Opc.Ua.ServiceResultException} Self Signed Certificate is not trusted. IssuerName: CN=KEPServerEX/UA Server, O=Unknown, C=FR, DC=DEV-W-TOKYO
Exception: {System.IO.IOException} Descripteur non valide
SDK trace: CreateSession Called. RequestHandle=1, PendingRequestCount=1
[16] SDK trace: Token #0 created. CreatedAt = 08:24:10.212 . Lifetime = 3600000
[7] Exception: {Opc.Ua.ServiceResultException} Error received from remote host: An error occurred verifying security.
3*Exception: {Opc.Ua.ServiceResultException} Error establishing a connection.
SDK trace: CreateSession Completed. RequestHandle=1, PendingRequestCount=0, StatusCode=Bad
Events starting with activity ID in [] may not necessarily be related to the current action.
TargetSite:
Message: Problem browsing OPC Unified Architecture nodes.
Source:
StackTrace:
TargetSite:
and
Code:
Exceptions
Type: OpcLabs.EasyOpc.UA.UAServiceException
Data:
HelpLink:
HResult: -2146233088 (0x80131500)
InnerException:
OpcLabs.EasyOpc.UA.Engine.UAEngineException: UA SDK error (Opc.UA.ServiceResult=0x80130000) in 'static Session.Create'. OPC UA service result - {BadSecurityChecksFailed}. Error establishing a connection.
+ Connection attempt #1; last connected at 01/01/0001 00:00:00 (local); unconnected for 00:00:00.
+ The client method called (or event/callback invoked) was 'BrowseMultiple[1]'.
+ The client method called (or event/callback invoked) was 'BrowseMultiple[1]'. ---> OpcLabs.EasyOpc.UA.UAServiceException: OPC UA service result - {BadSecurityChecksFailed}. Error establishing a connection.
--> {BadSecurityChecksFailed}. Error received from remote host: An error occurred verifying security.
--- Fin de la trace de la pile d'exception interne ---
Activity Trace:
Following (9) events were gathered during the action on activity ID [8], in the order of first occurrence:
Exception: {Opc.Ua.ServiceResultException} Self Signed Certificate is not trusted. IssuerName: CN=KEPServerEX/UA Server, O=Unknown, C=FR, DC=DEV-W-TOKYO
Exception: {System.IO.IOException} Descripteur non valide
SDK trace: CreateSession Called. RequestHandle=1, PendingRequestCount=1
[16] SDK trace: Token #0 created. CreatedAt = 08:24:10.212 . Lifetime = 3600000
[7] Exception: {Opc.Ua.ServiceResultException} Error received from remote host: An error occurred verifying security.
3*Exception: {Opc.Ua.ServiceResultException} Error establishing a connection.
SDK trace: CreateSession Completed. RequestHandle=1, PendingRequestCount=0, StatusCode=Bad
Events starting with activity ID in [] may not necessarily be related to the current action.
Data:
ErrorId: OpcLabs.UAEngine=1
7b4d9f28-22a8-41d6-93ea-e4d8c2a75da8:
((8, 1), System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs)
((8, 1), System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs)
((8, 1), Opc.Ua.TraceEventArgs)
((16, 0), Opc.Ua.TraceEventArgs)
((7, 0), System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs)
((8, 1), System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs)
((8, 1), Opc.Ua.TraceEventArgs)
((8, 1), System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs)
((8, 1), System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs)
c3c0e69e-bf8f-4bfa-8e93-816783737e55: 8
8970fe52-aaa4-40f7-9a6e-74cdcee56724: static Session.Create
OpcLabs.EasyOpc.UA.Implementation.ErrorEnhancingEasyUAClient.Processed: True
Error Code: 1
HelpLink:
HResult: -2146232832 (0x80131600)
InnerException:
OpcLabs.EasyOpc.UA.UAServiceException: OPC UA service result - {BadSecurityChecksFailed}. Error establishing a connection.
--> {BadSecurityChecksFailed}. Error received from remote host: An error occurred verifying security.
Data:
ErrorId: Opc.UA.ServiceResult=0x80130000
OpcLabs.EasyOpc.UA.Implementation.ErrorEnhancingEasyUAClient.Processed: True
Help Link:
HResult: -2146232832 (0x80131600)
InnerException:
Internal Code: 2148728832
Message:
OPC UA service result - {BadSecurityChecksFailed}. Error establishing a connection.
--> {BadSecurityChecksFailed}. Error received from remote host: An error occurred verifying security.
Service Result: BadSecurityChecksFailed
Additional Info:
Description: Error establishing a connection.
Inner Result: BadSecurityChecksFailed
Additional Info:
>>> Error received from remote host: An error occurred verifying security.
--- à Opc.Ua.Bindings.TcpAsyncOperation`1.End(Int32 timeout)
--- à Opc.Ua.Bindings.TcpClientChannel.OnConnectOnDemandComplete(Object state)
Description: Error received from remote host: An error occurred verifying security.
Inner Result:
Message: Error received from remote host: An error occurred verifying security.
Qualified Symbolic ID:
Expanded Text:
Is Null: True
Name:
Namespace Index: 0
Namespace URI:
Namespace URI String:
Standard Name:
Status Code: BadSecurityChecksFailed
Code Bits: 32787
Code Bits Symbol: BadSecurityChecksFailed
Condition: 19
Description: An error occurred verifying security.
Flag Bits: 0
Has Data Value Info: False
Info Type: NotUsed
Internal Value: 2148728832
Is Bad: True
Is Good: False
Is Uncertain: False
Limit Info: None
Overflow: False
Semantics Changed: False
Severity: BadOrFailure
Status Info: Error
Structure Changed: False
Text: {BadSecurityChecksFailed}. Error received from remote host: An error occurred verifying security.
Message: Error establishing a connection.
Qualified Symbolic ID:
Expanded Text:
Is Null: True
Name:
Namespace Index: 0
Namespace URI:
Namespace URI String:
Standard Name:
Status Code: BadSecurityChecksFailed
Code Bits: 32787
Code Bits Symbol: BadSecurityChecksFailed
Condition: 19
Description: An error occurred verifying security.
Flag Bits: 0
Has Data Value Info: False
Info Type: NotUsed
Internal Value: 2148728832
Is Bad: True
Is Good: False
Is Uncertain: False
Limit Info: None
Overflow: False
Semantics Changed: False
Severity: BadOrFailure
Status Info: Error
Structure Changed: False
Text:
{BadSecurityChecksFailed}. Error establishing a connection.
--> {BadSecurityChecksFailed}. Error received from remote host: An error occurred verifying security.
Service Target Site: T End(Int32)
DeclaringType: Opc.Ua.Bindings.TcpAsyncOperation`1[T]
Module: Opc.Ua.Core.dll
Assembly: Opc.Ua.Core, Version=1.3.342.0, Culture=neutral, PublicKeyToken=6faddca41dacb409
CustomAttributes:
FullyQualifiedName: C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Assemblies\net47\Opc.Ua.Core.dll
MDStreamVersion: 131072
MetadataToken: 1
ModuleHandle: System.ModuleHandle
MDStreamVersion: 131072
ModuleVersionId: 04dc8823-5d09-4930-92e3-a733b055222c
Name: Opc.Ua.Core.dll
ScopeName: Opc.Ua.Core.dll
Source: Opc.Ua.Core
Stack Trace:
à Opc.Ua.Bindings.TcpAsyncOperation`1.End(Int32 timeout)
à Opc.Ua.Bindings.TcpClientChannel.EndSendRequest(IAsyncResult result)
à Opc.Ua.SessionClient.CreateSession(RequestHeader requestHeader, ApplicationDescription clientDescription, String serverUri, String endpointUrl, String sessionName, Byte[] clientNonce, Byte[] clientCertificate, Double requestedSessionTimeout, UInt32 maxResponseMessageSize, NodeId& sessionId, NodeId& authenticationToken, Double& revisedSessionTimeout, Byte[]& serverNonce, Byte[]& serverCertificate, EndpointDescriptionCollection& serverEndpoints, SignedSoftwareCertificateCollection& serverSoftwareCertificates, SignatureData& serverSignature, UInt32& maxRequestMessageSize)
à OpcLabs.EasyOpc.UA.Sdk.Shims.SessionShim.CreateSession(RequestHeader requestHeader, ApplicationDescription clientDescription, String serverUri, String endpointUrl, String sessionName, Byte[] clientNonce, Byte[] clientCertificate, Double millisecondsRequestedSessionTimeout, UInt32 maxResponseMessageSize, NodeId& sessionId, NodeId& authenticationToken, Double& millisecondsRevisedSessionTimeout, Byte[]& serverNonce, Byte[]& serverCertificate, EndpointDescriptionCollection& serverEndpoints, SignedSoftwareCertificateCollection& serverSoftwareCertificates, SignatureData& serverSignature, UInt32& maxRequestMessageSize)
à Opc.Ua.Client.Session.Open(String sessionName, UInt32 sessionTimeout, IUserIdentity identity, IList`1 preferredLocales, Boolean checkDomain)
à OpcLabs.EasyOpc.UA.Sdk.Shims.SessionShim.Create(ApplicationConfiguration configuration, ConfiguredEndpoint endpoint, Boolean updateBeforeConnect, Boolean checkDomain, String sessionName, UInt32 millisecondsSessionTimeout, Func`2 identityFunction, IList`1 preferredLocales, Action`2 domainCheckError, Action`1 setupSession, Action`1 setupTransportChannel)
à OpcLabs.EasyOpc.UA.Toolkit.Client.UAClientSessionBase.<>c__DisplayClass144_0.<CreateSdkSession>b__2()
à OpcLabs.EasyOpc.UA.Toolkit.UAEngineBase.PerformSdkAction(UASdkCallType callType, Func`1 usingFunction, String name, Action sdkAction)
TargetSite:
Message:
UA SDK error (Opc.UA.ServiceResult=0x80130000) in 'static Session.Create'. OPC UA service result - {BadSecurityChecksFailed}. Error establishing a connection.
+ Connection attempt #1; last connected at 01/01/0001 00:00:00 (local); unconnected for 00:00:00.
+ The client method called (or event/callback invoked) was 'BrowseMultiple[1]'.
+ The client method called (or event/callback invoked) was 'BrowseMultiple[1]'.
Source:
Stack Trace:
== Activity Trace ==
Following (9) events were gathered during the action on activity ID [8], in the order of first occurrence:
Exception: {Opc.Ua.ServiceResultException} Self Signed Certificate is not trusted. IssuerName: CN=KEPServerEX/UA Server, O=Unknown, C=FR, DC=DEV-W-TOKYO
Exception: {System.IO.IOException} Descripteur non valide
SDK trace: CreateSession Called. RequestHandle=1, PendingRequestCount=1
[16] SDK trace: Token #0 created. CreatedAt = 08:24:10.212 . Lifetime = 3600000
[7] Exception: {Opc.Ua.ServiceResultException} Error received from remote host: An error occurred verifying security.
3*Exception: {Opc.Ua.ServiceResultException} Error establishing a connection.
SDK trace: CreateSession Completed. RequestHandle=1, PendingRequestCount=0, StatusCode=Bad
Events starting with activity ID in [] may not necessarily be related to the current action.
TargetSite:
Message: Problem browsing OPC Unified Architecture nodes.
Source:
StackTrace:
TargetSite: