node-red stops working after adding sonoff node

408 views
Skip to first unread message

Earl Hicks

unread,
Mar 10, 2018, 9:54:25 AM3/10/18
to Node-RED
When I add the sonoff node my node-red instance stops working and can't start with node-red or node-red-start
When I remove the simple-sonoff-server folder from the node-modules folder I can start node-red using the node-red command and it functions properly.  
I have the sonoff.config.json configured with my router and server settings.

I'm running node-red on a raspberry pi3
Node-RED version: v0.18.4
Node.js  version: v6.13.1
Linux 4.9.35-v7+ arm LE


Any help would be appreciated

Mark Setrem

unread,
Mar 10, 2018, 10:09:39 AM3/10/18
to Node-RED
Are there any messages in the console either when node-red stops working or when it fails when you restart?

Spruce

unread,
Mar 10, 2018, 11:26:49 AM3/10/18
to Node-RED

Spruce

unread,
Mar 10, 2018, 11:30:09 AM3/10/18
to Node-RED
When I move the simple-sonoff-server folder back into the node_modules folder the node-red instance gets Lost connection to server, and the raspberry pi terminal node-red server says 'Stopped flows'

Colin Law

unread,
Mar 10, 2018, 11:31:13 AM3/10/18
to node...@googlegroups.com
As Mark asked, you must show us what is in the node red log on startup
(use node-red-log if you are not starting it from a terminal).

Colin
> --
> http://nodered.org
>
> Join us on Slack to continue the conversation: http://nodered.org/slack
> ---
> You received this message because you are subscribed to the Google Groups
> "Node-RED" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to node-red+u...@googlegroups.com.
> To post to this group, send email to node...@googlegroups.com.
> Visit this group at https://groups.google.com/group/node-red.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/node-red/dce83d31-ae48-43a1-b322-c5bf8fcfccc7%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.

Spruce

unread,
Mar 10, 2018, 11:48:36 AM3/10/18
to Node-RED
Here is the result when I run node-red-log:
10 Mar 09:18:19 - [info] Starting flows
10 Mar 09:18:20 - [error] [twilio out:6fe79425.e1facc] Client requires an Account SID and Auth Token set explicitly or via the TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN environment variables
10 Mar 09:18:20 - [info] Started flows
10 Mar 09:18:20 - [info] [sonoff-server:f0de748a.dd0e78] SONOFF Server Started On Port 1080
10 Mar 09:18:20 - [red] Uncaught Exception:
10 Mar 09:18:20 - Error: listen EACCES 0.0.0.0:443
at Object.exports._errnoException (util.js:1020:11)
at exports._exceptionWithHostPort (util.js:1043:20)
at Server._listen2 (net.js:1264:19)
at listen (net.js:1313:10)
at Server.listen (net.js:1409:5)
at Server.listen (/home/openhabian/.node-red/node_modules/nodejs-websocket/Server.js:119:14)
at Object.module.exports.createServer (/home/openhabian/.node-red/node_modules/simple-sonoff-server/sonoff.server.module.js:263:8)
at new SonoffServer (/home/openhabian/.node-red/node_modules/node-red-contrib-sonoff-server/config-server/config-server.js:33:61)
at createNode (/usr/lib/node_modules/node-red/red/runtime/nodes/flows/Flow.js:305:18)
at Flow.start (/usr/lib/node_modules/node-red/red/runtime/nodes/flows/Flow.js:67:31)
at start (/usr/lib/node_modules/node-red/red/runtime/nodes/flows/index.js:307:29)
at tryCatchReject (/usr/lib/node_modules/node-red/node_modules/when/lib/makePromise.js:845:30)
at runContinuation1 (/usr/lib/node_modules/node-red/node_modules/when/lib/makePromise.js:804:4)
at Fulfilled.when (/usr/lib/node_modules/node-red/node_modules/when/lib/makePromise.js:592:4)
at Pending.run (/usr/lib/node_modules/node-red/node_modules/when/lib/makePromise.js:483:13)
at Scheduler._drain (/usr/lib/node_modules/node-red/node_modules/when/lib/Scheduler.js:62:19)
nodered.service: main process exited, code=exited, status=1/FAILURE
Stopped Node-RED graphical event wiring tool..
Unit nodered.service entered failed state.

Colin Law

unread,
Mar 10, 2018, 12:03:30 PM3/10/18
to node...@googlegroups.com

Nick O'Leary

unread,
Mar 10, 2018, 12:16:06 PM3/10/18
to node...@googlegroups.com
] SONOFF Server Started On Port 1080
10 Mar 09:18:20 - [red] Uncaught Exception:
10 Mar 09:18:20 - Error: listen EACCES 0.0.0.0:443

It appears the sonoff node is creating a server listening on port 1080, which is fine. But it is also trying to listen on port 443. That's a privileged port that only the root user is allowed to listen on.

The question for the sonoff node is why it wants to listen on port 443.

Nick

To post to this group, send an email to node...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages