OPC UA Client cannot connect via the server hostname.

Lifted from:
not solved

Behavior of the new version:



Description of the behavior:
The FB UA_Connect from the L_IOCP_OpcUaClient library cannot be used to establish a client connection to an OPC UA server.

The FB returns "Bad_Timeout".

 

Conditions under which the behavior occurs:
The ServerEndpointUrl on the UA_Connect FB contains a host name, e.g. "opc.tcp://c5xx-MAC-Address".

A host name cannot currently be resolved into an IP address, even if dhcp or DNS are active.

Affected products:
Controller c550
Controller c520
Controller c430

Short-term measures, Recommendations, Rating:
Change the ServerEndpointUrl on the UA_Connect FB to an IP address, e.g. "opc.tcp://10.10.10.10".

Note for a secure connection:
If the connection is secure, the server certificate is checked. This checks whether the ServerEndpointUrl specified on the UA_Connect FB is contained in the server's certificate.

If an IP-based ServerEndpointUrl is specified on the UA_Connect FB, this check will fail in most cases.
The following short-term measures are available for this:
Deactivate the check on the UA_Connect FB using SessionConnectInfo.DisableServerHostnameCheck := true. From a security perspective, it must be checked whether this measure can be applied.

If it is a Lenze OPC UA server >= V1.13, IP-based addressing can be specified as an "alternative name" in the server certificate.
The endpoint URL is defined as follows using the index 0x2472/135 (see also technical description):

Bit 0 (value "1") = the host name

Bit 1 (value "2") = the IP address of IP engineering 1 (normal diagnostic interface) as the endpoint URL of the OPC UA server. The IP address of the certificate is automatically used. The active address can also be seen under 0x2452:001 (c5x0 and c4x0).

Bit 2 (value "4") = the IP address of IP engineering 2 (optional diagnostic interface - via switch) as the endpoint URL of the OPC UA server. The active address can also be seen under 0x2455:001 (only c4x0).

URL for linking this AKB article: https://www.lenze.com/en-de/go/akb/202300387/1/
Kontakt