A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
Read the statement by Michael Teeuw here.
Fresh install but pm2 error
-
-rwxr-xr-x 1 pi pi 1989 Jan 16 20:05 /home/pi/MagicMirror/run-start.sh*
-
@Hubschra01 weird…
can u change line 1 of run-start.sh to
#!/bin/bash -x
do pm2 flush
and then rebootthen show the pm2 logs --lines=100
this has got to be a permissions error
-
@sdetweil
here it is…PM2 | 2020-01-20T16:05:29: PM2 log: App [MagicMirror:0] exited with code [2] via signal [SIGINT] PM2 | 2020-01-20T16:05:29: PM2 log: App [MagicMirror:0] starting in -fork mode- PM2 | 2020-01-20T16:05:29: PM2 log: App [MagicMirror:0] online PM2 | 2020-01-20T16:05:31: PM2 log: Stopping app:MagicMirror id:0 PM2 | 2020-01-20T16:05:31: PM2 log: pid=1305 msg=failed to kill - retryin g in 100ms PM2 | 2020-01-20T16:05:31: PM2 log: pid=1305 msg=failed to kill - retryin g in 100ms PM2 | 2020-01-20T16:05:32: PM2 log: pid=1305 msg=failed to kill - retryin g in 100ms PM2 | 2020-01-20T16:05:32: PM2 log: pid=1305 msg=failed to kill - retryin g in 100ms PM2 | 2020-01-20T16:05:32: PM2 log: pid=1305 msg=failed to kill - retryin g in 100ms PM2 | 2020-01-20T16:05:32: PM2 log: pid=1305 msg=failed to kill - retryin g in 100ms PM2 | 2020-01-20T16:05:32: PM2 log: pid=1305 msg=failed to kill - retryin g in 100ms PM2 | 2020-01-20T16:05:32: PM2 log: pid=1305 msg=failed to kill - retryin g in 100ms PM2 | 2020-01-20T16:05:32: PM2 log: pid=1305 msg=failed to kill - retryin g in 100ms PM2 | 2020-01-20T16:05:32: PM2 log: pid=1305 msg=failed to kill - retryin g in 100ms PM2 | 2020-01-20T16:05:32: PM2 log: pid=1305 msg=failed to kill - retryin g in 100ms PM2 | 2020-01-20T16:05:32: PM2 log: pid=1305 msg=failed to kill - retryin g in 100ms PM2 | 2020-01-20T16:05:33: PM2 log: pid=1305 msg=failed to kill - retryin g in 100ms PM2 | 2020-01-20T16:05:33: PM2 log: pid=1305 msg=failed to kill - retryin g in 100ms PM2 | 2020-01-20T16:05:33: PM2 log: pid=1305 msg=failed to kill - retryin g in 100ms PM2 | 2020-01-20T16:05:33: PM2 log: Process with pid 1305 still alive aft er 1600ms, sending it SIGKILL now... PM2 | 2020-01-20T16:05:33: PM2 log: App [MagicMirror:0] exited with code [0] via signal [SIGKILL] PM2 | 2020-01-20T16:05:33: PM2 log: pid=1305 msg=process killed PM2 | 2020-01-20T16:05:33: PM2 log: PM2 successfully stopped PM2 | 2020-01-20T16:05:48: PM2 log: ===================================== ========================================== PM2 | 2020-01-20T16:05:48: PM2 log: --- New PM2 Daemon started ---------- ------------------------------------------ PM2 | 2020-01-20T16:05:48: PM2 log: Time : Mon Jan 20 202 0 16:05:48 GMT+0100 (GMT+01:00) PM2 | 2020-01-20T16:05:48: PM2 log: PM2 version : 4.2.1 PM2 | 2020-01-20T16:05:48: PM2 log: Node.js version : 10.18.1 PM2 | 2020-01-20T16:05:48: PM2 log: Current arch : arm PM2 | 2020-01-20T16:05:48: PM2 log: PM2 home : /home/pi/.pm2 PM2 | 2020-01-20T16:05:48: PM2 log: PM2 PID file : /home/pi/.pm2/ pm2.pid PM2 | 2020-01-20T16:05:48: PM2 log: RPC socket file : /home/pi/.pm2/ rpc.sock PM2 | 2020-01-20T16:05:48: PM2 log: BUS socket file : /home/pi/.pm2/ pub.sock PM2 | 2020-01-20T16:05:48: PM2 log: Application log path : /home/pi/.pm2/ logs PM2 | 2020-01-20T16:05:48: PM2 log: Worker Interval : 30000 PM2 | 2020-01-20T16:05:48: PM2 log: Process dump file : /home/pi/.pm2/ dump.pm2 PM2 | 2020-01-20T16:05:48: PM2 log: Concurrent actions : 2 PM2 | 2020-01-20T16:05:48: PM2 log: SIGTERM timeout : 1600 PM2 | 2020-01-20T16:05:48: PM2 log: ===================================== ========================================== PM2 | 2020-01-20T16:05:48: PM2 log: App [MagicMirror:0] starting in -fork mode- PM2 | 2020-01-20T16:05:49: PM2 log: App [MagicMirror:0] online /home/pi/.pm2/logs/MagicMirror-error.log last 100 lines: 0|MagicMir | ./run-start.sh: Zeile 68: Syntaxfehler beim unerwarteten Wort `fi' 0|MagicMir | ./run-start.sh: Zeile 68: `fi' 0|MagicMir | npm ERR! code ELIFECYCLE 0|MagicMir | npm ERR! errno 2 0|MagicMir | npm ERR! magicmirror@2.10.1 start: `./run-start.sh` 0|MagicMir | npm ERR! Exit status 2 0|MagicMir | npm ERR! 0|MagicMir | npm ERR! Failed at the magicmirror@2.10.1 start script. 0|MagicMir | npm ERR! This is probably not a problem with npm. There is likely a dditional logging output above. 0|MagicMir | 0|MagicMir | npm ERR! A complete log of this run can be found in: 0|MagicMir | npm ERR! /home/pi/.npm/_logs/2020-01-20T15_05_29_835Z-debug.log 0|MagicMir | + ./untrack-css.sh 0|MagicMir | + '[' -z :0 ']' 0|MagicMir | ++ uname -m 0|MagicMir | + arch=armv7l 0|MagicMir | + false=false 0|MagicMir | ++ grep -v '^\s//' config/config.js 0|MagicMir | ++ grep -i serveronly: 0|MagicMir | ++ tr -d ',"'\''' 0|MagicMir | ++ awk '{print tolower($2)}' 0|MagicMir | + serveronly= 0|MagicMir | + serveronly=false 0|MagicMir | ++ pgrep Xorg 0|MagicMir | + xorg= 0|MagicMir | ++ uname 0|MagicMir | + mac=Linux 0|MagicMir | + '[' false. '!=' false. -o armv7l == armv6l ']' 0|MagicMir | + '[' . == . -a Linux '!=' Darwin ']' 0|MagicMir | + '[' false. == true. -o . == . ']' 0|MagicMir | + node serveronly 0|MagicMir | + ./untrack-css.sh 0|MagicMir | + '[' -z :0 ']' 0|MagicMir | ++ uname -m 0|MagicMir | + arch=armv7l 0|MagicMir | + false=false 0|MagicMir | ++ grep -i serveronly: 0|MagicMir | ++ tr -d ',"'\''' 0|MagicMir | ++ awk '{print tolower($2)}' 0|MagicMir | ++ grep -v '^\s//' config/config.js 0|MagicMir | + serveronly= 0|MagicMir | + serveronly=false 0|MagicMir | ++ pgrep Xorg 0|MagicMir | + xorg=437 0|MagicMir | ++ uname 0|MagicMir | + mac=Linux 0|MagicMir | + '[' false. '!=' false. -o armv7l == armv6l ']' 0|MagicMir | + '[' 437. == . -a Linux '!=' Darwin ']' 0|MagicMir | + electron js/electron.js /home/pi/.pm2/logs/MagicMirror-out.log last 100 lines: 0|MagicMir | 0|MagicMir | > magicmirror@2.10.1 start /home/pi/MagicMirror 0|MagicMir | > ./run-start.sh 0|MagicMir | 0|MagicMir | [16:05:33.029] [LOG] Starting MagicMirror: v2.10.1 0|MagicMir | [16:05:33.045] [LOG] Loading config ... 0|MagicMir | [16:05:33.054] [LOG] Loading module helpers ... 0|MagicMir | [16:05:33.057] [LOG] No helper found for module: alert. 0|MagicMir | [16:05:33.129] [LOG] Initializing new module helper ... 0|MagicMir | [16:05:33.131] [LOG] Module helper loaded: updatenotification 0|MagicMir | [16:05:33.132] [LOG] No helper found for module: clock. 0|MagicMir | 0|MagicMir | > magicmirror@2.10.1 start /home/pi/MagicMirror 0|MagicMir | > ./run-start.sh 0|MagicMir | 0|MagicMir | [16:05:56.837] [LOG] Starting MagicMirror: v2.10.1 0|MagicMir | [16:05:56.853] [LOG] Loading config ... 0|MagicMir | [16:05:56.872] [LOG] Loading module helpers ... 0|MagicMir | [16:05:56.875] [LOG] No helper found for module: alert. 0|MagicMir | [16:05:57.006] [LOG] Initializing new module helper ... 0|MagicMir | [16:05:57.012] [LOG] Module helper loaded: updatenotification 0|MagicMir | [16:05:57.014] [LOG] No helper found for module: clock. 0|MagicMir | [16:05:58.224] [LOG] Initializing new module helper ... 0|MagicMir | [16:05:58.225] [LOG] Module helper loaded: calendar 0|MagicMir | [16:05:58.226] [LOG] No helper found for module: currentweather. 0|MagicMir | [16:05:58.227] [LOG] No helper found for module: weatherforecast . 0|MagicMir | [16:05:58.315] [LOG] Initializing new module helper ... 0|MagicMir | [16:05:58.316] [LOG] Module helper loaded: newsfeed 0|MagicMir | [16:05:58.316] [LOG] All module helpers loaded. 0|MagicMir | [16:05:58.318] [LOG] Starting server on port 8080 ... 0|MagicMir | [16:05:58.341] [LOG] Server started ... 0|MagicMir | [16:05:58.343] [LOG] Connecting socket for: updatenotification 0|MagicMir | [16:05:58.345] [LOG] Connecting socket for: calendar 0|MagicMir | [16:05:58.346] [LOG] Starting node helper for: calendar 0|MagicMir | [16:05:58.347] [LOG] Connecting socket for: newsfeed 0|MagicMir | [16:05:58.349] [LOG] Starting module: newsfeed 0|MagicMir | [16:05:58.349] [LOG] Sockets connected & modules started ... 0|MagicMir | [16:05:59.000] [LOG] Launching application. 0|MagicMir | [16:06:02.809] [LOG] Create new calendar fetcher for url: https:
-
@Hubschra01 said in Fresh install but pm2 error:
0|MagicMir | ./run-start.sh: Zeile 68: Syntaxfehler beim unerwarteten Wort `fi’
there is the problem, syntax error…
can show the run-start.sh
I have to leave in about 15 minutes for the rest of the day
-
here is the run-start.sh
#!/bin/bash -x # use bash instead of sh ./untrack-css.sh if [ -z "$DISPLAY" ]; then #If not set DISPLAY is SSH remote or tty export DISPLAY=:0 # Set by default display fi # get the processor architecture arch=$(uname -m) false='false' # get the config option, if any # only check non comment lines serveronly=$(grep -v '^\s//' config/config.js | grep -i serveronly: | awk '{print tolower($2)}' | tr -d ,\"\') # set default if not defined in config serveronly=${serveronly:-false} # check for xwindows running xorg=$(pgrep Xorg) #check for macOS mac=$(uname) # # if the user requested serveronly OR # electron support for armv6l has been dropped OR # system is in text mode # if [ "$serveronly." != "false." -o "$arch" == "armv6l" ] || [ "$xorg." == "." -a $mac != 'Darwin' ]; then # if user explicitly configured to run server only (no ui local) # OR there is no xwindows running, so no support for browser graphics if [ "$serveronly." == "true." -o "$xorg." == "." ]; then # start server mode, node serveronly else # start the server in the background # wait for server to be ready # need bash for this exec 3< <(node serveronly) # Read the output of server line by line until one line 'point your browser' while read line; do case "$line" in *point\ your\ browser*) echo $line break ;; *) echo $line #sleep .25 ;; esac done <&3 # Close the file descriptor exec 3<&- # lets use chrome to display here now # get the server port address from the ready message port=$(echo $line | awk -F\: '{print $4}') # start chromium echo "Starting chromium browser now, have patience, it takes a minute" chromium-browser -noerrdialogs -kiosk -start_maximized --disable-infobars --app=http://localhost:$port --ignore-certificate-errors-spki-list --ignore-ssl-errors --ignore-certificate-errors 2>/dev/null exit fi else # we can use electron directly electron js/electron.js $1; fi
-
@Hubschra01 i don’t know… weird… don’t have more time today
-
Are u running two copies?
pm2 status
-
No it is only one to see…
pi@raspberrypi:~/MagicMirror $ pm2 status ┌────┬────────────────────┬──────────┬──────┬───────────┬──────────┬──────────┐ │ id │ name │ mode │ ↺ │ status │ cpu │ memory │ ├────┼────────────────────┼──────────┼──────┼───────────┼──────────┼──────────┤ │ 0 │ MagicMirror │ fork │ 0 │ online │ 0% │ 2.4mb │ └────┴────────────────────┴──────────┴──────┴───────────┴──────────┴──────────┘ pi@raspberrypi:~/MagicMirror $
-
@Hubschra01 weird… delete that instance
pm2 delete 0
then run my fixup script
bash -c "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/fixuppm2.sh)"
-
PM2 | 2020-01-21T11:38:39: PM2 log: Node.js version : 10.18.1 PM2 | 2020-01-21T11:38:39: PM2 log: Current arch : arm PM2 | 2020-01-21T11:38:39: PM2 log: PM2 home : /home/pi/.pm2 PM2 | 2020-01-21T11:38:39: PM2 log: PM2 PID file : /home/pi/.pm2/pm2.pid PM2 | 2020-01-21T11:38:39: PM2 log: RPC socket file : /home/pi/.pm2/rpc.sock PM2 | 2020-01-21T11:38:39: PM2 log: BUS socket file : /home/pi/.pm2/pub.sock PM2 | 2020-01-21T11:38:39: PM2 log: Application log path : /home/pi/.pm2/logs PM2 | 2020-01-21T11:38:39: PM2 log: Worker Interval : 30000 PM2 | 2020-01-21T11:38:39: PM2 log: Process dump file : /home/pi/.pm2/dump.pm2 PM2 | 2020-01-21T11:38:39: PM2 log: Concurrent actions : 2 PM2 | 2020-01-21T11:38:39: PM2 log: SIGTERM timeout : 1600 /home/pi/.pm2/logs/MagicMirror-error.log last 15 lines: 0|MagicMir | + arch=armv7l 0|MagicMir | + false=false 0|MagicMir | ++ grep -i serveronly: 0|MagicMir | ++ awk '{print tolower($2)}' 0|MagicMir | ++ tr -d ',"'\''' 0|MagicMir | ++ grep -v '^\s//' config/config.js 0|MagicMir | + serveronly= 0|MagicMir | + serveronly=false 0|MagicMir | ++ pgrep Xorg 0|MagicMir | + xorg=429 0|MagicMir | ++ uname 0|MagicMir | + mac=Linux 0|MagicMir | + '[' false. '!=' false. -o armv7l == armv6l ']' 0|MagicMir | + '[' 429. == . -a Linux '!=' Darwin ']' 0|MagicMir | + electron js/electron.js /home/pi/.pm2/logs/MagicMirror-out.log last 15 lines: 0|MagicMir | [11:38:49.100] [LOG] Module helper loaded: calendar 0|MagicMir | [11:38:49.101] [LOG] No helper found for module: currentweather. 0|MagicMir | [11:38:49.103] [LOG] No helper found for module: weatherforecast. 0|MagicMir | [11:38:49.191] [LOG] Initializing new module helper ... 0|MagicMir | [11:38:49.192] [LOG] Module helper loaded: newsfeed 0|MagicMir | [11:38:49.193] [LOG] All module helpers loaded. 0|MagicMir | [11:38:49.195] [LOG] Starting server on port 8080 ... 0|MagicMir | [11:38:49.218] [LOG] Server started ... 0|MagicMir | [11:38:49.220] [LOG] Connecting socket for: updatenotification 0|MagicMir | [11:38:49.222] [LOG] Connecting socket for: calendar 0|MagicMir | [11:38:49.223] [LOG] Starting node helper for: calendar 0|MagicMir | [11:38:49.225] [LOG] Connecting socket for: newsfeed 0|MagicMir | [11:38:49.226] [LOG] Starting module: newsfeed 0|MagicMir | [11:38:49.227] [LOG] Sockets connected & modules started ... 0|MagicMir | [11:38:49.889] [LOG] Launching application. 0|MagicMirror | [11:38:53.980] [LOG] 0|MagicMirror | Create new calendar fetcher for url