komarek
Posts: 149
Joined: Fri Mar 31, 2017 1:19 am

unknown problem with node-red (SOLVED)

Thu Nov 16, 2017 3:56 pm

hi guys i have a terrible problem i wonder if you can help

i am running node-red which is handled by this service:

Code: Select all

# systemd service file to start Node-RED

[Unit]
Description=Node-RED graphical event wiring tool.
Wants=network.target
Documentation=http://nodered.org/docs/hardware/raspberrypi.html

[Service]
Type=simple
# Run as normal pi user - feel free to change...
User=pi
Group=pi
WorkingDirectory=/home/pi
Nice=5
Environment="NODE_OPTIONS=--max-old-space-size=128"
# uncomment and edit next line if you need an http proxy
#Environment="HTTP_PROXY=my.httpproxy.server.address"
# uncomment the next line for a more verbose log output
#Environment="NODE_RED_OPTIONS=-v"
#ExecStart=/usr/bin/env node $NODE_OPTIONS red.js $NODE_RED_OPTIONS
ExecStart=/usr/bin/env node-red-pi $NODE_OPTIONS $NODE_RED_OPTIONS
# Use SIGINT to stop
KillSignal=SIGINT
# Auto restart on crash
Restart=on-failure
# Tag things in the log
SyslogIdentifier=Node-RED
#StandardOutput=syslog

[Install]
WantedBy=multi-user.target
it used to work like charm
today nothing is working

if i check the status it says this:

Code: Select all

● nodered.service - Node-RED graphical event wiring tool.
   Loaded: loaded (/lib/systemd/system/nodered.service; enabled)
   Active: failed (Result: start-limit) since gio 2017-11-16 16:51:53 CET; 3min 51s ago
     Docs: http://nodered.org/docs/hardware/raspberrypi.html
  Process: 16795 ExecStart=/usr/bin/env node-red-pi $NODE_OPTIONS $NODE_RED_OPTIONS (code=exited, status=9)
 Main PID: 16795 (code=exited, status=9)

nov 16 16:51:53 pitre systemd[1]: Unit nodered.service entered failed state.
nov 16 16:51:53 pitre systemd[1]: nodered.service holdoff time over, scheduling restart.
nov 16 16:51:53 pitre systemd[1]: Stopping Node-RED graphical event wiring tool....
nov 16 16:51:53 pitre systemd[1]: Starting Node-RED graphical event wiring tool....
nov 16 16:51:53 pitre systemd[1]: nodered.service start request repeated too quickly, refusing to start.
nov 16 16:51:53 pitre systemd[1]: Failed to start Node-RED graphical event wiring tool..
nov 16 16:51:53 pitre systemd[1]: Unit nodered.service entered failed state.

but if i run manually /usr/bin/node-red-pi
it seems to work good

any help?
thanks
Last edited by komarek on Thu Nov 16, 2017 7:26 pm, edited 1 time in total.

komarek
Posts: 149
Joined: Fri Mar 31, 2017 1:19 am

Re: unknown problem with node-red

Thu Nov 16, 2017 4:25 pm

btw
if i make: node-red-start

i have this:

Code: Select all

Once Node-RED has started, point a browser at http://192.168.1.3:1880
On Pi Node-RED works better with the Firefox or Chrome browser
 
Use   node-red-stop                          to stop Node-RED
Use   node-red-start                         to start Node-RED again
Use   node-red-log                           to view the recent log output
Use   sudo systemctl enable nodered.service  to autostart Node-RED at every boot
Use   sudo systemctl disable nodered.service to disable autostart on boot
 
To find more nodes and example flows - go to http://flows.nodered.org
 
Starting as a systemd service.
Unit nodered.service entered failed state.
nodered.service holdoff time over, scheduling restart.
Stopping Node-RED graphical event wiring tool....
Starting Node-RED graphical event wiring tool....
Started Node-RED graphical event wiring tool..
node: --max-old-space-size=128 is not allowed in NODE_OPTIONS
nodered.service: main process exited, code=exited, status=9/n/a
Unit nodered.service entered failed state.
nodered.service holdoff time over, scheduling restart.
Stopping Node-RED graphical event wiring tool....
Starting Node-RED graphical event wiring tool....
Started Node-RED graphical event wiring tool..
node: --max-old-space-size=128 is not allowed in NODE_OPTIONS
nodered.service: main process exited, code=exited, status=9/n/a
Unit nodered.service entered failed state.
nodered.service holdoff time over, scheduling restart.
Stopping Node-RED graphical event wiring tool....
Starting Node-RED graphical event wiring tool....
Started Node-RED graphical event wiring tool..
node: --max-old-space-size=128 is not allowed in NODE_OPTIONS
nodered.service: main process exited, code=exited, status=9/n/a
Unit nodered.service entered failed state.
nodered.service holdoff time over, scheduling restart.
Stopping Node-RED graphical event wiring tool....
Starting Node-RED graphical event wiring tool....
Started Node-RED graphical event wiring tool..
node: --max-old-space-size=128 is not allowed in NODE_OPTIONS
nodered.service: main process exited, code=exited, status=9/n/a
Unit nodered.service entered failed state.
nodered.service holdoff time over, scheduling restart.
Stopping Node-RED graphical event wiring tool....
Starting Node-RED graphical event wiring tool....
nodered.service start request repeated too quickly, refusing to start.
Failed to start Node-RED graphical event wiring tool..
Unit nodered.service entered failed state.

User avatar
DougieLawson
Posts: 39121
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: unknown problem with node-red

Thu Nov 16, 2017 4:41 pm

Simplify this stuff

Code: Select all

Environment="NODE_OPTIONS=--max-old-space-size=128"
# uncomment and edit next line if you need an http proxy
#Environment="HTTP_PROXY=my.httpproxy.server.address"
# uncomment the next line for a more verbose log output
#Environment="NODE_RED_OPTIONS=-v"
#ExecStart=/usr/bin/env node $NODE_OPTIONS red.js $NODE_RED_OPTIONS
ExecStart=/usr/bin/env node-red-pi $NODE_OPTIONS $NODE_RED_OPTIONS
To

Code: Select all

ExecStart=/usr/bin/env node-red-pi --max-old-space-size=128 -v
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

komarek
Posts: 149
Joined: Fri Mar 31, 2017 1:19 am

found the FIX (SOLVED)

Thu Nov 16, 2017 7:26 pm

Changed the line

Environment="NODE_OPTIONS=--max-old-space-size=128"

to

Environment="NODE_OPTIONS=--max_old_space_size=128"
now working good

Return to “General discussion”