BiancoRoyal / node-red-contrib-iiot-opcua

deprecated - very new developed by PLUS for Node-RED - https://plus4nodered.com
https://www.npmjs.com/package/node-red-contrib-iiot-opcua
BSD 3-Clause "New" or "Revised" License
34 stars 8 forks source link

Default self-signed security certificates appear to be missing #79

Closed martinboers closed 5 years ago

martinboers commented 5 years ago

Problem

Information

Current behaviour

Cannot connect to third-party local OPC UA Server. Error is:

Error: cannot locate certificate file /opt/lib/node_modules/node-red-contrib-iiot-opcua/node_modules/node-opcua-client/certificates/client_selfsigned_cert_1024.pem at OPCUAClientBase (/opt/lib/node_modules/node-red-contrib-iiot-opcua/node_modules/node-opcua-client/src/client_base.js:74:15) at new OPCUAClient (/opt/lib/node_modules/node-red-contrib-iiot-opcua/node_modules/node-opcua-client/src/opcua_client.js:74:21) at /opt/lib/node_modules/node-red-contrib-iiot-opcua/opcuaIIoT/maps/opcua-iiot-connector.js:761:19 at Layer.handle [as handle_request] (/opt/lib/node_modules/node-red/node_modules/express/lib/router/layer.js:95:5) at next (/opt/lib/node_modules/node-red/node_modules/express/lib/router/route.js:137:13) at /opt/lib/node_modules/node-red/red/api/auth/index.js:63:13 at Layer.handle [as handle_request] (/opt/lib/node_modules/node-red/node_modules/express/lib/router/layer.js:95:5) at next (/opt/lib/node_modules/node-red/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/opt/lib/node_modules/node-red/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/opt/lib/node_modules/node-red/node_modules/express/lib/router/layer.js:95:5)

Expected behaviour

Expect that the default self-signed certificates are created automatically in the default location (this appeared to be working in earlier versions).

Minimal reproduction of the problem with instructions

  1. Start with a clean system.
  2. Install node-red and node-red-contrib-iiot-opcua
  3. Create a simple flow that reads a single OPC UA variable from a local, third-party OPC UA Server.

Your Environment

Please tell us about your environment:

Node.js version: v6.11.2 Node-RED version: v0.19.5 node-red-contrib-iiot-opcua version: v3.7.4

biancode commented 5 years ago

Dear Martin,

/opt/lib/node_modules/node-red-contrib-iiot-opcua/node_modules/node-opcua-client/certificates/

please, could you check that this folder exists? If not, then there is a problem on the installation of node-opcua. Sometimes you have to take care of, that the openssl is installed as well as other basic compile libraries. see node-opcua

/opt/lib/node_modules/node-red-contrib-iiot-opcua/

You could try to just install the node-opcua in that folder again too.

If it doesn't cause any problems, then I would recommend Node.js v10 LTS instead of v6.

Happy installing! Klaus

martinboers commented 5 years ago

Hi Klaus,

Thank you for the quick response.

That ‘certificates’ folder does not exist.

I noticed when filling out the issue that I’m running a very old version of Node, so I’ll upgrade that tomorrow morning and try re-installing your package. I’ll update the issue when I find the solution.

In case you’re interested, I’m preparing a how-to video for using the iiot-opcua package on our PLCnext controller. I’ll mention your website in the show notes, so hopefully that will direct more traffic your way.

Regards, Martin Boers Phoenix Contact Electronics GmbH

On Mon 10 Dec 2018 at 16:37, Klaus Landsdorf notifications@github.com wrote:

Dear Martin,

/opt/lib/node_modules/node-red-contrib-iiot-opcua/node_modules/node-opcua-client/certificates/

please, could you check that this folder exists? If not, then there is a problem on the installation of node-opcua. Somtimes you have to tkae care of that the openssl is installed as well as other basic compile libraries. see node-opcua https://github.com/node-opcua/node-opcua

/opt/lib/node_modules/node-red-contrib-iiot-opcua/

You could try to just install the node-opcua in that folder again too.

If it doesn't cause any problems, then I would recommend Node.js v10 LTS instead of v6.

Happy installing! Klaus

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/biancode/node-red-contrib-iiot-opcua/issues/79#issuecomment-445859049, or mute the thread https://github.com/notifications/unsubscribe-auth/AMhokVn_xxuy3_h5OMIJmitm-Aowl5Bjks5u3n-ogaJpZM4ZLj1f .

biancode commented 5 years ago

here is some YouTube content too

martinboers commented 5 years ago

Solved by installing node version v10.14.1 and re-installing node-red and node-red-contrib-iiot-opcua.

Thank you Klaus for your help!