mikakaraila / node-red-contrib-opcua

A Node-RED node to communicate OPC UA. Uses node-opcua library.
Other
217 stars 197 forks source link

server_selfsigned_cert_2048.pem error with docker #715

Closed jpseini-bh closed 4 months ago

jpseini-bh commented 4 months ago

Good day

I am running Node-Red in a docker container locally (using Docker Desktop) and have installed node-red-contrib-opcua-server v1.1.1.

If I include a "Compact Server" node in the flow and deploy, I get the following error in the Node-Red debug window: "Error: Certificate file must exist :/data/node_modules/node-red-contrib-opcua-server/certificates/server_selfsigned_cert_2048.pem"

Looking at the logs of the container, I see the following:

[warn] [opcua-compact-server:2e2ece9ee8531ec0] Error: Certificate file must exist :/data/node_modules/node-red-contrib-opcua-server/certificates/server_selfsigned_cert_2048.pem
########################################### OPENSSL ERROR ###########################################
CWD = /usr/src/node-red
Command failed: "openssl" req -new -sha256  -text  -extensions v3_selfsigned  -config "/usr/src/node-red/.config/node-opcua-default-nodejs/PKI/own/openssl.cnf.tmp" -key "/usr/src/node-red/.config/node-opcua-default-nodejs/PKI/own/private/private_key.pem" -out "/data/node_modules/node-red-contrib-opcua-server/certificates/server_selfsigned_cert_2048.pem.csr" -subj "/C=FR/L=Orleans/O=Sterfive/CN=NodeRED-Compact@04197febaa04"
Error adding request extensions from section v3_selfsigned
282BC672F27F0000:error:11000079:X509 V3 routines:v2i_AUTHORITY_KEYID:no issuer certificate:crypto/x509/v3_akid.c:156:
282BC672F27F0000:error:11000080:X509 V3 routines:X509V3_EXT_nconf_int:error in extension:crypto/x509/v3_conf.c:48:section=v3_selfsigned, name=authorityKeyIdentifier, value=keyid,issuer

########################################### OPENSSL ERROR ###########################################

The configuration of the "Compact Server" only has "Allow Anonymous" selected, and all other values are the default values: image

OpenSSL 3.3.1 is installed, and if I run the above openssl command manually on the container, I get the same error.

Any input or suggestions on how to resolve would be appreciated. Thanks

jpseini-bh commented 4 months ago

Closing this issue - I saw that docker is not supported on the free version of the component. Thanks