- Posts: 102
- Thank you received: 3
Online Forums
Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions or issues. You do not have to own a commercial license in order to use the OPC Labs support. Our team is actively monitoring the forums, and provides replies as soon as possible.
Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible.
Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.
Do not use the Contact page for technical issues.
OPCUA: Automatic reconnect functionality is unstable in QuickOPC 5.84
Thank you
Please Log in or Create an account to join the conversation.
please rebuild and retest with QuickOPC 5.84.374, the issue should be fixed.
Best regards
Please Log in or Create an account to join the conversation.
thank you for the projects, I was now able to reproduce the issue.
I have a fix in the works. I am leaving the office now, and will be out for a week. I will not be able to move this into the production today, but there is a positive side to it: I will start a really long-running test before I leave, and plan to check it from time to time.
You should hear from me again towards end of the next week.
Best regards
Please Log in or Create an account to join the conversation.
Here you can find an archive containing a simple .net server/client application that reproduces the error.
The problem can be reproduced consistently the first time after rebuilding the solution. It also occurs from time to time when two OPC UA clients are running
Steps to reproduce
- Build and run the OPC UA server in Debug configuration.
- Build and run 1 or 2 OPC UA clients in Debug configuration.
- Go back to the OPC UA server console and enter: "restart 5 1"
- Only the "Disconnecting" event is fired.
- The OPC UA client loses the ability to reconnect (no "Disconnected" event).
[Moderator: attachment downloaded and removed, for privacy reasons upon OP's request]
Please Log in or Create an account to join the conversation.
The expected upon server restart, when monitored item subscriptions are present, is roughly as follows:
1. When the server shuts down, all subscribed monitored items receive an error through DataChangeNotification (.Exception is not null). The precise errors depends on many factors.
2. ServerConditionChanged event is raised, optionally with Disconnecting, but then certainly with Disconnected status.
3. QuickOPC should make reconnection attempts (observable through ServerConditionChanged going to Connecting etc.). Monitored items may receive additional errors to update their status. When a connection attempt succeeds, ServerConditionChanged with Connected should be raised, and all monitored items should eventually receive valid data.
I disagree with that the error message is misleading. it uses the words "the server may have rejected", clearly indicating that what the message is describes is just one of possible causes of the error. It would use the words "the server has rejected" if it was the only option.
I agree that QuickOPC should reconnect. I tried but I could not reproduce the issue. There are many ways the server can go about disconnecting/restarting, so something is different in your tests. I therefore have additional questions:
1. Which OPC Server are you using?
2. How do you restart it?
3. Is the server on your PC or on the network?
4. You reported that you get ServerConditionChanged event with Disconnecting. Do you also get one with Disconnected? (my understanding is that you do not Disconnected, but want to be 100% sure).
Regards
Please Log in or Create an account to join the conversation.
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
4. "OnServerConditionChanged" event is fired with EasyUAServerConditionChangedEventArgs.ConnectionState = "Disconnecting" and error 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."
"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'
Please Log in or Create an account to join the conversation.
