- Posts: 37
- 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. You do not have to be a licensed user of our product.
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.
- Forum
- Discussions
- QuickOPC-UA in .NET
- Connections, Reconnections, Certificates
- Unable to reconnect to OPC Server
Unable to reconnect to OPC Server
2. Using the latest NuGet package of version 5.54.1026.
3. Have noticed that many events are written several times. Do not know the reason for this. We see that e.g. ServerConditionChanged are called more than once for each new server status on the same server (ref. earlier post where we are filtrating in ServerConditionChanged on the correct server. One server per instance of EasyUAClient).
4. Running with debugger attached. Could this be realated to www.opclabs.com/forum/ua-connections/2588-badsessionclosed-c...f-server-when-subscribing#7193?
5. Logging all information from LogEntry, but filtrated with server (ref. 1).
6. Noticed the 10 minute limit. Not exactly sure how long, but passed 10 mins with good margin. No change.
Please Log in or Create an account to join the conversation.
thank you for the files.
I have some questions:
1. Are you running on .NET Core, or .NET Framework? If on .NET Core, which operating system? I have to ask because you have also not provided the LogEntry notifications from the start of the program, which contain all of this. [note to myself: this question relates to the appearance of BadNotConnected status code]
2. Please confirm that you are running QuickOPC version 2018.3. Again that would be in the log entries at the beginning, but I do not have them.
3. It seems that each notification is written exactly 5 times in the files. I can "filter it" out, but I just want to not whether you are aware of it, and why is it. Aren't you hooking multiple times to the same static event?
4. When the logs were taken, were you running with debugger attached, or without?
5. Are you logging just Warning/Error kinds of notifications in LogEntry, or are Information notifications also included? (I do not see them, so I do not know whether they were not generated, or whether they were generated but not included in the log file).
6. Have you tried to wait very long (such as over 20 minutes) to see if there is still no recovery? What happens then? The reason I am asking this is that there are various timeout periods, and most of them are quite short, but the default for the so-called OperationTimeout is 10 minutes I believe, so under rare circumstances this can slow down things. I am almost sure that this is not the case here, but want to verify it anyway.
[Note to myself for possible next troubleshooting step, depending on the answers: deadlock analysis, extended tracing + wireshark]
Please Log in or Create an account to join the conversation.
Timeline for logfile:
20.13 -> Connect all ok
20.14 -> Disconnect from VPN
20.16 -> Reconnect VPN
Please Log in or Create an account to join the conversation.
Best regards
Please Log in or Create an account to join the conversation.
For the decision on further troubleshooting direction, I need to know whether new events, event with ""OPC-UA client session is not available when connecting the client subscription", continue to come without ever stopping, or whether that have stopped as well.
Please Log in or Create an account to join the conversation.
[Warning] -> Output from EasyUAClient.LogEntry
[Error] -> Exception text from DataChangeNotification and ServerConditionChanged filtrated to not show "OPC-UA client session is not available when connecting the client subscription"
Timeline:
09.49 -> Startup and subscription OK
09.50 -> VPN disconnected (lost connection to OPC Server)
09.52 -> Connected VPN client (connection to OPC Server available), but no new entries in the log except "OPC-UA client session is not available when connecting the client subscription". Never got any new data from that server. After restart of EasyUAClient everything works as expected.
Please Log in or Create an account to join the conversation.
Have a log file with all exceptions from DataChangeNotification and ServerConditionChanged when disconnecting. Can I send this by email (not sure if I would like the file to be on an online forum).
Please Log in or Create an account to join the conversation.
What are you seeing in the DataChangeNotification event notifications observed when this happens?
- What is the first exception sent through DataChangeNotification when you disconnect in this case?
- Do you get further notifications (with different exceptions possibly) after the first one, or do they stop altogether (on the particular EasyUAClient instance)?
- Please confirm that connections through other EasyUAClient objects are behaving normally even if this happens.
Ideally, send a log that shows all DataChangeNotification-s, all ServerConditionChanged notificitaions, and also the static EasyUAClient.LogEntry notifications, when this happens.
Regarding the ServerConditionChanged : What you described is by design. The EasyUAClient object, in its default configuration (when its Isolated property equals to 'false'), acts as a broker, so in fact, if you had EasyUAClient instances A and B, and instance A connects to servers 1 and 2 and instance B connects to servers 2 and 3, there will be just one connection to server 2 from both. This, however, also means that they notifications about connections and disconnections are common and affect them both. Of course you can say they if you are not sharing, that is you have instance A connecting to just server 1 and instance B connecting to just server 2, that such behavior does not seem logical, but it has to be that way due to the possibility of sharing. If you set the Isolated property on the EasyUAClient to 'true', it will always maintain its own connections - and also it will only see its "own" ServerConditionChanged notifications. But, if two or more such instances with Isolated = true connect to the same server, you will end up with two or more OPC UA sessions to that server, which is not efficient and can cause problems.
Best regards
Please Log in or Create an account to join the conversation.
Note: The ServerConditionChanged callback is set on an instance of EasyUAClient, but acts like a static function. We (sometimes) get callback on the wrong EasyUAClient object and needs to verify the EasyUAServerConditionChangedEventArgs.EndpointDescriptor to perform the correct state change on the correct object.
Please Log in or Create an account to join the conversation.
- Forum
- Discussions
- QuickOPC-UA in .NET
- Connections, Reconnections, Certificates
- Unable to reconnect to OPC Server