Error -356705: OPC UA Toolkit Failed on NI Linux RT to Create Certificate Store

Updated Aug 3, 2021

Reported In

Software

  • LabVIEW OPC UA Toolkit
  • NI Linux RT System Image

Operating System

  • LabVIEW Real-Time (NI Linux Real-Time)

Issue Details

I have configured an OPC UA server in my cRIO using LabVIEW but while trying to create certificates I am facing the following error:

Error -356705 occurred at NI OPC UA Utility.lvlib:Create Certificate.vi
Possible reason(s):
OPC UA Toolkit: Failed to create certificate store because access is denied.
 
 

Solution

There is a known issue where the RAD utility sometimes fails to create the OPCUA folder upon reimaging a NI LinuxRT controller. To create the folder and assign it appropriate permissions, complete the following steps:

 

1) Access the shell on your controller.

2) Navigate to the following directory: /var/local/natinst/certstore/

   Note: This directory may also be located in: /etc/natinst/share/certstore/

3) To create the missing OPC UA directory, enter the following command: mkdir OPCUA

4) To change the directory permissions, enter the following command: chmod 777 OPCUA

   Note: This gives universal access permissions to this directory for any type of user. Read more about file permissions in the NI Linux Real-Time Security User Guide(page 28) .

5) Exit out of the shell.

      You should now be able to initialize an OPC UA server on your controller.

Additional Information

After using RAD utility to reimage NI Linux Real-Time controller the OPCUA folder might be missing as well and using the LabVIEW OPC UA Toolkit to initialize an OPC UA server on controller, you will print the same error. 
In this case please follow the steps described on Solution section.