Read the statement by Michael Teeuw here.
-
@strawberry-3.141 Still can’t find the way, the whitelist is empty, I can access from the browser where it is installed the MM, but outside that I can’t, even being at the same wifi network :(
-
@strawberry-3-141
PM2 restart won’t work.
Could you have a look, please.
Thanks a lot[PM2] PM2 Successfully daemonized Use --update-env to update environment variables ┌──────────┬────┬──────┬─────┬────────┬─────────┬────────┬─────┬─────┬──────────┐ │ App name │ id │ mode │ pid │ status │ restart │ uptime │ cpu │ mem │ watching │ └──────────┴────┴──────┴─────┴────────┴─────────┴────────┴─────┴─────┴──────────┘ Use `pm2 show ` to get more details about an app [PM2][ERROR] Process mm not found { Error: Command failed: pm2 restart mm [PM2][ERROR] Process mm not found at ChildProcess.exithandler (child_process.js:218:12) at emitTwo (events.js:106:13) at ChildProcess.emit (events.js:191:7) at maybeClose (internal/child_process.js:877:16) at Socket. (internal/child_process.js:334:11) at emitOne (events.js:96:13) at Socket.emit (events.js:188:7) at Pipe._handle.close [as _onclose] (net.js:493:12) killed: false, code: 1, signal: null, cmd: 'pm2 restart mm' } pi@raspberrypi:~/MagicMirror $
-
@kurt looks like there is currently no instance running that can be restarted so just start a new one by doing
pm2 start mm
-
@strawberry-3.141
Thank you, this is what I get…pi@raspberrypi:~/MagicMirror $ pm2 start mm [PM2][ERROR] script not found : /home/pi/MagicMirror/mm script not found : /home/pi/MagicMirror/mm ┌──────────┬────┬──────┬─────┬────────┬─────────┬────────┬─────┬─────┬──────────┐ │ App name │ id │ mode │ pid │ status │ restart │ uptime │ cpu │ mem │ watching │ └──────────┴────┴──────┴─────┴────────┴─────────┴────────┴─────┴─────┴──────────┘ Use `pm2 show ` to get more details about an app pi@raspberrypi:~/MagicMirror $ pm2 show error: missing required argument `id' pi@raspberrypi:~/MagicMirror $
-
@kurt [PM2][ERROR] script not found
did you follow these steps to create the script? https://github.com/MichMich/MagicMirror/wiki/Auto-Starting-MagicMirror
-
@strawberry-3.141
yes I did it following the steps in that wiki -
Shouldn’t
pm2 start mm
be executed in~
and not in~/MagicMirror
? The tutorial said to create mm.sh in~
So please go back one folder with
cd ..
or directly withcd ~
and try again -
@yawns
this is what I get,
do you think it is a good idea to start the install routine once again from the beginning?pi@raspberrypi:~ $
in my modules folder there is no PM2 folder. Should there be one?
Thanks a lot for help
kurtpi@raspberrypi:~ $ npm start npm ERR! Linux 4.4.50-v7+ npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start" npm ERR! node v6.10.0 npm ERR! npm v3.10.10 npm ERR! path /home/pi/package.json npm ERR! code ENOENT npm ERR! errno -2 npm ERR! syscall open npm ERR! enoent ENOENT: no such file or directory, open '/home/pi/package.json' npm ERR! enoent ENOENT: no such file or directory, open '/home/pi/package.json' npm ERR! enoent This is most likely not a problem with npm itself npm ERR! enoent and is related to npm not being able to find a file. npm ERR! enoent npm ERR! Please include the following file with any support request: npm ERR! /home/pi/npm-debug.log pi@raspberrypi:~ $ pm2 start mm [PM2] Spawning PM2 daemon with pm2_home=/home/pi/.pm2 [PM2] PM2 Successfully daemonized [PM2][ERROR] script not found : /home/pi/mm script not found : /home/pi/mm ┌──────┬──────┬────────┬───┬─────┬────────┐ │ Name │ mode │ status │ ↺ │ cpu │ memory │ └──────┴──────┴────────┴───┴─────┴────────┘ Use `pm2 show ` to get more details about an app
-
If you want to start the process with
npm start
then you have to do that inside~/MagicMirror
However if you want to use pm2 then I would advise following the instructions again: https://github.com/MichMich/MagicMirror/wiki/Auto-Starting-MagicMirrorpm2 seems to be working fine on your raspberry, so I would start here:
Make a MagicMirror start script. To use PM2 in combination with MagicMirror, we need to make a simple shell script. Preferable, we put this script outside the MagicMirror folder to make sure it won’t give us any issues if we want to upgrade the mirror.
cd ~ nano mm.sh
Add the following lines:
cd ~/MagicMirror DISPLAY=:0 npm start
Save and close, using the commands CTRL-O and CTRL-X. Now make sure the shell script is executable bij performing the following command:
chmod +x mm.sh
You are now ready to the MagicMirror using this script using PM2.
-
@yawns
my first step was to make this start script following the instructions.
themm.sh
with the scriptcd ~/MagicMirror DISPLAY=:0 npm start
is now in my/home/pi
folder.
When I try to start the mm bynpm start
I get this (the mirror is not appearing):{ Error: listen EADDRINUSE :::8080 at Object.exports._errnoException (util.js:1026:11) at exports._exceptionWithHostPort (util.js:1049:20) at Server._listen2 (net.js:1253:14) at listen (net.js:1289:10) at net.js:1399:9 at _combinedTickCallback (internal/process/next_tick.js:77:11) at process._tickCallback (internal/process/next_tick.js:98:9) at Module.runMain (module.js:592:11) at run (bootstrap_node.js:402:7) at startup (bootstrap_node.js:157:9) code: 'EADDRINUSE', errno: 'EADDRINUSE', syscall: 'listen', address: '::', port: 8080 }
Thank you