OPCFoundation / UA-.NETStandard

OPC Unified Architecture .NET Standard
Other
1.95k stars 945 forks source link

Reference UAClient reconnect failure #2221

Open DvdKhl opened 1 year ago

DvdKhl commented 1 year ago

Type of issue

Current Behavior

I'm using the UAClient class to connect to an industrial device which I do not have control over.
At some unknown point the connection is lost and fails to reconnect.

The sequence is mostly the same:

Expected Behavior

Automatically reconnect without having to create a new Session manually.

Steps To Reproduce

Cannot reproduce reliably

  1. Open Program.cs in sample and replace connection/node details
  2. Compile and run Sample
  3. Wait for Successful connection and DataEvents
  4. Turn Opc Server Device off and wait for error messages
  5. Turn Opc Server Device on again
  6. Wait for successful reconnect

OPCReconnectFailure.zip

Environment

- OS: Debian
- Environment: Visual Studio 2022 17.6.4
- Runtime: .NET6
- Nuget Version: 1.4.371.91
- Component: Opc.Ua.Client
- Server: Industrial Device (Unknown Opc Server Software)
- Client: Reference UAClient

Anything else?

Full Logs: OpcReconnectFailure.csv

mregen commented 1 year ago

thanks @DvdKhl for sharing the bits, not obvious whats going on, need to take a deeper look.

raulpsj commented 1 year ago

Hi @DvdKhl,

Try version 1.4.367.100, I think it's the same problem #1796

galigula2 commented 8 months ago

Hi, what it the status of this? And are there viable workarounds e.g. re-creating the UAClient when this starts to happen?

I'm seeing something similar with build against .NET 8 and running in a Linux machine.