- Posts: 8
- Thank you received: 0
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.
OPC UA can't reconnect properly when server goes down and then up
I will do more tests over the weekend and we will meet as planned.
Thanks for your support.
Please Log in or Create an account to join the conversation.
thanks for the quick reply.
Yes, I meant 5.84.434, I do not know what my fingers were doing....
The "got stuck" case worries me and will look at it; but obviously there wasn't enough time to test the new build thoroughly.
Should we meet as planned?
Regards
Please Log in or Create an account to join the conversation.
I did a test with the latest available version in nuget 5.84.434. (I didnt find 5.84.384, probably typo?)
I can see it reconnects faster and stays connected, I can see it's more "calm" in the Output debug window in VS2026.
So I would say it looks much better.
I run the application 5x with starting/stopping opc server. But in one case it got stuck, it was not able to reconnect and I had to kill the process.
Please Log in or Create an account to join the conversation.
I was finally able to reproduce the issue - or at least something that is close to it. And I have made a fix.
Can you please rebuild and retest with QuickOPC 5.84.384, now available on nuget.org and our Web site. If you cannot retest before our planned meeting, we should postpone the meeting,
Best regards
Please Log in or Create an account to join the conversation.
Unfortunately I am still unable to reproduce the issue, even with almost the same app. For record, it is not precisely the same, because
1) it does not use PackageReference and the packages were not included so I had to recreate all references
2) apparently the app from the video is slightly different because has some additional text output that is not in the source code.
3) Could not use "heslo" as my KepServerEX requires 14 characters minimum, so I changed it
4) [no KepServerEX config was provided so I had to hand-create the MAINPROGRAMNAME string tag]
I can see from the Wireshark logs that there is something that causes QuickOPC to cancel the requests and close the sessions by itself, *with precisely 30 seconds frequenccy:
Do you have some setting that uses this frequency, OR something on your system that runs with this frequency?
Regards
Please Log in or Create an account to join the conversation.
here is the video where you can see version 5.80.347 vs 5.84.416 reconnect issue.
(as the verification I'm using prosys OPC client )
Please Log in or Create an account to join the conversation.
I can reproduce it with the simple command line app. Please see attachment.
Please Log in or Create an account to join the conversation.
- yes it happens always when I shut down the OPC server (Kepserver EX6.6)
- it will never recover from this state
- .NET4.8
- it has started after update from 5.80.347 => to the latest
- it happens only when I'm using subscribe mode
code snippets:
public void UASubscribeMultipleItems()
{
easyUAClient.DataChangeNotification += UAEventChanged;
m_handleArray = easyUAClient.SubscribeMultipleMonitoredItems(m_UA_subscrArgumentsArray);
}public void UAEventChanged(object sender, EasyUADataChangeNotificationEventArgs args)
{
Value val;
m_newData = true;
if (args.Succeeded)
{
for (int i = 0; i < m_allOPCValues.opcTags.Count; i++)
{
string opcTag = args.Arguments.NodeDescriptor.NodeId;
int state = (int)args.Arguments.State;
if (m_allOPCValues.state.ElementAt(i) == state)
{
string typeName = args.AttributeData.ValueType.Name;
if (args.AttributeData.ValueType.IsArray)
val = new Value((System.Array)args.AttributeData.Value);
else
val = new Value(args.AttributeData.Value.ToString());
m_allOPCValues.errValue = "";
m_allOPCValues.hasValue = 1;
m_allOPCValues.value = val;
}
}
}
else
{
for (int i = 0; i < m_allOPCValues.opcTags.Count; i++)
{
string opcTag = args.Arguments.NodeDescriptor.NodeId;
int state = (int)args.Arguments.State;
if (m_allOPCValues.state.ElementAt(i) == state)
{
m_allOPCValues.errValue = args.Exception.ToString();
m_allOPCValues.hasValue = 0;
m_allOPCValues.value = new Value("");
}
}
}
}
Thank you for your help.
Please Log in or Create an account to join the conversation.
I tried to reproduce the issue, but unfortunately I could not. I used our OpcCmd, and then I made my own simple application.
I can, however, confirm weird things in the files you have sent. The WireShark trace actually appears OK (the application succeeds in reading and subscribing), while at the same time, an error appears to be reported to your code.
Questions:
1. Does the problem happen always (i.e. every time you shut down the server and then start it again, you get the problem), or just sometimes?
2. If you wait longer time (e.g. half an hour), does it ever recover, or is an application restart needed?
3. Which .NET runtime are you on?
4. Can you reproduce with my code? (file attached).
5. If not, can you modify the code or provide additional information, or steps needed, for making the problem reproducible?
Best regards
Please Log in or Create an account to join the conversation.
after update to the latest version (5.84.416) I can see that subscribed client can't reconnect properly.
Race condition: is to stop the OPC server and then start it again.
Result: opc clients reconnects but is keep getting exceptions.
.48.31.0483:2054: OPC Client: OPC ERR: <ns=2;s=Channel1.Device1.MAINPROGRAMNAME || OpcLabs.EasyOpc.UA.Engine.UAEngineException: OPC-UA client session is not available when connecting the client subscription. Session error: "OPC UA service result - {BadConnectionClosed}. The network connection has been closed.
+ The client method called (or event/callback invoked) was 'DataChangeNotification'."
+ The client method called (or event/callback invoked) was 'DataChangeNotification'.>
D:23.48.34.0540:3057: OPC Client: OPC ERR: <ns=2;s=Channel1.Device1.MAINPROGRAMNAME || OpcLabs.EasyOpc.UA.UAServiceException: OPC UA service result - {BadConnectionClosed}. The network connection has been closed.
+ The client method called (or event/callback invoked) was 'DataChangeNotification'.>
D:23.48.36.0586:2046: OPC Client: OPC ERR: <ns=2;s=Channel1.Device1.MAINPROGRAMNAME || OpcLabs.EasyOpc.UA.Engine.UAEngineException: OPC-UA client session is not available when connecting the client subscription. Session error: "OPC UA service result - {BadConnectionClosed}. The network connection has been closed.
+ The client method called (or event/callback invoked) was 'DataChangeNotification'."
+ The client method called (or event/callback invoked) was 'DataChangeNotification'.>
Please Log in or Create an account to join the conversation.
