Why do I get an error verifying security when trying to connect to an OPC UA server using the `connect` function?

6 visualizzazioni (ultimi 30 giorni)
I have succesfully created an OPC UA client object in MATLAB using the opcua() function in Industrial Communication Toolbox. However, I get the following error when trying to connect this client to the server using the connect() function.
An error ocuured verifying security.

Risposta accettata

MathWorks Industrial Communication Toolbox Team
This error indicates that there was a problem during the verification of security measures while establishing a secure connection between an OPC UA client and server. This error typically occurs during the security handshake process, where the OPC UA client and server exchange security information and validate each other's credentials.
Some of the common causes for this error message along with potential fixes are as follows:
Certificate Issues
It could be due to problems with the X.509 certificates used for authentication. This may include expired/revoked certificates, or client certificate not being trusted by the server (a common cause).
To fix this, ensure that the MATLAB client certificate is manually marked as trusted by the OPC UA Server. For e.g. follow the steps here to mark the MATLAB client certificate as trusted in a Prosys OPC UA Simulation server.
Note: Some servers do not have a UI way to do this. In such cases, you need to manually copy the certificates (user identity or application instance) from the "rejected" folder to the "certs"/"trusted" folder of the server's certificate store.
Security Policy Mismatch
The server may have a different security policy configured than the client and both are unable to negotiate a compatible security policy during the handshake process. To fix this, adjust the server security policies if necessary to match the client security policy.
Incorrect Security Configuration
There might be an error or misconfiguration in the security settings of the server. This could include incorrect encryption algorithms, invalid security modes, or unsupported security features. Adjust the server security configurations to fix this.
Network or Connectivity Issues
The error could be also be due to network problems, such as a firewall blocking communication or connectivity issues between the client and server. Ensure that there are no network issues or firewalls blocking the communication between the client and server.
In addition, reviewing the OPC UA server logs in more detail may also provide additional information about the specific cause of the security verification error.

Più risposte (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by