Closed deminngi closed 6 years ago
If I use several flows for development in Node-Red and just deploy "Modify Nodes" to not disturbe my productive flow I get the same error when using OPC-UA nodes with the same Connection-Config. If I deploy "Full" it's working.
0|node-red | 14 Mar 10:02:21 - [error] [OPCUA-IIoT-Read:ns=0;i=2295] Error: Session Not Ready To Read
also the node doesn't switch to "active", keeps on "waiting...".
Same issue?
Sometimes it even does not work with different Connection-Configs and "Deploy Modify Nodes". Then it throws:
Error: Session Not Ready To Read
at Object.<anonymous> (/home/gateway/.node-red/node_modules/node-red-contrib-iiot-opcua/opcuaIIoT/maps/opcua-iiot-read.js:199:17)
at Object.emit (events.js:180:13)
at Object.emit (domain.js:421:20)
at Object.Node.receive (/usr/local/lib/node_modules/node-red/red/runtime/nodes/Node.js:215:14)
at FunctionNode.Node.send (/usr/local/lib/node_modules/node-red/red/runtime/nodes/Node.js:202:14)
at sendResults (/usr/local/lib/node_modules/node-red/nodes/core/core/80-function.js:52:18)
at FunctionNode.<anonymous> (/usr/local/lib/node_modules/node-red/nodes/core/core/80-function.js:205:21)
at FunctionNode.emit (events.js:180:13)
at FunctionNode.emit (domain.js:421:20)
at FunctionNode.Node.receive (/usr/local/lib/node_modules/node-red/red/runtime/nodes/Node.js:215:14)
The problem is not seeing in the debug log "Working Session On Start Request".
The opcuaIIoT:connector code looks like this
node.startSession = function (timeoutSeconds) { coreConnector.internalDebugLog('Request For New Session From') if (node.opcuaSession) { coreConnector.internalDebugLog('Working Session On Start Request') return }
I assume there is no working session established....
The opcuaIIoT:browse code looks like this
if (!node.opcuaSession) { node.error(new Error('Session Not Ready To Browse'), msg) return }
Even triggering the injection later after waiting a couple of seconds does not change anything
See the debug log below
2018-03-14T14:56:17.219Z opcuaIIoT:connector Request For New Session From 14 Mar 14:56:18 - [error] [OPCUA-IIoT-Browser:127] Error: Session Not Ready To Browse at e.
(/data/red/node_modules/node-red-contrib-iiot-opcua/opcuaIIoT/maps/opcua-iiot-browser.js:198:12) at emitOne (events.js:96:13) at emit (events.js:188:7) at e.Node.receive (/data/red/node_modules/node-red/red/runtime/nodes/Node.js:215:14) at InjectNode.Node.send (/data/red/node_modules/node-red/red/runtime/nodes/Node.js:137:22) at InjectNode. (/data/red/node_modules/node-red/nodes/core/core/20-inject.js:77:22) at emitOne (events.js:96:13) at InjectNode.emit (events.js:188:7) at InjectNode.Node.receive (/data/red/node_modules/node-red/red/runtime/nodes/Node.js:215:14) at /data/red/node_modules/node-red/nodes/core/core/20-inject.js:105:22 at Layer.handle [as handle_request] (/data/red/node_modules/express/lib/router/layer.js:95:5) at next (/data/red/node_modules/express/lib/router/route.js:137:13) at /data/red/node_modules/node-red/red/api/auth/index.js:57:28 at complete (/data/red/node_modules/passport/lib/middleware/authenticate.js:263:13) at /data/red/node_modules/passport/lib/middleware/authenticate.js:270:15 at pass (/data/red/node_modules/passport/lib/authenticator.js:431:14)
Ok sorry, then it's something else. @biancode: Blame on me. Maybe you can split up in a new issue?
Goes back to work, if:
Happens with your Sample Server as well with real Servers
v2.3.0
Sorry the last version 2.3.0 had not solved this problem.
NOW I can run a wireshark session sniffing the node-red instance mirroring a specific port that is working with a real OPC/UA server.
This is my test (injector -> browse node -> debug node) environment:
After connection (see state above) I get with wireshark:
After trigger the injector (see above) i get with wireshark: NOTHING!!!!!!
Apparently the session is not there.
Can you assure it is working on a real OPC/UA server otherwise I must send this debug to the vendor
[UPDATE]: Same error with certificates using SecurityPolicy: Basic256 & SecurityMode:SIGNANDENCRYPT Looking from the server log I guess there is no client connection active.
Please note: I was unable to inject MANUALLY after startup a specific data point using write, browse, read command.
I have installed... node-red: 0.18.4 node: 6.10.3 npm: 3.10.10 node-red-contrib-iiot-opcua: 2.2.1 SecurityPolicy: NONE SecurityMode: None User: ANONYMOUS
My logs shows always: