Closed jdion-tft closed 5 years ago
Try to set the option endpoint_must_exist in index.js:84 to false, like:
const options = {
securityMode: securityMode,
securityPolicy: securityPolicy,
//xx serverCertificate: serverCertificate,
defaultSecureTokenLifetime: 40000,
certificateFile: certificateFile,
privateKeyFile: privateKeyFile,
endpoint_must_exist: false
};
This works for me.
endpoint_must_exist doesn't work for me. How can I get an error message for more investigation?
Am also facing same problem opcua-commander closes immediately after connecting. Even after updating endpoint_must_exist: false.
I have the same probleme...
@qlevZer Try to remove this line. It forces commander to close immediatelly and you are not able to see the message.
I also had this, and it's related to certificates.
I when I connected to the device using UA-Expert, it asked to install a certificate. After connecting, I saw the PLC was used with this endpoint: opc.tcp://Grading:4840
Later, when connecting to the PLC using opcua-commander, I could connect via opc.tcp://Grading:4840
, but not via opc.tcp://GRADING:4840
(although hostnames are case insensitive in windows, and I can ping both), and going via the ip address opc.tcp://172.16.13.120:4840
also didn't work.
I'm not sure how UA-Expert detects a lacking certification, and even generates one.
Btw, removing that line did help to see the message.
I am able to connect to the opcua server with commander, but immediately after connecting the program disconnects from the server, and closes the output in the terminal window. No error message is given.
I'm running the latest node-opcua and opcua-commander code.