Opc Ua and Certificate

Hi, I have a problem with opc ua connection and certificate.
This is Console log problem.
I only try to connect with one item node and one opc client node.

Hi. Firstly, do not post screenshots for text.

  1. They are not searchable (for future readers with similar problems)
  2. They are harder to read than text
  3. I cannot copy + paste bits back to ask questions - having to screenshot screenshots is tedious.

So part of the issue might be permissions (storing things on desktop under a user account is never a good thing).

Secondly, do you see all the back slashes?

Try specifying file paths with a regular slash / e.g. c:/a_folder_every_user_can_access/my_cert.xyz

Sorry for mistakes.

I've changed all the back slashes and changed the directory but same situation.

08:25:07.874Z :client_secure_channel_layer   :545   xxxxx  <<<<<< _on_message_received  ERROR requestId= 1 Object response.responseHeader.requestHandle= 0                   ServiceFault
08:25:07.875Z :client_base_impl              :531   Inner create secure channel has failed  serviceResult = BadInternalError (0x80020000)
Client connect error: The connection may have been rejected by server,
Err = ( serviceResult = BadInternalError (0x80020000))
4 Sep 10:25:08 - [warn] [OpcUa-Client:651ed428d71aa592] OpcUaClientNode: Case A: Endpoint does not contain, 1==None 2==Sign 3==Sign&Encrypt, using securityMode: [3]
4 Sep 10:25:08 - [warn] [OpcUa-Client:651ed428d71aa592] OpcUaClientNode:         using securityPolicy: ["http://opcfoundation.org/UA/SecurityPolicy#Basic256Sha256"]
4 Sep 10:25:08 - [warn] [OpcUa-Client:651ed428d71aa592] OpcUaClientNode: Case B: UserName & password does not match to server (needed by Sign or SignAndEncrypt), check username: undefined and password: undefined
4 Sep 10:25:08 - [warn] [OpcUa-Client:651ed428d71aa592] OpcUaClientNode: Case C: With Sign you cannot use SecurityPolicy None!!
4 Sep 10:25:08 - [warn] [OpcUa-Client:651ed428d71aa592] OpcUaClientNode: Invalid endpoint parameters:
4 Sep 10:25:08 - [error] [OpcUa-Client:651ed428d71aa592] Client node error on:  error: ["Wrong endpoint parameters: {\"id\":\"01cb127cd282b3df\",\"type\":\"OpcUa-Endpoint\",\"_closeCallbacks\":[],\"_inputCallback\":null,\"_inputCallbacks\":null,\"wires\":[],\"_wireCount\":0,\"credentials\":{},\"endpoint\":\"opc.tcp://192.168.1.200:4840/\",\"securityPolicy\":\"Basic256Sha256\",\"securityMode\":\"SignAndEncrypt\",\"login\":false,\"none\":false,\"usercert\":true,\"userCertificate\":\"C:\\\\Users\\\\Administrator\\\\Desktop\\\\opcua\\\\user\\\\opcua-user-cert-20230901-105422.der\",\"userPrivatekey\":\"C:\\\\Users\\\\Administrator\\\\Desktop\\\\opcua\\\\user\\\\opcua-user-cert-20230901-105422.key.pem\",\"user\":null,\"password\":null}"]
4 Sep 10:25:08 - [error] [OpcUa-Client:651ed428d71aa592] Invalid endpoint
08:25:08.300Z :client_base_impl              :531   Inner create secure channel has failed ClientTCP_transport18: socket has been disconnected by third party
4 Sep 10:25:08 - [error] [OpcUa-Browser:3c737e93cc319db0] Browse node error!
08:25:09.761Z :client_base_impl              :531   Inner create secure channel has failed ClientTCP_transport19: socket has been disconnected by third party
Client connect error: The connection may have been rejected by server,
Err = (ClientTCP_transport19: socket has been disconnected by third party)
4 Sep 10:25:09 - [warn] [OpcUa-Client:8f68edae182ffeaf] OpcUaClientNode: Case A: Endpoint does not contain, 1==None 2==Sign 3==Sign&Encrypt, using securityMode: [3]
4 Sep 10:25:09 - [warn] [OpcUa-Client:8f68edae182ffeaf] OpcUaClientNode:         using securityPolicy: ["http://opcfoundation.org/UA/SecurityPolicy#Basic256Sha256"]
4 Sep 10:25:09 - [warn] [OpcUa-Client:8f68edae182ffeaf] OpcUaClientNode: Case B: UserName & password does not match to server (needed by Sign or SignAndEncrypt), check username: undefined and password: undefined
4 Sep 10:25:09 - [warn] [OpcUa-Client:8f68edae182ffeaf] OpcUaClientNode: Case C: With Sign you cannot use SecurityPolicy None!!
4 Sep 10:25:09 - [warn] [OpcUa-Client:8f68edae182ffeaf] OpcUaClientNode: Invalid endpoint parameters:
4 Sep 10:25:09 - [error] [OpcUa-Client:8f68edae182ffeaf] Client node error on:  error: ["Wrong endpoint parameters: {\"id\":\"548f5c3b94ed54b4\",\"type\":\"OpcUa-Endpoint\",\"_closeCallbacks\":[],\"_inputCallback\":null,\"_inputCallbacks\":null,\"wires\":[],\"_wireCount\":0,\"credentials\":{},\"endpoint\":\"opc.tcp://192.168.1.200:4840/HEIDENHAIN/NC\",\"securityPolicy\":\"Basic256Sha256\",\"securityMode\":\"SignAndEncrypt\",\"login\":false,\"none\":false,\"usercert\":true,\"userCertificate\":\"C:/Users/Administrator/AppData/Roaming/node-red-opcua-nodejs/Config/UserPKI/own/certs/opcua-user-cert-20230901-105422.der\",\"userPrivatekey\":\"C:/Users/Administrator/AppData/Roaming/node-red-opcua-nodejs/Config/UserPKI/own/private/opcua-user-cert-20230901-105422.key.pem\",\"user\":null,\"password\":null}"]
4 Sep 10:25:09 - [error] [OpcUa-Client:8f68edae182ffeaf] Invalid endpoint
4 Sep 10:25:10 - [error] [OpcUa-Server:itc640] Disconnect error:

You must provide username & password as Sign means you want to use them.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.