sdetweil/MagicMirror_scripts

A node process is currently running. Can't upgrade.

Closed this issue · 8 comments

I am trying to install MM, however, when I run the script, I am getting the following, even though as you can see the only node process seems to be the one that creates the install.log file:

install starting  - Tue Mar 22 07:37:40 EET 2022
installing on armv7l processor system
the os is Distributor ID: Raspbian Description: Raspbian GNU/Linux 11 (bullseye) Release: 11 Codename: bullseye
issue.txt info Raspberry Pi reference 2019-04-08 Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, e910bf55ac92e27c6e77043e8995bcb5e0a2d742, stage5
Installing helper tools ...
Reading package lists...
Building dependency tree...
Reading state information...
build-essential is already the newest version (12.9).
curl is already the newest version (7.74.0-1.3+deb11u1).
git is already the newest version (1:2.30.2-1).
pv is already the newest version (1.6.6-1).
unzip is already the newest version (6.0-26).
wget is already the newest version (1.21-1+deb11u1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Updating packages ...
Hit:1 https://dtcooper.github.io/raspotify raspotify InRelease Hit:2 https://deb.nodesource.com/node_10.x stretch InRelease Hit:3 http://raspbian.raspberrypi.org/raspbian bullseye InRelease Hit:4 http://archive.raspberrypi.org/debian buster InRelease Reading package lists...
apt-get update  completed ok
apt-get upgrade  started
apt upgrade result =rc=0 Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Check current Node installation ...
Node currently installed. Checking version number.
Minimum Node version: v16.9.1
Installed Node version: v12.22.5
Node should be upgraded.
A Node process is currently running. Can't upgrade.
Please quit all Node processes and restart the installer.
pi 10172 9900 0 07:37 pts/0 00:00:00 tee -a /home/pi/install.log

I updated Node to v.16 manually and then ran the script - that seemed to do the job

I am reopening so I can track a fix

@ivanovd thanks.. I have fixed the problem

Same happens with the update script :(

can u show me the installers/upgrade.log

u must stop magicmirror before doing the upgrade.

@sdetweil I can't since I downloaded the update script locally and changed line 119

from:
node_running=$(ps -ef | grep "node " | grep -v color)
to
node_running=$(ps -ef | grep "node " | grep -v color | grep -v grep)

and it worked and I closed the session so can't see the log, but MagicMirror was stopped, I think it just captures grep used to find node processes as an actual node process, I see that this has been fixed in the install script, but in the update script that was not added.

weird the -v color is supposed to remove the grep command

fixed again. check for grep instead of color