mikakaraila / node-red-contrib-opcua

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

Problem with OPC UA server node #223

Closed johncaipa closed 3 years ago

johncaipa commented 3 years ago

Hi, I have installed this library in my node-red in an instance of ubuntu in AWS, I want to implement an OPC UA server but I have the following problem, could you help me to know what the problem is, also know how to implement OPC security with this node.

"Error: EACCES: permission denied, mkdir '/home/ubuntu/.config/node-opcua-nodejs'"

image

mikakaraila commented 3 years ago

You are most probably root?

Then try to install this way: sudo npm install --unsafe-perm=true node-red-contrib-opcua

mikakaraila commented 3 years ago

Not node-red-contrib-opcua fault, user rights on AWS EC2 Linux instance.

johncaipa commented 3 years ago

Sorry to bother you again, try again to install again the nodes and use the OPC UA server example (OPCUAServer_Flow.json), but I not had success in getting it up and running. On ubuntu AWS instance. image What could I do or try to see what the problem is?

mikakaraila commented 3 years ago

Did you use the latest version? I installed and it's working.

johncaipa commented 3 years ago

image I installed it yesterday, so it is a recent version although you have just released a new version, I do not understand what the problem may be, could you share another example that uses OPC UA server to validate if it is my flow? Excuse so much annoyance I know that maybe it is not an error of your nodes, but I have not managed to make it work and I need to be able to implement this protocol, it is the only option I have

mikakaraila commented 3 years ago

Can you start node-red from command line? node-red -v testflow.json Just to see if it reports something to console?

mikakaraila commented 3 years ago

My instance on AWS took some time to start. I installed node-red-contrib-opcua through palette manager.

johncaipa commented 3 years ago

image

This is what resulted from running it as you suggested.

mikakaraila commented 3 years ago

Check PKI folder access rights. ls -al Most likely it has ubuntu or root as owner.

johncaipa commented 3 years ago

Thanks you were right, change ownership of the folder .config and contents inside it from 'root' to 'ubuntu' and now it works. image

mikakaraila commented 3 years ago

Yes good ☺️