Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Invalid endpoint, check that server has security policy #587

Closed
krgrsebastian opened this issue Aug 11, 2023 · 15 comments
Closed

[BUG] Invalid endpoint, check that server has security policy #587

krgrsebastian opened this issue Aug 11, 2023 · 15 comments

Comments

@krgrsebastian
Copy link

I am getting an "Invalid endpoint, check that server has security policy" error in my OPC/UA Client.
This is the error code im getting:

msg : string[108]
"OpcUaClientNode: Case A: Endpoint does not contain, 1==None 2==Sign 3==Sign&Encrypt, using securityMode: [1]"
11.8.2023, 13:10:01[node: 960582b0365d8a4e](http://80.158.37.162:1880/nodered/#)
msg : string[98]
"OpcUaClientNode:         using securityPolicy: ["http://opcfoundation.org/UA/SecurityPolicy#None"]"
11.8.2023, 13:10:01[node: 960582b0365d8a4e](http://80.158.37.162:1880/nodered/#)
msg : string[155]
"OpcUaClientNode: Case B: UserName & password does not match to server (needed by Sign or SignAndEncrypt), check username: undefined and password: undefined"
11.8.2023, 13:10:01[node: 960582b0365d8a4e](http://80.158.37.162:1880/nodered/#)
msg : string[71]
"OpcUaClientNode: Case C: With Sign you cannot use SecurityPolicy None!!"
11.8.2023, 13:10:01[node: 960582b0365d8a4e](http://80.158.37.162:1880/nodered/#)
msg : string[46]
"OpcUaClientNode: Invalid endpoint parameters: "
11.8.2023, 13:10:01[node: 960582b0365d8a4e](http://80.158.37.162:1880/nodered/#)
msg : string[483]
"Client node error on:  error: ["Wrong endpoint parameters: {\"id\":\"b14a777a32dafbc5\",\"type\":\"OpcUa-Endpoint\",\"_closeCallbacks\":[],\"_inputCallback\":null,\"_inputCallbacks\":null,\"wires\":[],\"_wireCount\":0,\"credentials\":{},\"endpoint\":\"opc.tcp://tulip.telekomcloud.umh.app:46010\",\"securityPolicy\":\"None\",\"securityMode\":\"None\",\"login\":false,\"none\":true,\"usercert\":false,\"userCertificate\":\"\",\"userPrivatekey\":\"\",\"user\":null,\"password\":null}"]"
11.8.2023, 13:10:01[node: 960582b0365d8a4e](http://80.158.37.162:1880/nodered/#)
msg : string[16]
"Invalid endpoint"

It worked just fine in version 0.2.309 and since i used the version 0.2.310 i am getting this error.
I also tried to connect with UA-Expert and it worked just fine.
Here is a guide to replecate this issue: https://learn.umh.app/course/creating-a-node-red-flow-with-simulated-opc-ua-data/

I also figured out, that the only changes to version 0.2.310 was the version change form node-opcua. Maybe that is the reason.

#582 (comment)_

@mikakaraila
Copy link
Owner

Please try to get debug log for @erossignon
I have seen some other cases and I expect some servers have some timing problem after code refactoring.
First time connection seems to fail for this reason.

@mikakaraila mikakaraila changed the title [BUG] Invalid endpoint, check that server has sercurity policy [BUG] Invalid endpoint, check that server has security policy Aug 11, 2023
@mikakaraila
Copy link
Owner

Please test with v0.2.311

@krgrsebastian
Copy link
Author

I tried with v.0.2.311 and still getting the same error :(

Here is the complete log:
united-manufacturing-hub-nodered-0.log

@mikakaraila
Copy link
Owner

Thanks, it shows two interesting lines:
08:09:54.240Z :client_base_impl :582 Creating default certificate ... please wait
Client connect error: The expression evaluated to a falsy value:

(0, assert_1.default)(s.length <= maxLength)

This seems to be assert inside node-opcua-crypto package:
image

@mikakaraila
Copy link
Owner

I will need help from @erossignon to check why it will fail...

@mikakaraila
Copy link
Owner

I got email from Etienne and this is fixed to coming new version of node-opcua-crypto

@krgrsebastian
Copy link
Author

thx for your help!

@mikakaraila
Copy link
Owner

See also: node-opcua/node-opcua#1289

@mikakaraila
Copy link
Owner

I haven´t yet found solution for this, I will need help from @erossignon .

@mikakaraila
Copy link
Owner

Please re-test with new just published version.

@simarsamra
Copy link

Hi
I am facing this strange issue with node-red-contrib-opcua node Client.
I have three OpcUa servers on my network. They all have the same configuration.
Using UaExpert, I can connect to all these servers without any issues.
But when I use node-red Opc Ua Client to connect out of three it only works with one server. For the remaining two servers I get an Invalid Endpoint error. The Endpoint node properties are set to exactly the same as in UaExpert. I searched the internet for the solution but could not find a fix.
Please take a look at the picture below.
Thank you in advance.
OPCUA_Node-RED

@mikakaraila
Copy link
Owner

Have you trusted client certificate on those two not working servers?

@mikakaraila
Copy link
Owner

Did you test this again. Making cleanup, closing this one. Reopen if not working.

@krgrsebastian
Copy link
Author

Sorry for the late reply had to write some exams. it works now thanks for your effort :)

@luiscortesfdz
Copy link

@krgrsebastian how did you solve it?

I'm facing the same problem
With UA Expert it works perfect but with client nodered it doesn't work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants