Solved

OPC-UA Extractor Issues

  • 5 July 2023
  • 6 replies
  • 159 views

Attn. @Jatin Sablok 

We found some issues with the Cognite pre-built OPC-UA extractor’s automatic re-connection to OPC server and to CDF as detailed in the test cases below.

OPC-UA server reconnect test: OPC server is online and Cognite OPC-UA extractor is started. Then OPC server is restarted. Cognite extractor loses connection to OPC server, and is unable to re-connect automatically even after OPC server comes back online later. Extractor service has to be manually restarted to re-connect to OPC server.

CDF reconnect test: Cognite OPC-UA extractor is started with network connection cable to CDF unplugged. Extractor log shows error messages. And extractor is unable to connect to CDF automatically even after network cable is plugged back in. Extractor service needs to be manually restarted to connect to CDF.

Logs from both tests are attached. Could you please review them and let us know if these are known issues?

icon

Best answer by Anand Sankar Aananthakrishnan 18 July 2023, 09:35

View original

6 replies

Userlevel 2

The OPC-UA side of this is often server related. The extractor has two modes of handling reconnects to the server, the default is to use OPC-UA reconnect. In my experience some servers are poorly compliant with the OPC-UA standard and fail to handle reconnects of this type. In this case, you may try setting `source.force-restart` in the extractor config file, which uses a less efficient form of reconnection.

On the CDF side I don’t really agree with your conclusions, after restart it seems that the extractor is able to push to CDF just fine. There is later an unrelated failure. I believe if you set the extractor logging to debug, you would see that it pushed data fine after reconnecting at 04:44. Note that it did produce 18540 timeseries successfully in CDF after you plugged it back in.

@Einar Omang Thanks for the suggestions. I was able to get the OPC-UA server reconnect to work by setting source.restart-on-reconnect in the extractor config file.

About the CDF issue, it does look like the extractor is able to push data to CDF for a few seconds initially after network reconnect as you said. But the extractor does go to failure mode after a few seconds and data upload to CDF stops at this point. I was able to reproduce this failure multiple times upon repeating the same test. So it seems to me that the failure may be connected to some condition brought about by the network interruption.

If you have any more suggestions about Cognite settings in the extractor config file that might help automatically reset the CDF connection parameters on reconnect, or any other ideas, please do let me know.

Also attaching debug logs from the most recent CDF re-connect test for your reference.

Userlevel 2
Badge +3

Hi Team,

Can someone help with this query?

Thanks,
Aditya

After some more testing, the observed issues with connection to CDF seem to be due to using two different network connections (one to OPC-UA server and another to the internet) on the system running the extractor. Looks like the extractor goes into error state only when the two connections are not unplugged and plugged back in at the same time during testing.

Need to run a few more tests on my end to confirm this. But the extractor seems to be able to reconnect to CDF when we unplug and re-plug both connections at the same time.

Userlevel 3

Hi @Anand Sankar Aananthakrishnan, just checking in if you need any further help?

The extractor seems to be doing okay under the right conditions. So as of now, this issue is resolved.

Reply