UI stopped working and not resuming after restart

344 views
Skip to first unread message

Csongor Varga

unread,
Mar 22, 2017, 9:04:36 AM3/22/17
to Node-RED
Hi Guys,

I was working in node-red, I wanted to deploy some flow changes and it just never finished. I tried refreshing the browser but did not help. I try node-red-stop, reboot and everything.

When I try to load the editor or the UI, I only get a ERR_TIMED_OUT in Chrome.

When I execute node-red-log, this is all I can see:
22 Mar 13:52:32 - [info] Node-RED version: v0.15.2
22 Mar 13:52:32 - [info] Node.js  version: v0.10.29
22 Mar 13:52:32 - [info] Linux 4.4.13-v7+ arm LE
22 Mar 13:52:34 - [info] Loading palette nodes
pi : TTY=unknown ; PWD=/home/pi ; USER=root ; COMMAND=/usr/bin/python -u /usr/li                                                b/node_modules/node-red/nodes/core/hardware/nrgpio.py info
pam_unix(sudo:session): session opened for user root by (uid=0)
pam_unix(sudo:session): session closed for user root
noble warning: adapter state unauthorized, please run as root or with sudo
or see README for information on running without root/sudo:
22 Mar 13:53:07 - [info] Dashboard version 2.3.5 started at /ui
22 Mar 13:53:12 - [info] Settings file  : /home/pi/.node-red/settings.js
22 Mar 13:53:12 - [info] User directory : /home/pi/.node-red
22 Mar 13:53:12 - [info] Flows file     : /home/pi/.node-red/flows_OpenHAB.json
22 Mar 13:53:12 - [info] Server now running at https://127.0.0.1:1880/
22 Mar 13:53:13 - [info] Starting flows
pi : TTY=unknown ; PWD=/home/pi ; USER=root ; COMMAND=/usr/bin/python -u /usr/li                                                b/node_modules/node-red/nodes/core/hardware/nrgpio.py out 11 1
pam_unix(sudo:session): session opened for user root by (uid=0)
pi : TTY=unknown ; PWD=/home/pi ; USER=root ; COMMAND=/usr/bin/python -u /usr/li                                                b/node_modules/node-red/nodes/core/hardware/nrgpio.py out 13 1
pam_unix(sudo:session): session opened for user root by (uid=0)
pi : TTY=unknown ; PWD=/home/pi ; USER=root ; COMMAND=/usr/bin/python -u /usr/li                                                b/node_modules/node-red/nodes/core/hardware/nrgpio.py out 15 1
pam_unix(sudo:session): session opened for user root by (uid=0)
pi : TTY=unknown ; PWD=/home/pi ; USER=root ; COMMAND=/usr/bin/python -u /usr/li                                                b/node_modules/node-red/nodes/core/hardware/nrgpio.py out 16 1
pam_unix(sudo:session): session opened for user root by (uid=0)
22 Mar 13:53:26 - [info] Started flows
22 Mar 13:53:26 - [info] [sqlitedb:1c25415d.b8427f] opened /home/pi/sqlite/noder                                                ed ok
22 Mar 13:53:26 - [info] [sqlitedb:1c25415d.b8427f] opened /home/pi/sqlite/noder                                                ed ok
22 Mar 13:53:26 - [info] [sqlitedb:1c25415d.b8427f] opened /home/pi/sqlite/noder                                                ed ok
22 Mar 13:53:26 - [info] [sqlitedb:1c25415d.b8427f] opened /home/pi/sqlite/noder                                                ed ok
22 Mar 13:53:26 - [info] [sqlitedb:3187c06b.70165] opened /home/pi/sqlite/diagno                                                stic ok
22 Mar 13:53:26 - [info] [sqlitedb:3187c06b.70165] opened /home/pi/sqlite/diagno                                                stic ok
22 Mar 13:53:26 - [info] [sqlitedb:3187c06b.70165] opened /home/pi/sqlite/diagno                                                stic ok
22 Mar 13:53:26 - [info] [sqlitedb:3187c06b.70165] opened /home/pi/sqlite/diagno                                                stic ok
22 Mar 13:53:26 - [info] [sqlitedb:3187c06b.70165] opened /home/pi/sqlite/diagno                                                stic ok
22 Mar 13:53:26 - [info] [sqlitedb:3187c06b.70165] opened /home/pi/sqlite/diagno                                                stic ok
22 Mar 13:53:26 - [info] [sqlitedb:3187c06b.70165] opened /home/pi/sqlite/diagno                                                stic ok
22 Mar 13:53:26 - [info] [sqlitedb:3187c06b.70165] opened /home/pi/sqlite/diagno                                                stic ok
22 Mar 13:53:26 - [info] [sqlitedb:3187c06b.70165] opened /home/pi/sqlite/diagno                                                stic ok
22 Mar 13:53:26 - [info] [sqlitedb:3187c06b.70165] opened /home/pi/sqlite/diagno                                                stic ok
22 Mar 13:53:26 - [info] [sqlitedb:3187c06b.70165] opened /home/pi/sqlite/diagno                                                stic ok
22 Mar 13:53:26 - [info] [sqlitedb:3187c06b.70165] opened /home/pi/sqlite/diagno                                                stic ok
22 Mar 13:53:26 - [info] [sqlitedb:3187c06b.70165] opened /home/pi/sqlite/diagno                                                stic ok
22 Mar 13:53:26 - [info] [sqlitedb:3187c06b.70165] opened /home/pi/sqlite/diagno                                                stic ok
22 Mar 13:53:26 - [info] [sqlitedb:3187c06b.70165] opened /home/pi/sqlite/diagno                                                stic ok
22 Mar 13:53:26 - [info] [sqlitedb:3187c06b.70165] opened /home/pi/sqlite/diagno                                                stic ok
22 Mar 13:53:26 - [info] [sqlitedb:3187c06b.70165] opened /home/pi/sqlite/diagno                                                stic ok
22 Mar 13:53:26 - [info] [sqlitedb:1c25415d.b8427f] opened /home/pi/sqlite/noder                                                ed ok
22 Mar 13:53:26 - [info] [sqlitedb:1c25415d.b8427f] opened /home/pi/sqlite/noder                                                ed ok
22 Mar 13:53:26 - [info] [sqlitedb:1c25415d.b8427f] opened /home/pi/sqlite/noder                                                ed ok
22 Mar 13:53:26 - [info] [sqlitedb:1c25415d.b8427f] opened /home/pi/sqlite/noder                                                ed ok
22 Mar 13:53:26 - [info] [sqlitedb:1c25415d.b8427f] opened /home/pi/sqlite/noder                                                ed ok
22 Mar 13:53:26 - [info] [sqlitedb:1c25415d.b8427f] opened /home/pi/sqlite/noder                                                ed ok
22 Mar 13:53:26 - [info] [sqlitedb:1c25415d.b8427f] opened /home/pi/sqlite/noder                                                ed ok
22 Mar 13:53:26 - [info] [sqlitedb:1c25415d.b8427f] opened /home/pi/sqlite/noder                                                ed ok
22 Mar 13:53:26 - [info] [sqlitedb:1c25415d.b8427f] opened /home/pi/sqlite/noder                                                ed ok
22 Mar 13:53:26 - [info] [modbusSerialConfig:a62a637d.eb2a6] Error: Port Not Ope                                                n
22 Mar 13:53:26 - [info] [mqtt-broker:cea5258a.b34038] Connected to broker: node                                                -red@mqtt://192.168.1.80:1883

Csongor Varga

unread,
Mar 22, 2017, 2:59:38 PM3/22/17
to Node-RED
I was playing around, updating the packages in npm, removing what I new I am not using. I got the editor back with no UI at all. I see all my flows. When I did a full deploy it told me that some of the nodes are unused. I updated / removed them. Did a deploy, made some changes, and yet again, it just keep deploying and deploying and nothing happens.
Same case as earlier today. Any ideas what is going wrong?

Colin Law

unread,
Mar 22, 2017, 4:51:24 PM3/22/17
to node...@googlegroups.com
Post here what you see in the terminal or log when you start node-red

If you add some debug nodes do they show that the flow is running?

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/17c39e7d-bade-4f7d-bada-c41c4bc7734f%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.

Csongor Varga

unread,
Mar 23, 2017, 3:50:40 AM3/23/17
to Node-RED
Hi Colin,

This is what I see. The log stops after the MQTT connect. Node red is not responding on port 1880, I don't see the admin or the UI. Nothing. Even when I was able to make UI to come online nothing was working. I clicked on  deploy, it was doing some stuff, but nothing worked. UI was empty, and I did not get any of the status emails I usually get if node-red restarts.

I did update some of my packages, for example the modbus serial which probably corrupted the serialport, but that should not be the reason not to start the entire node-red. Or at least I just hope, because I am still just a "node red end user".

This is what I see in the terminal:
pi@OpenHAB:~ $ node-red-start


    node.js v0.10 is NO LONGER supported.
    please consider upgrading to node.js LTS.

    you can do this with the following command:
        update-nodejs-and-nodered


Start Node-RED

Once Node-RED has started, point a browser at http://192.168.1.80:1880
On Pi Node-RED works better with the Firefox 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
You may also need to install and upgrade npm
      sudo apt-get install npm
      sudo npm i -g npm@2.x

Started Node-RED graphical event wiring tool..
Welcome to Node-RED
===================
23 Mar 08:45:54 - [info] Node-RED version: v0.15.2
23 Mar 08:45:54 - [info] Node.js  version: v0.10.29
23 Mar 08:45:54 - [info] Linux 4.4.13-v7+ arm LE
23 Mar 08:45:55 - [info] Loading palette nodes
pi : TTY=unknown ; PWD=/home/pi ; USER=root ; COMMAND=/usr/bin/python -u /usr/lib/node_modules/node-red/nodes/core/hardware/nrgpio.py info
pam_unix(sudo:session): session opened for user root by (uid=0)
pam_unix(sudo:session): session closed for user root
23 Mar 08:46:01 - [info] Dashboard version 2.3.5 started at /ui
23 Mar 08:46:04 - [warn] ------------------------------------------------------
23 Mar 08:46:04 - [warn] [serialport] Error: Could not locate the bindings file. Tried:
→ /usr/lib/node_modules/node-red-node-serialport/node_modules/serialport/build/serialport.node
→ /usr/lib/node_modules/node-red-node-serialport/node_modules/serialport/build/Debug/serialport.node
→ /usr/lib/node_modules/node-red-node-serialport/node_modules/serialport/build/Release/serialport.node
→ /usr/lib/node_modules/node-red-node-serialport/node_modules/serialport/out/Debug/serialport.node
→ /usr/lib/node_modules/node-red-node-serialport/node_modules/serialport/Debug/serialport.node
→ /usr/lib/node_modules/node-red-node-serialport/node_modules/serialport/out/Release/serialport.node
→ /usr/lib/node_modules/node-red-node-serialport/node_modules/serialport/Release/serialport.node
→ /usr/lib/node_modules/node-red-node-serialport/node_modules/serialport/build/default/serialport.node
→ /usr/lib/node_modules/node-red-node-serialport/node_modules/serialport/compiled/0.10.29/linux/arm/serialport.node
23 Mar 08:46:04 - [warn] ------------------------------------------------------
23 Mar 08:46:04 - [info] Settings file  : /home/pi/.node-red/settings.js
23 Mar 08:46:04 - [info] User directory : /home/pi/.node-red
23 Mar 08:46:04 - [info] Flows file     : /home/pi/.node-red/flows_OpenHAB.json
23 Mar 08:46:04 - [info] Server now running at https://127.0.0.1:1880/
23 Mar 08:46:04 - [info] Starting flows
pi : TTY=unknown ; PWD=/home/pi ; USER=root ; COMMAND=/usr/bin/python -u /usr/lib/node_modules/node-red/nodes/core/hardware/nrgpio.py out 11 1
pam_unix(sudo:session): session opened for user root by (uid=0)
pi : TTY=unknown ; PWD=/home/pi ; USER=root ; COMMAND=/usr/bin/python -u /usr/lib/node_modules/node-red/nodes/core/hardware/nrgpio.py out 13 1
pam_unix(sudo:session): session opened for user root by (uid=0)
pi : TTY=unknown ; PWD=/home/pi ; USER=root ; COMMAND=/usr/bin/python -u /usr/lib/node_modules/node-red/nodes/core/hardware/nrgpio.py out 15 1
pam_unix(sudo:session): session opened for user root by (uid=0)
pi : TTY=unknown ; PWD=/home/pi ; USER=root ; COMMAND=/usr/bin/python -u /usr/lib/node_modules/node-red/nodes/core/hardware/nrgpio.py out 16 1
pam_unix(sudo:session): session opened for user root by (uid=0)
23 Mar 08:46:17 - [info] Started flows
23 Mar 08:46:17 - [info] [sqlitedb:1c25415d.b8427f] opened /home/pi/sqlite/nodered ok
23 Mar 08:46:17 - [info] [sqlitedb:1c25415d.b8427f] opened /home/pi/sqlite/nodered ok
23 Mar 08:46:17 - [info] [sqlitedb:1c25415d.b8427f] opened /home/pi/sqlite/nodered ok
23 Mar 08:46:17 - [info] [sqlitedb:1c25415d.b8427f] opened /home/pi/sqlite/nodered ok
23 Mar 08:46:17 - [info] [sqlitedb:3187c06b.70165] opened /home/pi/sqlite/diagnostic ok
23 Mar 08:46:17 - [info] [sqlitedb:3187c06b.70165] opened /home/pi/sqlite/diagnostic ok
23 Mar 08:46:17 - [info] [sqlitedb:3187c06b.70165] opened /home/pi/sqlite/diagnostic ok
23 Mar 08:46:17 - [info] [sqlitedb:3187c06b.70165] opened /home/pi/sqlite/diagnostic ok
23 Mar 08:46:17 - [info] [sqlitedb:3187c06b.70165] opened /home/pi/sqlite/diagnostic ok
23 Mar 08:46:17 - [info] [sqlitedb:3187c06b.70165] opened /home/pi/sqlite/diagnostic ok
23 Mar 08:46:17 - [info] [sqlitedb:3187c06b.70165] opened /home/pi/sqlite/diagnostic ok
23 Mar 08:46:17 - [info] [sqlitedb:3187c06b.70165] opened /home/pi/sqlite/diagnostic ok
23 Mar 08:46:17 - [info] [sqlitedb:3187c06b.70165] opened /home/pi/sqlite/diagnostic ok
23 Mar 08:46:17 - [info] [sqlitedb:3187c06b.70165] opened /home/pi/sqlite/diagnostic ok
23 Mar 08:46:17 - [info] [sqlitedb:3187c06b.70165] opened /home/pi/sqlite/diagnostic ok
23 Mar 08:46:17 - [info] [sqlitedb:3187c06b.70165] opened /home/pi/sqlite/diagnostic ok
23 Mar 08:46:17 - [info] [sqlitedb:3187c06b.70165] opened /home/pi/sqlite/diagnostic ok
23 Mar 08:46:17 - [info] [sqlitedb:3187c06b.70165] opened /home/pi/sqlite/diagnostic ok
23 Mar 08:46:17 - [info] [sqlitedb:3187c06b.70165] opened /home/pi/sqlite/diagnostic ok
23 Mar 08:46:17 - [info] [sqlitedb:3187c06b.70165] opened /home/pi/sqlite/diagnostic ok
23 Mar 08:46:17 - [info] [sqlitedb:3187c06b.70165] opened /home/pi/sqlite/diagnostic ok
23 Mar 08:46:17 - [info] [sqlitedb:1c25415d.b8427f] opened /home/pi/sqlite/nodered ok
23 Mar 08:46:17 - [info] [sqlitedb:1c25415d.b8427f] opened /home/pi/sqlite/nodered ok
23 Mar 08:46:17 - [info] [sqlitedb:1c25415d.b8427f] opened /home/pi/sqlite/nodered ok
23 Mar 08:46:17 - [info] [sqlitedb:1c25415d.b8427f] opened /home/pi/sqlite/nodered ok
23 Mar 08:46:17 - [info] [sqlitedb:1c25415d.b8427f] opened /home/pi/sqlite/nodered ok
23 Mar 08:46:17 - [info] [sqlitedb:1c25415d.b8427f] opened /home/pi/sqlite/nodered ok
23 Mar 08:46:17 - [info] [sqlitedb:1c25415d.b8427f] opened /home/pi/sqlite/nodered ok
23 Mar 08:46:17 - [info] [sqlitedb:1c25415d.b8427f] opened /home/pi/sqlite/nodered ok
23 Mar 08:46:17 - [info] [sqlitedb:1c25415d.b8427f] opened /home/pi/sqlite/nodered ok
23 Mar 08:46:17 - [info] [mqtt-broker:cea5258a.b34038] Connected to broker: node-red@mqtt://192.168.1.80:1883

Dave C-J

unread,
Mar 23, 2017, 4:09:18 AM3/23/17
to node...@googlegroups.com
Ok - the clue is in line2...
    "node.js v0.10 is NO LONGER supported."
You said you were messing around updating some packages... - you have probably updated one that requires a supported version of node.js.
The way to get that updated and to latest version of core Node-RED that should all work together is to use the bash script on the docs page - http://nodered.org/docs/hardware/raspberrypi 

Zenofmud

unread,
Mar 23, 2017, 4:09:20 AM3/23/17
to node...@googlegroups.com
Hmmmm, did you read the first two lines after you enter ’node-red-start’ ?
 

Nick O'Leary

unread,
Mar 23, 2017, 4:17:10 AM3/23/17
to node...@googlegroups.com

The other clue is the roughly 30 log statements coming from the same sqlitedb in the same second. That does not seem normal to me and suggests that is the node causing the problems. Whether that is down to the node.js version you are using or not, it's hard to say. So aside from the suggestions of updating your node.js version, i would look more closely at the sqlitedb node.

Nick


Csongor Varga

unread,
Mar 23, 2017, 5:31:46 AM3/23/17
to Node-RED
I am sorry if you think these are dumb questions, but for somebody like me sometimes it needs to go down to such level.

I read the document, I have executed the update script. It was executed without any issues. I checked the outdated modules in npm as well.

When I start node-red it is telling me that I am missing the sqlite.
I did apt-get install sqlite3 but it was already on. I also did npm install node-red-node-sqlite and I can see it in the .node-red/node_modules folder. I have stopped and started node-red after installing the sqlite node.

I can see the warning about some missing module on sqlite3. Does it mean that the issue is with the sqlite itself not the node? What can I do in this case?
Welcome to Node-RED
===================
23 Mar 10:14:13 - [info] Node-RED version: v0.16.2
23 Mar 10:14:13 - [info] Node.js  version: v4.8.1
23 Mar 10:14:13 - [info] Linux 4.4.13-v7+ arm LE
23 Mar 10:14:14 - [info] Loading palette nodes
pi : TTY=unknown ; PWD=/home/pi ; USER=root ; COMMAND=/usr/bin/python -u /usr/lib/node_modules/node-red/nodes/core/hardware/nrgpio.py info
pam_unix(sudo:session): session opened for user root by (uid=0)
pam_unix(sudo:session): session closed for user root
23 Mar 10:14:19 - [info] Dashboard version 2.3.6 started at /ui
23 Mar 10:14:22 - [warn] ------------------------------------------------------
23 Mar 10:14:22 - [warn] [sqlite] Error: Cannot find module '/home/pi/.node-red/node_modules/sqlite3/lib/binding/node-v46-linux-arm/node_sqlite3.node'
23 Mar 10:14:22 - [warn] ------------------------------------------------------
23 Mar 10:14:22 - [info] Settings file  : /home/pi/.node-red/settings.js
23 Mar 10:14:22 - [info] User directory : /home/pi/.node-red
23 Mar 10:14:22 - [info] Flows file     : /home/pi/.node-red/flows_OpenHAB.json
23 Mar 10:14:22 - [info] Server now running at https://127.0.0.1:1880/
23 Mar 10:14:23 - [info] Waiting for missing types to be registered:
23 Mar 10:14:23 - [info]  - sqlitedb
23 Mar 10:14:23 - [info]  - sqlite
      sudo npm i -g n...@2.x

Zenofmud

unread,
Mar 23, 2017, 6:13:15 AM3/23/17
to node...@googlegroups.com
Interesting, I just did a ‘npm install node-red-node-sqlite’ and it got an ‘403’ trying to get a library from amazons and fell back to doing a compile. 

In your case you gt the error message:
Error: Cannot find module '/home/pi/.node-red/node_modules/sqlite3/lib/binding/node-v48-linux-arm/node_sqlite3.node’
but when I look in '/home/pi/.node-red/node_modules/sqlite3/lib/binding’ I see ‘node-v48-linux-arm’ where you are looking for 'node-v46-linux-arm’

do a ‘ls $home.node-red/node_modules/sqlite3/lib/binding’ and see what version of node you have.

If it is v46, I would try removing node-red-node-sqlite and reinstalling it
cd $home
cd .node-red
npm remove node-red-node-sqlite
npm install node-red-node-sqlite
and see what happens

Csongor Varga

unread,
Mar 23, 2017, 6:24:33 AM3/23/17
to Node-RED
I have node-v11-linux-arm, interesting. This is a RPi 3.

I did remove and install again, and it is the same. I only have a node-v11-linux-arm folder, nothing else.

Dave C-J

unread,
Mar 23, 2017, 8:12:22 AM3/23/17
to node...@googlegroups.com
Slightly odd - if you had done as I suggested and run the bash script from the docs you should have ended up with node.js version 6.x not 4.x... 
(But 4.x should be OK).

Csongor Varga

unread,
Mar 23, 2017, 9:10:43 AM3/23/17
to Node-RED
I did run the node red and node js update script. I think there are some oddities with my pi anyway....

Dave C-J

unread,
Mar 23, 2017, 9:26:45 AM3/23/17
to node...@googlegroups.com
The one that starts  "bash <(curl...
?
ah well. so - back to sqlite... I would remove it as suggested - but before re-install
    cd ~/.node-red
    npm cache clear
then re-install the node - and report and log errors back here  - noting that npm warn  are not errors :-)  

Csongor Varga

unread,
Mar 23, 2017, 9:45:33 AM3/23/17
to Node-RED
OK, So I suspect that I did something wrong here. Yes, I followed the tutorial. But it says above the "bash <(curl..." line that if you do not have Node-Red already installed, I should do that. Since I have it, I just gone to the next step and executed update-nodejs-and-nodered. So that explains why I only have nodejs 4.x and not 6.x?

Shall I go and run the update script using the bash curl?

I did the following for sqlite:
pi@OpenHAB:~ $ cd ~/.node-red
pi@OpenHAB:~/.node-red $ sudo npm remove node-red-node-sqlite
unbuild node-red-n...@0.1.2
pi@OpenHAB:~/.node-red $ npm cache clear
pi@OpenHAB:~/.node-red $ sudo npm install node-red-node-sqlite
node-red-n...@0.1.2 node_modules/node-red-node-sqlite

I checked and the ~/.node-red/node_modules/sqlite3/lib/binding still only contains node-v11-linux-arm.

Dave C-J

unread,
Mar 23, 2017, 10:31:32 AM3/23/17
to node...@googlegroups.com
where does it day to use sudo to install it ?

Csongor Varga

unread,
Mar 23, 2017, 10:39:31 AM3/23/17
to Node-RED
npm asked me to do so:

pi@OpenHAB:~ $ cd ~/.node-red
pi@OpenHAB:~/.node-red $ npm remove node-red-node-sqlite
unbuild node-red-n...@0.1.2
npm ERR! Linux 4.4.13-v7+
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "remove" "node-red-node-sqlite"
npm ERR! node v4.8.1
npm ERR! npm  v2.15.11
npm ERR! path /home/pi/.node-red/node_modules/node-red-node-sqlite
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall rmdir

npm ERR! Error: EACCES: permission denied, rmdir '/home/pi/.node-red/node_modules/node-red-node-sqlite'
npm ERR!     at Error (native)
npm ERR!  { [Error: EACCES: permission denied, rmdir '/home/pi/.node-red/node_modules/node-red-node-sqlite']
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'rmdir',
npm ERR!   path: '/home/pi/.node-red/node_modules/node-red-node-sqlite' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/pi/.node-red/npm-debug.log
pi@OpenHAB:~/.node-red $

Dave C-J

unread,
Mar 23, 2017, 11:07:07 AM3/23/17
to node...@googlegroups.com
ah.. right - once you did it once it created the directory with root - you were then stuck with it...  but don't have to be...
  cd ~/home/pi/.node-red/node_modules/
  sudo rm -rf node-red-node-sqlite
to really get rid of it... then install without root

Zenofmud

unread,
Mar 23, 2017, 11:18:18 AM3/23/17
to node...@googlegroups.com
Just to let you know, I just did a new install of jessie lite on a pi3 and installed node-red-node-sqlite. I then used the test database flow (http://flows.nodered.org/flow/2c48fc395772e22ecc64) and (other than having to create the table) everything works fine.

Note: there is no '.node-red/node_modules/sqlite3’ folder when I do this.

 
--
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.

Csongor Varga

unread,
Mar 23, 2017, 11:54:29 AM3/23/17
to node...@googlegroups.com
OK, this is just great. I am back to square one. I removed the node and also the sqlite3 folder using rm. I changed the node-modules folder owner to pi and installed the node-red-node-sqlite back with npm without sudo. There was a whole load of messages on the screen, but the node installed after all.
Now when I start node-red, I am back at the same issues as the beginning. There is a load of sqlite items in the terminal log, it stops after the MQTT connect, and node red does not respond to anything on port 1880. So it is definitely and issue with sqlite.

This is what I got for the npm. Can anyone make a sense of it?

pi@OpenHAB:~/.node-red/node_modules $ npm install node-red-node-sqlite
/
> sql...@3.1.8 install /home/pi/.node-red/node_modules/node-red-node-sqlite/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Pre-built binaries not found for sql...@3.1.8 and no...@4.8.1 (node-v46 ABI) (falling back to source compile with node-gyp)
make: Entering directory '/home/pi/.node-red/node_modules/node-red-node-sqlite/node_modules/sqlite3/build'
  ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3150000/sqlite3.c
  TOUCH Release/obj.target/deps/action_before_build.stamp
  CC(target) Release/obj.target/sqlite3/gen/sqlite-autoconf-3150000/sqlite3.o
  AR(target) Release/obj.target/deps/sqlite3.a
  COPY Release/sqlite3.a
  CXX(target) Release/obj.target/node_sqlite3/src/database.o
../src/database.cc: In static member function ‘static void node_sqlite3::Database::Work_BeginOpen(node_sqlite3::Database::Baton*)’:
../src/database.cc:144:9: warning: unused variable ‘status’ [-Wunused-variable]
     int status = uv_queue_work(uv_default_loop(),
         ^
../src/database.cc: In static member function ‘static void node_sqlite3::Database::Work_BeginClose(node_sqlite3::Database::Baton*)’:
../src/database.cc:230:9: warning: unused variable ‘status’ [-Wunused-variable]
     int status = uv_queue_work(uv_default_loop(),
         ^
../src/database.cc: In static member function ‘static void node_sqlite3::Database::Work_BeginExec(node_sqlite3::Database::Baton*)’:
../src/database.cc:525:9: warning: unused variable ‘status’ [-Wunused-variable]
     int status = uv_queue_work(uv_default_loop(),
         ^
../src/database.cc: In static member function ‘static void node_sqlite3::Database::Work_BeginLoadExtension(node_sqlite3::Database::Baton*)’:
../src/database.cc:625:9: warning: unused variable ‘status’ [-Wunused-variable]
     int status = uv_queue_work(uv_default_loop(),
         ^
  CXX(target) Release/obj.target/node_sqlite3/src/node_sqlite3.o
  CXX(target) Release/obj.target/node_sqlite3/src/statement.o
../src/statement.cc: In static member function ‘static void node_sqlite3::Statement::Work_BeginPrepare(node_sqlite3::Database::Baton*)’:
../src/statement.cc:118:9: warning: unused variable ‘status’ [-Wunused-variable]
     int status = uv_queue_work(uv_default_loop(),
         ^
In file included from ../src/statement.cc:6:0:
../src/statement.cc: In static member function ‘static void node_sqlite3::Statement::Work_BeginBind(node_sqlite3::Statement::Baton*)’:
../src/macros.h:125:9: warning: unused variable ‘status’ [-Wunused-variable]
     int status = uv_queue_work(uv_default_loop(),                              \
         ^
../src/statement.cc:322:5: note: in expansion of macro ‘STATEMENT_BEGIN’
     STATEMENT_BEGIN(Bind);
     ^
../src/statement.cc: In static member function ‘static void node_sqlite3::Statement::Work_BeginGet(node_sqlite3::Statement::Baton*)’:
../src/macros.h:125:9: warning: unused variable ‘status’ [-Wunused-variable]
     int status = uv_queue_work(uv_default_loop(),                              \
         ^
../src/statement.cc:370:5: note: in expansion of macro ‘STATEMENT_BEGIN’
     STATEMENT_BEGIN(Get);
     ^
../src/statement.cc: In static member function ‘static void node_sqlite3::Statement::Work_BeginRun(node_sqlite3::Statement::Baton*)’:
../src/macros.h:125:9: warning: unused variable ‘status’ [-Wunused-variable]
     int status = uv_queue_work(uv_default_loop(),                              \
         ^
../src/statement.cc:438:5: note: in expansion of macro ‘STATEMENT_BEGIN’
     STATEMENT_BEGIN(Run);
     ^
../src/statement.cc: In static member function ‘static void node_sqlite3::Statement::Work_BeginAll(node_sqlite3::Statement::Baton*)’:
../src/macros.h:125:9: warning: unused variable ‘status’ [-Wunused-variable]
     int status = uv_queue_work(uv_default_loop(),                              \
         ^
../src/statement.cc:504:5: note: in expansion of macro ‘STATEMENT_BEGIN’
     STATEMENT_BEGIN(All);
     ^
../src/statement.cc: In static member function ‘static void node_sqlite3::Statement::Work_BeginEach(node_sqlite3::Statement::Baton*)’:
../src/macros.h:125:9: warning: unused variable ‘status’ [-Wunused-variable]
     int status = uv_queue_work(uv_default_loop(),                              \
         ^
../src/statement.cc:601:5: note: in expansion of macro ‘STATEMENT_BEGIN’
     STATEMENT_BEGIN(Each);
     ^
../src/statement.cc: In static member function ‘static void node_sqlite3::Statement::Work_BeginReset(node_sqlite3::Statement::Baton*)’:
../src/macros.h:125:9: warning: unused variable ‘status’ [-Wunused-variable]
     int status = uv_queue_work(uv_default_loop(),                              \
         ^
../src/statement.cc:724:5: note: in expansion of macro ‘STATEMENT_BEGIN’
     STATEMENT_BEGIN(Reset);
     ^
  SOLINK_MODULE(target) Release/obj.target/node_sqlite3.node
  COPY Release/node_sqlite3.node
  COPY /home/pi/.node-red/node_modules/node-red-node-sqlite/node_modules/sqlite3/lib/binding/node-v46-linux-arm/node_sqlite3.node
  TOUCH Release/obj.target/action_after_build.stamp
make: Leaving directory '/home/pi/.node-red/node_modules/node-red-node-sqlite/node_modules/sqlite3/build'
node-red-n...@0.1.2 node-red-node-sqlite
└── sql...@3.1.8
pi@OpenHAB:~/.node-red/node_modules $


--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to a topic in the Google Groups "Node-RED" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/node-red/jn3LPlsw0SA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to node-red+unsubscribe@googlegroups.com.

To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.

Colin Law

unread,
Mar 23, 2017, 12:02:00 PM3/23/17
to node...@googlegroups.com
Normally you should run npm install from the .node-red folder, not
from .node-red/node_modules, though I don't know whether that would
give the problem you are seeing.

Colin
>> 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/CACXWFwJBc27U7thqo%2BOBfzbsq0LRdfOdRK%2Ba-txHjvNSOSWnjQ%40mail.gmail.com.
>>
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> 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/CAPLeVP2gokbPFt0D8UGDYCy%3Dta3uro53iDeDC6Onzy6As%2BUtiA%40mail.gmail.com.

Zenofmud

unread,
Mar 23, 2017, 12:10:07 PM3/23/17
to node...@googlegroups.com
I got the same error messages ( the node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.8/node-v46-linux-arm.tar.gz when doing the install and it just then builds the node itself.

Remove the version you have then go back to the .node-red folder and re install it
cd $home
cd .node-red/node_modules
npm remove node-red-node-sqlite
cd ..
npm install node-red-node-sqlite

and then start node-red

Dave C-J

unread,
Mar 23, 2017, 12:22:58 PM3/23/17
to node...@googlegroups.com
though all those lines seem to be warnings not errors...  so at least the compile seems to have worked.

Csongor Varga

unread,
Mar 23, 2017, 1:36:54 PM3/23/17
to Node-RED
This did not help, the issue is exactly the same as before. As Nick mentioned the fact that 30 messages are coming from the same sqlite node suggest that there is something wrong with the module. And when the module was not installed at least the editor was loading without any issues.

But I am not really sure what I can do this point. I can't do much in Node-Red as the editor is not loading. Sqlite appears to be fine as well, since the npm is working without any errors. The flow was loading to the editor earlier today when I was able to access it without sqlite, so I thin that is not corrupt. But I can try restoring the last know version from day before yesterday just in case. That is all I can think of right now.

Dave C-J

unread,
Mar 23, 2017, 2:19:58 PM3/23/17
to node...@googlegroups.com
well ... the final thing you can try is to fully upgrade to node.js 6.x... 
to do that you can delete the file  /etc/apt/sources.list.d/nodesource.list
and then run the  Node-RED bash command again... - (not the update command) - and sit back... that should then get you node.js 6.10.1 as well as Node-RED...  I would also uninstall any other sqlite npm and just let the node-red node install the one it wants instead... and then finally if that all doesn't work.. then yeah... we must be just about out of options...

Zenofmud

unread,
Mar 23, 2017, 3:17:12 PM3/23/17
to node...@googlegroups.com
What other nodes do you have installed? There maybe a conflict between some other node since my install of the sqlite note works fine.

-- 
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.

Csongor Varga

unread,
Mar 23, 2017, 3:42:51 PM3/23/17
to Node-RED
This is what I have installed:

/home/pi/.node-red
├── datef...@2.0.0
├── n...@2.4.0
├── node-p...@0.6.34
├── node-red-con...@1.5.7
├── node-red-contri...@1.2.7
├── node-red-co...@0.0.11
├── node-red-co...@0.0.5
├── node-red-...@0.1.7
├── node-red-contri...@0.0.10
├── node-red-contrib-sim...@0.0.10
├── node-red-cont...@0.0.5
├── node-red-cont...@1.1.0
├── node-red-...@2.3.6
├── node-red-n...@0.1.2
└── node-red-nod...@0.0.6

/usr/lib
├── node...@0.16.2
├── node-re...@0.1.3
├── node-red-contri...@0.2.8
├── node-red-cont...@2.2.2
├── node-red-n...@0.0.17
├── node-red-node...@0.0.11
├── node-red-...@0.0.13
├── node-red-n...@0.0.8
├── node-red-nod...@0.4.2
├── node-red-n...@0.0.10
└── n...@2.15.11

Zenofmud

unread,
Mar 23, 2017, 5:54:26 PM3/23/17
to node...@googlegroups.com
Well I installed all of that and the only issue I have is with the serialport node. The UI works fine for my limited test. Here is what I see at startup:
23 Mar 21:37:40 - [info] Node-RED version: v0.16.2
23 Mar 21:37:40 - [info] Node.js  version: v4.8.1
23 Mar 21:37:40 - [info] Linux 4.4.50-v7+ arm LE
23 Mar 21:37:41 - [info] Loading palette nodes
23 Mar 21:37:46 - [info] Dashboard version 2.3.6 started at /ui
23 Mar 21:37:49 - [warn] ------------------------------------------------------
23 Mar 21:37:49 - [warn] [serialport] Error: Could not locate the bindings file. Tried:
 → /usr/lib/node_modules/node-red-node-serialport/node_modules/serialport/build/serialport.node
 → /usr/lib/node_modules/node-red-node-serialport/node_modules/serialport/build/Debug/serialport.node
 → /usr/lib/node_modules/node-red-node-serialport/node_modules/serialport/build/Release/serialport.node
 → /usr/lib/node_modules/node-red-node-serialport/node_modules/serialport/out/Debug/serialport.node
 → /usr/lib/node_modules/node-red-node-serialport/node_modules/serialport/Debug/serialport.node
 → /usr/lib/node_modules/node-red-node-serialport/node_modules/serialport/out/Release/serialport.node
 → /usr/lib/node_modules/node-red-node-serialport/node_modules/serialport/Release/serialport.node
 → /usr/lib/node_modules/node-red-node-serialport/node_modules/serialport/build/default/serialport.node
 → /usr/lib/node_modules/node-red-node-serialport/node_modules/serialport/compiled/4.8.1/linux/arm/serialport.node
23 Mar 21:37:49 - [warn] ------------------------------------------------------
23 Mar 21:37:49 - [info] Settings file  : /home/pi/.node-red/settings.js
23 Mar 21:37:49 - [info] User directory : /home/pi/.node-red
23 Mar 21:37:49 - [info] Flows file     : /home/pi/.node-red/flows_pi3test.json
23 Mar 21:37:49 - [info] Server now running at http://127.0.0.1:1880/
23 Mar 21:37:49 - [info] Starting flows
23 Mar 21:37:49 - [info] Started flows
23 Mar 21:37:49 - [info] [sqlitedb:b0adbbe9.5d1828] opened /tmp/pmwdb ok
23 Mar 21:37:49 - [info] [sqlitedb:a81a1f87.b93658] opened test.sqlite ok

Csongor Varga

unread,
Mar 24, 2017, 7:38:42 AM3/24/17
to Node-RED
Hi Everyone,

I wanted to thank you for all the help done so far. I ran the bash update again as suggested by Dave. Now I am on nodejs 6.x. But this actually did not resolve the issue. After putting sqlite back again, I faced the same problem, as I have seen originally. Loads of sqlite messages in the log and the server is not starting.
I did restore my flows that was backed up the night before the issue started. I started node-red and it is all fine now. I lost some logic, but I rather redo it because these past days been more headache for me. 
So I think the flow file got corrupted at some point. I have the file if anyone feels the need to debug it.

Lessons learned: backup, backup and backup. And use node-red to make the backup, so if node-red goes tits up it does not mess up the backed up data.
Reply all
Reply to author
Forward
0 new messages