Dear support:
I have a question that has been bothering me. I would like to ask for help again. The result of the problem is: Error number 6401
After the abnormal machine was restored, it failed to function normally, and the message "OPC-UA client session is not available when connecting the client subscription" was displayed. ErrorId: OpcLabs.UAEngine=6401
but, UaExpert can instantly connect normally!!!
client.exe appsettng.json parameter of Ua
"OpcUASetting": {
"RetryConnectDelay": 300,
"EndpointSelectionTimeout": 30000,
"SessionConnectTimeout": 20000,
"SessionParametersRetrialDelay": 60000,
"OperationTimeout": 20000,
"CloseTimeout": 5000,
"ServerShutdownRetrialDelay": 60000
}
I used the Unsubscrible function of EasyUaClient to unsubscribe from the abnormal point in Opcserver.
After a delay of 5 minutes, I used the API interface to let Client.exe re-initiate the subscription to the target machine point,
but still could not restore normal communication.
I'd like to receive official confirmation:
1) The use of customized communication session and reconnection interval parameters takes into account factors such as the scenario of a single Client.exe connecting to over 300 OpcServers simultaneously and the number of abnormal machines, and is also to ensure that normal machine operation is not affected. However, I'm still unsure whether these customized parameters I'm using locally achieve my desired results, or whether my understanding is correct.
2) Regarding errors such as "OPC-UA client session is not available when connecting the client subscription."
ErrorId: OpcLabs.UAEngine=6401," is there a way to manually clear these invalid sessions? I haven't thoroughly read the underlying EasyUaClient source code, so I don't know.
Are there better ways to resolve and clear sessions, allowing these seemingly abnormal machines to reconnect, subscribe, and function?
detail Log info:
I've implemented a client.exe control application using C# and NetCore 8.0, connecting to the IP addresses of over 300 remote Opc Servers. The current problem is: 1) Some OpcServers (remote devices, machines) experience IP communication errors, which are detected as shutdown or network anomalies. This period can be quite long, and the anomalies are clear: some machines on-site are undergoing maintenance, downtime, or power outages. 2) When these few abnormal machines (opc Server IP) have returned to normal, third-party tools can be used to communicate with them normally, but my own Client.exe cannot connect. The following is one of the log snippets
EndpointDescriptor : opc.tcp://10.116.30.162:4840
NodeDescriptor : ns=3;s="Mixed Fluid Data"."DosingManual"[0]."DISet"
StatusInfo : Unknown
StatusCode :
Succeeded : False
DiagnosticsCount : 0
DiagnosticsSummary :
ErrorId : OpcLabs.UAEngine=6401
Exception :
Exception.Message
OPC-UA client session is not available when connecting the client subscription.
+ The client method called (or event/callback invoked) was 'DataChangeNotification'.
EndpointDescriptor:opc.tcp://10.116.30.162:4840,NodeDescriptor:NodeId="ns=3;s="Dosing Data"."DosingManual"[0]."DISet""
Because Client.exe cannot be restarted at will,
an internal interface is opened to cancel the subscription of the device with the specified IP,
re-subscribe it again, and try to restore it. However, it still cannot work normally.
When re-subscribing, the subscribledId is also received, and the error is displayed as 6401.
Looking forward to your reply
Simon.Yu
20250910 11:00