Skip to content

Crash on failed connection attempt & losing connection after a while. #14

@jessevl

Description

@jessevl

Hi,

I seem to have two related problems with this node and I'm having a hard time figuring out how it could be fixed:

  1. Whenever another application is connected to the Max Cube (e.g. the desktop app) the node fails to connect. While I know is a limitation of the cube itself, in my instance the entire Node-Red Docker container goes down because of this unhandled exception (logs):

2016-12-30 21:24:02 { [Error: connect ETIMEDOUT 192.168.0.49:62910]
2016-12-30 21:24:02   code: 'ETIMEDOUT',
2016-12-30 21:24:02   errno: 'ETIMEDOUT',
2016-12-30 21:24:02   syscall: 'connect',
2016-12-30 21:24:02   address: '192.168.0.49',
2016-12-30 21:24:02   port: 62910 }
2016-12-30 21:24:02 30 Dec 21:24:02 - [red] Uncaught Exception:
2016-12-30 21:24:02 30 Dec 21:24:02 - Error: Uncaught, unspecified "error" event. (undefined)
2016-12-30 21:24:02     at MaxCubeLowLevel.emit (events.js:144:17)
2016-12-30 21:24:02     at Socket. (/data/node_modules/node-red-contrib-maxcube/node_modules/maxcube/maxcube-lowlevel.js:46:10)
2016-12-30 21:24:02     at emitOne (events.js:77:13)
2016-12-30 21:24:02     at Socket.emit (events.js:169:7)
2016-12-30 21:24:02     at emitErrorNT (net.js:1269:8)
2016-12-30 21:24:02     at nextTickCallbackWith2Args (node.js:442:9)
2016-12-30 21:24:02     at process._tickCallback (node.js:356:17)
2016-12-30 21:24:02
2016-12-30 21:24:02 �[37m�[40mnpm�[0m �[0m�[32minfo�[0m �[0m�[35mnode-red-docker@0.14.4�[0m Failed to exec start script
2016-12-30 21:24:02 �[0m�[37m�[40mnpm�[0m �[0m�[31m�[40mERR!�[0m�[35m�[0m Linux 3.10.77
2016-12-30 21:24:02 �[0m�[37m�[40mnpm�[0m �[0m�[31m�[40mERR!�[0m �[0m�[35margv�[0m "/usr/local/bin/node" "/usr/local/bin/npm" "start" "--" "--userDir" "/data"
2016-12-30 21:24:02 �[0m�[37m�[40mnpm�[0m �[0m�[31m�[40mERR!�[0m �[0m�[35mnode�[0m v4.4.7
2016-12-30 21:24:02 �[0m�[37m�[40mnpm�[0m �[0m�[31m�[40mERR!�[0m �[0m�[35mnpm �[0m v2.15.8
2016-12-30 21:24:02 �[0m�[37m�[40mnpm�[0m �[0m�[31m�[40mERR!�[0m �[0m�[35mcode�[0m ELIFECYCLE
2016-12-30 21:24:02 �[0m�[37m�[40mnpm�[0m �[0m�[31m�[40mERR!�[0m�[35m�[0m node-red-docker@0.14.4 start: node $NODE_OPTIONS node_modules/node-red/red.js -v $FLOWS "--userDir" "/data"
2016-12-30 21:24:02 �[0m�[37m�[40mnpm�[0m �[0m�[31m�[40mERR!�[0m�[35m�[0m Exit status 1
2016-12-30 21:24:02 �[0m�[37m�[40mnpm�[0m �[0m�[31m�[40mERR!�[0m�[35m�[0m 
2016-12-30 21:24:02 �[0m�[37m�[40mnpm�[0m �[0m�[31m�[40mERR!�[0m�[35m�[0m Failed at the node-red-docker@0.14.4 start script 'node $NODE_OPTIONS node_modules/node-red/red.js -v $FLOWS "--userDir" "/data"'.
2016-12-30 21:24:02 �[0m�[37m�[40mnpm�[0m �[0m�[31m�[40mERR!�[0m�[35m�[0m This is most likely a problem with the node-red-docker package,
2016-12-30 21:24:02 �[0m�[37m�[40mnpm�[0m �[0m�[31m�[40mERR!�[0m�[35m�[0m not with npm itself.
2016-12-30 21:24:02 �[0m�[37m�[40mnpm�[0m �[0m�[31m�[40mERR!�[0m�[35m�[0m Tell the author that this fails on your system:
2016-12-30 21:24:02 �[0m�[37m�[40mnpm�[0m �[0m�[31m�[40mERR!�[0m�[35m�[0m     node $NODE_OPTIONS node_modules/node-red/red.js -v $FLOWS "--userDir" "/data"
2016-12-30 21:24:02 �[0m�[37m�[40mnpm�[0m �[0m�[31m�[40mERR!�[0m�[35m�[0m You can get information on how to open an issue for this project with:
2016-12-30 21:24:02 �[0m�[37m�[40mnpm�[0m �[0m�[31m�[40mERR!�[0m�[35m�[0m     npm bugs node-red-docker
2016-12-30 21:24:02 �[0m�[37m�[40mnpm�[0m �[0m�[31m�[40mERR!�[0m�[35m�[0m Or if that isn't available, you can get their info via:
2016-12-30 21:24:02 �[0m�[37m�[40mnpm�[0m �[0m�[31m�[40mERR!�[0m�[35m�[0m 
2016-12-30 21:24:02 �[0m�[37m�[40mnpm�[0m �[0m�[31m�[40mERR!�[0m�[35m�[0m     npm owner ls node-red-docker
2016-12-30 21:24:02 �[0m�[37m�[40mnpm�[0m �[0m�[31m�[40mERR!�[0m�[35m�[0m There is likely additional logging output above.
2016-12-30 21:24:02 �[0m
2016-12-30 21:24:02 �[37m�[40mnpm�[0m �[0m�[31m�[40mERR!�[0m�[35m�[0m Please include the following file with any support request:
2016-12-30 21:24:02 �[0m�[37m�[40mnpm�[0m �[0m�[31m�[40mERR!�[0m�[35m�[0m     /usr/src/node-red/npm-debug.log

  1. Another issue that I seem to be having is that even when not using any other applications it will disconnect from node-red after a time (an hour or so maybe) and won't reconnect automatically afterwards. Node-Red won't crash in that case, but commands will fail. The log output is like this:

2016-12-31 10:43:17,stdout,31 Dec 10:43:17 - [error] [maxcube out:b53a8714.1bfd48] Error: Maxcube not initialised
2016-12-31 10:43:16,stdout,31 Dec 10:43:16 - [error] [maxcube in:f19f204d.16c07] Error: Maxcube not initialised

Is there something I'm doing wrong?

Thanks!
Jesse

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions