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
Scenario 1: Downstream Server Disable Network Adapter
Test:
Configure Aggregator (dev host machine) to connect to the OPCF reference server (VM running on dev host)
Start Aggregator (Debug with IDE) and verify connection/steady state behavior of “metadata” session
Disable VM network adapter and observe behavior of metadata session
Wait until the Aggregator keep alive status is “late”
Enable VM network adapter and observe behavior of metadata session
Results:
TL;DR - Once the adapter is reenabled, the Aggregator continues to attempt to “renew” the secure channel. However, the OpenSecureChannelRequest fails with a ServiceFault (BadTcpSecureChannelUnknown). See “opcf-reference-aggregator-southbound-disable-adapter-opcf-reference-server.pcapng”, attached (as zip).
Note: Using UA-.NETStandard tag 1.4.368.53 and UA-.NETStandard-Samples tag preview on commit e17387d
The bug fix is available in UA-.NETStandard tag 1.4.368.53 and UA-.NETStandard-Samples tag preview on commit e17387d.
Results:
TL;DR - Aggregator has a keep alive handler with logic to reestablish the Session once the keep alive is “late”. The logic is never executed because the secure channel cannot be reestablished when the downstream server is restarted. This seems to be because the aggregator attempts to ‘renew’ the channel instead of recreating it.
Technical Details:
In steady state (Aggregator connected to OPCF reference server), the keep alive timer calls BeginRead, which increments m_outstandingRequests to 1. The counter is decremented to 0 when the read response is successfully received.
When the downstream server is shutdown, Session.OnKeepAlive calls BeginRead and the operation fails with an exception ("Could not send keep alive request: Opc.Ua.ServiceResultException BadConnectionClosed). AsyncRequestStarted is never called, so m_outstandingRequests is never incremented.
After the downstream has been restarted, the channel cannot re-establish a secure channel (it's trying to 'renew' rather than create a fresh secure channel). Session.OnKeepAlive continues to call BeginRead, which continues to throw the same exception: Could not send keep alive request: Opc.Ua.ServiceResultException BadConnectionClosed. Again, AsyncRequestStarted is never called, and m_outstandingRequests is never incremented.
The text was updated successfully, but these errors were encountered:
Hi @pcameron-ptc, I think the case you describe may not be covered by the fix #1802.
Thanks for the detailed writeup to repro, we will check if this is fixed.
Thank you @mregen . I pulled down UA-.NETStandard branch release/1.4.368 with the recent reconnect changes (i.e. #1802) and updated the Aggregation sample to reference my local build of the stack. I did not observe any change in behavior in regards to this defect.
Scenario 1: Downstream Server Disable Network Adapter
Test:
Results:
TL;DR - Once the adapter is reenabled, the Aggregator continues to attempt to “renew” the secure channel. However, the
OpenSecureChannelRequest
fails with aServiceFault
(BadTcpSecureChannelUnknown
). See “opcf-reference-aggregator-southbound-disable-adapter-opcf-reference-server.pcapng”, attached (as zip).Note: Using UA-.NETStandard tag
1.4.368.53
and UA-.NETStandard-Samples tagpreview
on commit e17387dWireshark Capture:
opcf-reference-aggregator-southbound-disable-adapter-opcf-reference-server.zip
Scenario 2: Downstream Server Stop/Start
Test:
Preliminary Note:
This investigation required a OPCF UA stack bugfix for the following issues:
The bug fix is available in UA-.NETStandard tag
1.4.368.53
and UA-.NETStandard-Samples tagpreview
on commit e17387d.Results:
TL;DR - Aggregator has a keep alive handler with logic to reestablish the Session once the keep alive is “late”. The logic is never executed because the secure channel cannot be reestablished when the downstream server is restarted. This seems to be because the aggregator attempts to ‘renew’ the channel instead of recreating it.
Technical Details:
In steady state (Aggregator connected to OPCF reference server), the keep alive timer calls BeginRead, which increments m_outstandingRequests to 1. The counter is decremented to 0 when the read response is successfully received.
When the downstream server is shutdown,
Session.OnKeepAlive
callsBeginRead
and the operation fails with an exception ("Could not send keep alive request:Opc.Ua.ServiceResultException BadConnectionClosed
).AsyncRequestStarted
is never called, som_outstandingRequests
is never incremented.After the downstream has been restarted, the channel cannot re-establish a secure channel (it's trying to 'renew' rather than create a fresh secure channel).
Session.OnKeepAlive
continues to callBeginRead
, which continues to throw the same exception: Could not send keep alive request:Opc.Ua.ServiceResultException BadConnectionClosed
. Again,AsyncRequestStarted
is never called, andm_outstandingRequests
is never incremented.The text was updated successfully, but these errors were encountered: