You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In UAClient.cs on line 200, this fails when trying to connect to the same OPCUA server in succession.
Here is the stack trace:
Opc.Ua.ServiceResultException: Error establishing a connection:BadNotConnectedatOpc.Ua.Bindings.ChannelAsyncOperation`1.End(Int32timeout,BooleanthrowOnError)
at Opc.Ua.Bindings.UaSCUaBinaryClientChannel.EndSendRequest(IAsyncResultresult)
at Opc.Ua.Bindings.UaSCUaBinaryTransportChannel.EndSendRequest(IAsyncResultresult)
at Opc.Ua.Bindings.UaSCUaBinaryTransportChannel.SendRequest(IServiceRequestrequest)
at Opc.Ua.DiscoveryClient.GetEndpoints(RequestHeaderrequestHeader,StringendpointUrl,StringCollectionlocaleIds,StringCollectionprofileUris,EndpointDescriptionCollection&endpoints)
at Opc.Ua.DiscoveryClient.GetEndpoints(StringCollectionprofileUris)
at Opc.Ua.Client.CoreClientUtils.SelectEndpoint(ApplicationConfigurationapplication,StringdiscoveryUrl,BooleanuseSecurity,Int32discoverTimeout)
at Opc.Ua.Client.CoreClientUtils.SelectEndpoint(ApplicationConfigurationapplication,StringdiscoveryUrl,BooleanuseSecurity)
Expected Behavior
I expect to be able create as connections as my OPCUA server will allow without any errors. I don't expect it to error during endpoint discovery.
Steps To Reproduce
Replicate by setting up two unit tests each connecting to the same OPCUA server, the first conneciton will succeed, the second connection will fail. If run separately both will succeed.
Also interesting is adding a Thread.Sleep of one second in the Dispose method prevents this error
Environment
- OS: Windows 11
- Environment:
- Runtime:x64- Nuget Version: 1.5.375.457
- Component:
- Server:
- Client: x
Anything else?
No response
The text was updated successfully, but these errors were encountered:
@benjsherman Thank you for reporting a potential bug. Please provide the exact sequence of function calls to the UAClient.cs or even better a test project.
Solution file is under Code/OPCUACLient/OPCUAClient.sln
Failing function call is documented in OpcDataService.cs Line 129
OpcFoundationTest.cs has two test that when ran in batch, one will fail.
There are two lines to sleep after doing the OPCUA read that when uncommented, permits both tests to pass when run in batch.
You'll need a valid OPCUA server to connect to and this test scenario was against an un-signed, un-secured, no credential OPCUA server.
Type of issue
Current Behavior
In UAClient.cs on line 200, this fails when trying to connect to the same OPCUA server in succession.
Here is the stack trace:
Expected Behavior
I expect to be able create as connections as my OPCUA server will allow without any errors. I don't expect it to error during endpoint discovery.
Steps To Reproduce
Replicate by setting up two unit tests each connecting to the same OPCUA server, the first conneciton will succeed, the second connection will fail. If run separately both will succeed.
Also interesting is adding a
Thread.Sleep
of one second in the Dispose method prevents this errorEnvironment
Anything else?
No response
The text was updated successfully, but these errors were encountered: