.NET Core 8, QuickOPC v.5.84.294 and v5.84.192.Scenario:
1. UA client is initialized with property Isolated = true, EasyUAClientCore.SharedParameters.EngineParameters.ReconnectPeriod is explicitly set to 2000
2. Client is connected and active subscription exists for several OPC UA items
3. Quickly restart the OPC UA server4. "OnDataChangeNotification" event (sometimes) is fired for all subscribed items with error like:
"OpcLabs.EasyOpc.UA.Engine.UAEngineException: OPC-UA client session is not available when connecting the client subscription. Session error: "OPC UA service result - {BadSecureChannelClosed}. [80860000]."
and additional
misleading message like
"The server may have rejected the connection because it does not trust the client (e.g. certificate problem); check the diagnostics on the server side, if possible."
4. "OnServerConditionChanged" event is fired with EasyUAServerConditionChangedEventArgs.ConnectionState = "Disconnecting" and error like
"Error: OpcLabs.UAEngine=4704 The OPC-UA server has shut down or is in the process of shutting down. The application is releasing all connections to this server. The application will try to reconnect to the server after a configurable period.
+ The client method called (or event/callback invoked) was 'ServerConditionChanged'.
OpcLabs.EasyOpc.UA.Engine.UAEngineException: The OPC-UA server has shut down or is in the process of shutting down. The application is releasing all connections to this server. The application will try to reconnect to the server after a configurable period.
+ The client method called (or event/callback invoked) was 'ServerConditionChanged'."
5. No more reconnect attempts happened. "ServerConditionChanged" event or "OnDataChangeNotification" are never invoked again regardless of server state. No TCP communication with the server. If not reproduced, go to (step 3).
The issue is
not reproducible with QuickOPC v.5.83.1181, where ServerConditionChanged is subsequently fired with 'Disconnected', then 'Connecting', then 'Connected'