I AM SORRY, I MADE MISTAKE. THIS WAS MENT FOR node-red-contrib-mcprotocol
BUT MAYBE YOU CAN CHECK THIS ISSUE, SINCE IT USES YOUR LIBRARY?
Every time I set connection parameters NodeRed crashes.
When I restart service, everything works as expected.
Some info for debugging - from start of node-red to crash, when I changed setting of connection node (PLC connection)
PLEASE NOTE I use port 6551, this is not a mistake or error.
`
27 Jan 16:36:49 - [mcprotocol] adding new connection to pool ~ mcprotocol: {host:'10.144.240.22', port: 6551}
[2021-01-27T15:36:49.833Z 793782 ] 'plcType' set is A
[2021-01-27T15:36:49.839Z 799843 10.144.240.22]
27 Jan 16:36:49 - [info] Started flows
27 Jan 16:36:49 - [mcprotocol] connected ~ mcprotocol: {host:'10.144.240.22', port: 6551}
27 Jan 16:36:51 - [warn] Communication send error: Error: WebSocket is not open: readyState 3 (CLOSED)
27 Jan 16:37:29 - [info] Stopping modified nodes
27 Jan 16:37:29 - [mcprotocol] closing connection ~ mcprotocol: {host:'10.144.240.22', port: 6551}
27 Jan 16:37:29 - [mcprotocol] deleting connection from pool ~ mcprotocol: {host:'10.144.240.22', port: 6551}
27 Jan 16:37:29 - [info] Stopped modified nodes
27 Jan 16:37:29 - [info] Starting modified nodes
27 Jan 16:37:29 - [mcprotocol] adding new connection to pool ~ mcprotocol: {host:'10.144.240.22', port: 6551}
[2021-01-27T15:37:29.569Z 529683 ] 'plcType' set is A
[2021-01-27T15:37:29.570Z 530977 10.144.240.22]
27 Jan 16:37:29 - [info] Started modified nodes
27 Jan 16:37:29 - [mcprotocol] error ~ mcprotocol: {host:'10.144.240.22', port: 6551}: Error: connect ECONNREFUSED 10.144.240.22:6551
Error: connect ECONNREFUSED 10.144.240.22:6551
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1138:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '10.144.240.22',
port: 6551
}
Error: connect ECONNREFUSED 10.144.240.22:6551
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1138:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '10.144.240.22',
port: 6551
}
[2021-01-27T15:37:29.591Z 551323 10.144.240.22] We Caught a connect error ECONNREFUSED
27 Jan 16:37:29 - [mcprotocol] connection closed ~ mcprotocol: {host:'10.144.240.22', port: 6551}
27 Jan 16:37:29 - [error] [MC Write:Zapiši v PLC] Error: Not connected!
27 Jan 16:37:30 - [error] [MC Write:Zapiši v PLC] Error: Not connected!
27 Jan 16:37:31 - [red] Uncaught Exception:
27 Jan 16:37:31 - Error: read ECONNRESET
at TCP.onStreamRead (node:internal/stream_base_commons:213:20)
I AM SORRY, I MADE MISTAKE. THIS WAS MENT FOR node-red-contrib-mcprotocol
BUT MAYBE YOU CAN CHECK THIS ISSUE, SINCE IT USES YOUR LIBRARY?
Every time I set connection parameters NodeRed crashes. When I restart service, everything works as expected.
Some info for debugging - from start of node-red to crash, when I changed setting of connection node (PLC connection) PLEASE NOTE I use port 6551, this is not a mistake or error.
` 27 Jan 16:36:49 - [mcprotocol] adding new connection to pool ~ mcprotocol: {host:'10.144.240.22', port: 6551} [2021-01-27T15:36:49.833Z 793782 ] 'plcType' set is A [2021-01-27T15:36:49.839Z 799843 10.144.240.22] 27 Jan 16:36:49 - [info] Started flows 27 Jan 16:36:49 - [mcprotocol] connected ~ mcprotocol: {host:'10.144.240.22', port: 6551} 27 Jan 16:36:51 - [warn] Communication send error: Error: WebSocket is not open: readyState 3 (CLOSED) 27 Jan 16:37:29 - [info] Stopping modified nodes 27 Jan 16:37:29 - [mcprotocol] closing connection ~ mcprotocol: {host:'10.144.240.22', port: 6551} 27 Jan 16:37:29 - [mcprotocol] deleting connection from pool ~ mcprotocol: {host:'10.144.240.22', port: 6551} 27 Jan 16:37:29 - [info] Stopped modified nodes 27 Jan 16:37:29 - [info] Starting modified nodes 27 Jan 16:37:29 - [mcprotocol] adding new connection to pool ~ mcprotocol: {host:'10.144.240.22', port: 6551} [2021-01-27T15:37:29.569Z 529683 ] 'plcType' set is A [2021-01-27T15:37:29.570Z 530977 10.144.240.22] 27 Jan 16:37:29 - [info] Started modified nodes 27 Jan 16:37:29 - [mcprotocol] error ~ mcprotocol: {host:'10.144.240.22', port: 6551}: Error: connect ECONNREFUSED 10.144.240.22:6551 Error: connect ECONNREFUSED 10.144.240.22:6551 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1138:16) { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '10.144.240.22', port: 6551 } Error: connect ECONNREFUSED 10.144.240.22:6551 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1138:16) { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '10.144.240.22', port: 6551 } [2021-01-27T15:37:29.591Z 551323 10.144.240.22] We Caught a connect error ECONNREFUSED 27 Jan 16:37:29 - [mcprotocol] connection closed ~ mcprotocol: {host:'10.144.240.22', port: 6551} 27 Jan 16:37:29 - [error] [MC Write:Zapiši v PLC] Error: Not connected! 27 Jan 16:37:30 - [error] [MC Write:Zapiši v PLC] Error: Not connected! 27 Jan 16:37:31 - [red] Uncaught Exception: 27 Jan 16:37:31 - Error: read ECONNRESET at TCP.onStreamRead (node:internal/stream_base_commons:213:20)
` Regards, Jinx