Read the statement by Michael Teeuw here.
MMM-OpenWeatherForecast - Replacement for MMM-DarkSkyForecast
-
@chris1971 that means u have another instance of MagicMirror running already
-
@sdetweil what does that mean? How can I fix it?
-
@chris1971 that means something started MM, and you are trying to start it again…
you cannot have two copies running at the same time on the same port
do this
pm2 status
on one of my machines it looks like this
┌────┬────────────────────┬──────────┬──────┬───────────┬──────────┬──────────┐ │ id │ name │ mode │ ↺ │ status │ cpu │ memory │ ├────┼────────────────────┼──────────┼──────┼───────────┼──────────┼──────────┤ │ 0 │ MagicMirror │ fork │ 20 │ online │ 0% │ 2.4mb │ └────┴────────────────────┴──────────┴──────┴───────────┴──────────┴──────────┘
is there only 1 app defined for pm2 to manage?
-
pi@raspberrypi:~/MagicMirror $ pm2 status
┌────┬────────────────────┬──────────┬──────┬───────────┬──────────┬──────────┐
│ id │ name │ mode │ ↺ │ status │ cpu │ memory │
├────┼────────────────────┼──────────┼──────┼───────────┼──────────┼──────────┤
│ 0 │ MagicMirror │ fork │ 0 │ online │ 0% │ 2.4mb │
└────┴────────────────────┴──────────┴──────┴───────────┴──────────┴──────────┘looks like this…
I installed your scrips and agreed both times (y/n) when I was asked to remove screensaver and start pm. -
@chris1971 ok, so when u need to change something you do
pm2 stop 0 (or pm2 stop MagicMirror), (or pm2 stop all)
make your change and then
pm2 start 0, or MagicMirror, or all
-
@sdetweil said in MMM-OpenWeatherForecast - Replacement for MMM-DarkSkyForecast:
pm2 stop all
have stopped with pm2 stop all
pi@raspberrypi:~/MagicMirror $ pm2 stop all
[PM2] Applying action stopProcessId on app [all](ids: [ 0 ])
[PM2] MagicMirror ✓
┌────┬────────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├────┼────────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0 │ MagicMirror │ default │ 2.22.0 │ fork │ 0 │ 0 │ 0 │ stopped │ 0% │ 0b │ pi │ disabled │
└────┴────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘the started with pm2 start all
pi@raspberrypi:~/MagicMirror $ pm2 start all
[PM2] Applying action restartProcessId on app [all](ids: [ 0 ])
[PM2] MagicMirror ✓
[PM2] Process successfully started
┌────┬────────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├────┼────────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0 │ MagicMirror │ default │ 2.22.0 │ fork │ 2414 │ 0s │ 0 │ online │ 0% │ 2.5mb │ pi │ disabled │
└────┴────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘But no changes…
checked the status and see only on 8080
pi@raspberrypi:~ $ sudo netstat -lnptu
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 565/sshd: /usr/sbin
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 519/cupsd
tcp 0 0 0.0.0.0:8080 0.0.0.0: LISTEN 1206/electron.js*
tcp6 0 0 ::1:3350 :::* LISTEN 539/xrdp-sesman
tcp6 0 0 :::22 :::* LISTEN 565/sshd: /usr/sbin
tcp6 0 0 ::1:631 :::* LISTEN 519/cupsd
tcp6 0 0 :::3389 :::* LISTEN 585/xrdp
udp 0 0 0.0.0.0:68 0.0.0.0:* 526/dhcpcd
udp 0 0 0.0.0.0:631 0.0.0.0:* 612/cups-browsed
udp 0 0 0.0.0.0:5353 0.0.0.0:* 376/avahi-daemon: r
udp 0 0 0.0.0.0:58721 0.0.0.0:* 376/avahi-daemon: r
udp6 0 0 :::546 :::* 526/dhcpcd
udp6 0 0 :::41014 :::* 376/avahi-daemon: r
udp6 0 0 :::5353 :::* 376/avahi-daemon: r -
@chris1971 correct, and it should be running correctly now
i never use pm2 when I am changing config
pm2 stop all cd ~/MagicMirror npm start (ctrl-m if on same screen, to minimize) look at messages ctrl-c to stop make changes, rinse and repeat til happy then pm2 start all
-
@sdetweil Does that mean I have to stopp pm before I make changes in the config?
Module is still not loading…
When I remove the script for google maps from the config.js the weather module is working. When I place the script in the config.js again, the weather module is not loading.
-
@chris1971 yes, when u make any change, you should stop MM and then then restart it…
as I said before, some modules impact others…
I fixed a similar problem in OpenWeatherMapForecast as the author was not updating it anymore
this is my fork with the fix https://github.com/sdetweil/MMM-OpenWeatherMapForecast
I would look at the messages
pm2 stop all
pm2 flush
pm2 start all
wait
pm2 logs --lines=100or, not use pm2
pm2 stop all
cd ~/MagicMirror
npm start >somefile.txt 2>&1wait
ctrl-c to stop MM (in the window where you did npm start )
then examine the contents of somefile.txt to see if there was any error that might causing the problemyou can also look in the MagicMirror developers window to see if there is a problem there
ctrl-shift-i on the running MM screen
select the console tab
and put weath in the filter field
this will reduce the output to modules with weath in their name
looking for any content in red -
@sdetweil lot of stuff…
pi@raspberrypi:~ $ pm2 logs --lines=100
[TAILING] Tailing last 100 lines for [all] processes (change the value with --lines option)
/home/pi/.pm2/pm2.log last 100 lines:
PM2 | 2023-03-31T16:08:12: PM2 log: App [MagicMirror:0] starting in -fork mode-
PM2 | 2023-03-31T16:08:12: PM2 log: App [MagicMirror:0] online/home/pi/.pm2/logs/MagicMirror-error.log last 100 lines:
0|MagicMir | [31.03.2023 16:08.20.333] [WARN] You’re using a full whitelist configuration to allow for all IPs
0|MagicMir | MESA-LOADER: failed to retrieve device information
0|MagicMir | MESA-LOADER: failed to retrieve device information
0|MagicMir | MESA-LOADER: failed to retrieve device information
0|MagicMir | …/…/buildtools/third_party/libc++/trunk/include/vector:1425: assertion __n < size() failed: vector[] index out of bounds[2472:0331/160823.980369:ERROR:gpu_process_host.cc(991)] GPU process exited unexpectedly: exit_code=134
0|MagicMir | MESA-LOADER: failed to retrieve device information
0|MagicMir | MESA-LOADER: failed to retrieve device information
0|MagicMir | MESA-LOADER: failed to retrieve device information
0|MagicMir | …/…/buildtools/third_party/libc++/trunk/include/vector:1425: assertion __n < size() failed: vector[] index out of bounds[2472:0331/160825.475337:ERROR:gpu_process_host.cc(991)] GPU process exited unexpectedly: exit_code=134
0|MagicMir | MESA-LOADER: failed to retrieve device information
0|MagicMir | MESA-LOADER: failed to retrieve device information
0|MagicMir | MESA-LOADER: failed to retrieve device information
0|MagicMir | …/…/buildtools/third_party/libc++/trunk/include/vector:1425: assertion __n < size() failed: vector[] index out of bounds[2472:0331/160827.345249:ERROR:gpu_process_host.cc(991)] GPU process exited unexpectedly: exit_code=134
0|MagicMir | [2512:0331/160829.375127:ERROR:command_buffer_proxy_impl.cc(128)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer./home/pi/.pm2/logs/MagicMirror-out.log last 100 lines:
0|MagicMir |
0|MagicMir | > magicmirror@2.22.0 start
0|MagicMir | > DISPLAY=“${DISPLAY:=:0}” ./node_modules/.bin/electron js/electron.js
0|MagicMir |
0|MagicMir | [31.03.2023 16:08.18.855] [LOG] Starting MagicMirror: v2.22.0
0|MagicMir | [31.03.2023 16:08.18.868] [LOG] Loading config …
…
…
…I read something about the GPU process in the forum - could this infuence the system?