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

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

Open
jessevl opened this issue Dec 31, 2016 · 3 comments
Open

Comments

@jessevl
Copy link

jessevl commented Dec 31, 2016

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�[[email protected]�[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 [email protected] 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 [email protected] 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

@dude2k
Copy link

dude2k commented Feb 6, 2017

Same here, looses connection.
"Error: Maxcube not initialised"

@am78
Copy link

am78 commented Dec 3, 2017

Same Error Here. Die anybody found a solution already?

@feldi740
Copy link

Yep, error still exists. Only chance to get the rest of Node-Red working is to delete the config node and re-deploy. Already tried the "/maxcube" fix from the pull request by pvgennip (adding the handler into ~/.node-red/node_modules/maxcube/maxcube-lowlevel.js) but it doesn't seem to solve the issue in case of node-red-contrib-maxcube.
Please provide a fix because it is causing the whole home-automation to stop working if the maxcube becomes offline. Thanks.

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

No branches or pull requests

4 participants