Occasionally got “The operation is not available because the session is in the 'Reactivating' state.
Stack Trace: at UnifiedAutomation.UaClient.Session.CheckSessionState(State state)”.
What does the “Reactivating state” mean at server side? How to debug the root cause which caused the TCP connection session aborted? When this happens, the client software is up and running but lost the connection with the server. Thanks for help.
The issue of session in the 'Reactivating' state.
Moderator: uasdknet
-
- Jr. Member
- Posts: 2
- Joined: 06 Jan 2015, 19:49
- Support Team
- Hero Member
- Posts: 3068
- Joined: 18 Mar 2011, 15:09
Re: The issue of session in the 'Reactivating' state.
Reactivating a session happens on the client side. The server keeps a session until the configured session lifetime expires.
If the connection was lost the client tries to recover the last session on the server by calling activate session.
If you turn on the trace on the client side you should see when the tcp connection was interupted:
12:56.44|0014|01|2|[Bad] Unexpected error during OnReadComplete,|SocketException|An existing connection was forcibly closed by the remote host.
12:56.44|0014|01|4|TCPCLIENTCHANNEL Shutdown Socket=00000638, ChannelId=1383583805, TokenId=1, Reason=[BadTcpInternalError]An existing connection was forcibly closed by the remote host.
12:56.49|0018|02|1|[BadDecodingError] Unexpected error during Session.WatchdogRead.|StatusException|Could not process OpenSecureChannelResponse.
12:56.54|0020|02|4|CONNECTION STATUS CHANGED: ConnectionErrorClientReconnect (OnWatchdogCycle) [BadConnectionClosed]
If you find this kind of information you know you have a network problem or the server has stopped working.
Best Regards,
Unified Automation Support Team
If the connection was lost the client tries to recover the last session on the server by calling activate session.
If you turn on the trace on the client side you should see when the tcp connection was interupted:
12:56.44|0014|01|2|[Bad] Unexpected error during OnReadComplete,|SocketException|An existing connection was forcibly closed by the remote host.
12:56.44|0014|01|4|TCPCLIENTCHANNEL Shutdown Socket=00000638, ChannelId=1383583805, TokenId=1, Reason=[BadTcpInternalError]An existing connection was forcibly closed by the remote host.
12:56.49|0018|02|1|[BadDecodingError] Unexpected error during Session.WatchdogRead.|StatusException|Could not process OpenSecureChannelResponse.
12:56.54|0020|02|4|CONNECTION STATUS CHANGED: ConnectionErrorClientReconnect (OnWatchdogCycle) [BadConnectionClosed]
If you find this kind of information you know you have a network problem or the server has stopped working.
Best Regards,
Unified Automation Support Team
-
- Jr. Member
- Posts: 2
- Joined: 06 Jan 2015, 19:49
Re: The issue of session in the 'Reactivating' state.
Thanks Support Team!
How to turn on the trace log at the OPC UA? Couldn't find any document regarding the trace log.
How to turn on the trace log at the OPC UA? Couldn't find any document regarding the trace log.
- Support Team
- Hero Member
- Posts: 3068
- Joined: 18 Mar 2011, 15:09
Re: The issue of session in the 'Reactivating' state.
There's an xml configuration file called App.config you can add to your project.
http://documentation.unified-automation ... ureProduct
In there you find all the trace settings.
Best Regards,
Unified Automation Support Team
http://documentation.unified-automation ... ureProduct
In there you find all the trace settings.
Best Regards,
Unified Automation Support Team
-
- Jr. Member
- Posts: 1
- Joined: 14 Jul 2020, 20:46
Re: The issue of session in the 'Reactivating' state.
This is very helpful to find out why the connection was lost. I am interested in how to recover from this.
I got this error when debugging the application in Visual Studio. the watchdog timed out and the connection status is 'ConnectionErrorClientReconnect'. Can I test the 'Reactivating' state? What to do next?
Thanks,
Remco
I got this error when debugging the application in Visual Studio. the watchdog timed out and the connection status is 'ConnectionErrorClientReconnect'. Can I test the 'Reactivating' state? What to do next?
Thanks,
Remco
-
- Full Member
- Posts: 7
- Joined: 19 Jul 2018, 10:30
Re: The issue of session in the 'Reactivating' state.
Hello Team,
Thanks in advance.
Is there any knowledgebase where possible network problems or server communication issues are described and published? If I use embedded OPC UA server, e.g. Siemens S7-1500, I'm not able to detect a reason of disconnection by remote host. The same thing applies in case of a network issue. When a session is closed an re-created, I can see it on the TCP layer in Wireshark, but how do I determine what is a root cause of network issue related to the session? The network communication works flawlessly at a given time for other applications.Support Team wrote: ↑12 Aug 2015, 14:06If you find this kind of information you know you have a network problem or the server has stopped working.
Thanks in advance.