Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: UI is 404 after reinstall #164

Closed
dieseltravis opened this issue Jan 16, 2024 · 11 comments
Closed

BUG: UI is 404 after reinstall #164

dieseltravis opened this issue Jan 16, 2024 · 11 comments

Comments

@dieseltravis
Copy link

Describe the Bug
I had the UI running previously. It had a message about an update that seemed to be broken, so I tried updating mmpm, and all the modules manually and now the remote UI doesn't appear to be working.

$ mmpm ui reinstall
Are you sure you want to reinstall the MMPM UI? (y/n) y
[+] Reinstalled MMPM-UI
Run `mmpm ui --url` to display the UI address, or execute `mmpm open --ui` to open it.

$ mmpm ui --url
http://192.168.1.14:7890

Opening that URL in the browser is a 404 with a JSON error message. Headers:

Access-Control-Allow-Headers	*
Access-Control-Allow-Methods	*
Access-Control-Allow-Origin	*, *
Connection	keep-alive
Content-Length	148
Content-Type	application/json
Date	Tue, 16 Jan 2024 00:04:25 GMT
Server	nginx/1.18.0

Content:

{"code": 404, "message": "The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again."}

Is this an issue with the CLI or GUI?
CLI?

Is this something that should be put in the Wiki?
Unsure.

A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Install UI
  2. Go to URL
  3. See 404 error

Expected behavior
The UI shows up.

Screenshots
image

Operating System, Python3 Version, and Web Browser\

  • output from cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
  • output from python3 --version
    Python 3.9.2

  • Web Browser (firefox, chrome, safari, chromium, etc)
    Firefox 121.0.1 (64-bit)

MMPM Environment Settings

  • output from mmpm env
{
  "MMPM_MAGICMIRROR_ROOT": "/home/pi/MagicMirror",
  "MMPM_MAGICMIRROR_URI": "http://192.168.1.14:8080",
  "MMPM_MAGICMIRROR_PM2_PROCESS_NAME": "MagicMirror",
  "MMPM_MAGICMIRROR_DOCKER_COMPOSE_FILE": null,
  "MMPM_IS_DOCKER_IMAGE": false,
  "MMPM_LOG_LEVEL": "INFO"
}

MMPM Log Files

  • Attach the file produced Download MMPM log files within the Control Center of the GUI or from the mmpm log --zip
$ mmpm log --zip
usage: mmpm <subcommand> [option(s)]
mmpm: error: argument : invalid choice: 'log' (choose from 'completion', 'db', 'env', 'guided-setup', 'install', 'list', 'logs', 'mm-ctl', 'mm-pkg', 'open', 'remove', 'search', 'show', 'ui', 'update', 'upgrade', 'version')

I think it is supposed to be mmpm logs -zip?
mmpm-logs-2024-1-15.zip

MagicMirror Config

@dieseltravis
Copy link
Author

not sure if this is related but if I browse to /static/ it looks like the base href is set to / when all of the files appear to be in /static/
image

@thelasttenno
Copy link

thelasttenno commented Jan 16, 2024

same issue as posted above:

PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" NAME="Debian GNU/Linux" VERSION_ID="12" VERSION="12 (bookworm)" VERSION_CODENAME=bookworm ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/"

Python 3.11.2

{ "MMPM_MAGICMIRROR_ROOT": "/home/pihole/MagicMirror", "MMPM_MAGICMIRROR_URI": "http://192.168.1.77:8383", "MMPM_MAGICMIRROR_PM2_PROCESS_NAME": "MagicMirror", "MMPM_MAGICMIRROR_DOCKER_COMPOSE_FILE": "", "MMPM_IS_DOCKER_IMAGE": false, "MMPM_LOG_LEVEL": "INFO" }

@Bee-Mar
Copy link
Owner

Bee-Mar commented Jan 16, 2024

@thelasttenno @dieseltravis can you try reinstalling the ui then running pm2 logs and capture some output from it?

mmpm ui reinstall -y ; pm2 logs

@Bee-Mar
Copy link
Owner

Bee-Mar commented Jan 16, 2024

@dieseltravis @thelasttenno and also can you provide output from cat /tmp/mmpm/ecosystem.json after running the commands above?

@dieseltravis
Copy link
Author

@Bee-Mar I think the reinstall is stalling:

$ mmpm ui reinstall -y ; pm2 logs
[+] Reinstalled MMPM-UI
Run `mmpm ui --url` to display the UI address, or execute `mmpm open --ui` to open it.

I had to ^C :

^CException ignored in: <module 'threading' from '/usr/lib/python3.9/threading.py'>
Traceback (most recent call last):
  File "/usr/lib/python3.9/threading.py", line 1428, in _shutdown
    lock.acquire()
  File "/home/pi/.local/lib/python3.9/site-packages/engineio/client.py", line 36, in signal_handler
    return original_signal_handler(sig, frame)
  File "/home/pi/.local/lib/python3.9/site-packages/socketio/client.py", line 26, in signal_handler
    return original_signal_handler(sig, frame)
KeyboardInterrupt:
[TAILING] Tailing last 15 lines for [all] processes (change the value with --lines option)
/home/pi/.pm2/pm2.log last 15 lines:
PM2        | 2024-01-16T12:06:03: PM2 log: App [mmpm.ui:28] online
PM2        | 2024-01-16T12:06:04: PM2 log: App [mmpm.ui:28] exited with code [1] via signal [SIGINT]
PM2        | 2024-01-16T12:06:04: PM2 log: App [mmpm.ui:28] starting in -fork mode-
PM2        | 2024-01-16T12:06:04: PM2 log: App [mmpm.ui:28] online
PM2        | 2024-01-16T12:06:04: PM2 log: App [mmpm.ui:28] exited with code [1] via signal [SIGINT]
PM2        | 2024-01-16T12:06:04: PM2 log: App [mmpm.ui:28] starting in -fork mode-
PM2        | 2024-01-16T12:06:04: PM2 log: App [mmpm.ui:28] online
PM2        | 2024-01-16T12:06:04: PM2 log: App [mmpm.ui:28] exited with code [1] via signal [SIGINT]
PM2        | 2024-01-16T12:06:04: PM2 log: App [mmpm.ui:28] starting in -fork mode-
PM2        | 2024-01-16T12:06:04: PM2 log: App [mmpm.ui:28] online
PM2        | 2024-01-16T12:06:05: PM2 log: App [mmpm.ui:28] exited with code [1] via signal [SIGINT]
PM2        | 2024-01-16T12:06:05: PM2 log: App [mmpm.ui:28] starting in -fork mode-
PM2        | 2024-01-16T12:06:05: PM2 log: App [mmpm.ui:28] online
PM2        | 2024-01-16T12:06:05: PM2 log: App [mmpm.ui:28] exited with code [1] via signal [SIGINT]
PM2        | 2024-01-16T12:06:05: PM2 log: Script /usr/bin/bash had too many unstable restarts (16). Stopped. "errored"

/home/pi/.pm2/logs/mmpm.api-out.log last 15 lines:
/home/pi/.pm2/logs/mmpm.log-server-out.log last 15 lines:
/home/pi/.pm2/logs/mmpm.repeater-out.log last 15 lines:
/home/pi/.pm2/logs/mmpm.ui-out.log last 15 lines:
/home/pi/.pm2/logs/MagicMirror-out.log last 15 lines:
0|MagicMir | [15.01.2024 01:17.23.768] [LOG]   Loading config ...
0|MagicMir | [15.01.2024 01:17.23.775] [DEBUG] config template file not exists, no envsubst
0|MagicMir | [15.01.2024 01:17.25.136] [LOG]   Starting node_helper for module: MMM-GoogleMapsTraffic
0|MagicMir | [15.01.2024 01:17.25.138] [LOG]   Starting node_helper for module: MMM-MyGarbage
0|MagicMir | [15.01.2024 01:17.29.895] [LOG]   Working notification system. Notification: MMM-GOOGLE_MAPS_TRAFFIC-GET payload:  { style: 'transparent' }
0|MagicMir |
0|MagicMir | > magicmirror@2.26.0 start
0|MagicMir | > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
0|MagicMir |
0|MagicMir | [15.01.2024 20:31.45.629] [LOG]   Starting MagicMirror: v2.26.0
0|MagicMir | [15.01.2024 20:31.45.635] [LOG]   Loading config ...
0|MagicMir | [15.01.2024 20:31.45.638] [DEBUG] config template file not exists, no envsubst
0|MagicMir | [15.01.2024 20:31.46.190] [LOG]   Starting node_helper for module: MMM-GoogleMapsTraffic
0|MagicMir | [15.01.2024 20:31.46.192] [LOG]   Starting node_helper for module: MMM-MyGarbage
0|MagicMir | [15.01.2024 20:31.49.038] [LOG]   Working notification system. Notification: MMM-GOOGLE_MAPS_TRAFFIC-GET payload:  { style: 'transparent' }

/home/pi/.pm2/logs/MagicMirror-error.log last 15 lines:
0|MagicMir |     at CreateVkInstance (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:458)
0|MagicMir |     at Initialize (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:344)
0|MagicMir |     at Create (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:266)
0|MagicMir |     at operator() (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:521)
0|MagicMir |
0|MagicMir | /home/pi/MagicMirror/node_modules/electron/dist/electron exited with signal SIGINT
0|MagicMir | npm WARN cli npm v10.2.4 does not support Node.js v16.20.2. This version of npm supports the following node versions: `^18.17.0 || >=20.5.0`. You can find the latest version at https://nodejs.org/.
0|MagicMir | Warning: vkCreateInstance: Found no drivers!
0|MagicMir | Warning: vkCreateInstance failed with VK_ERROR_INCOMPATIBLE_DRIVER
0|MagicMir |     at CheckVkSuccessImpl (../../third_party/dawn/src/dawn/native/vulkan/VulkanError.cpp:88)
0|MagicMir |     at CreateVkInstance (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:458)
0|MagicMir |     at Initialize (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:344)
0|MagicMir |     at Create (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:266)
0|MagicMir |     at operator() (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:521)
0|MagicMir |

/home/pi/.pm2/logs/mmpm.api-error.log last 15 lines:
25|mmpm.ap |   File "src/gevent/_abstract_linkable.py", line 487, in gevent._gevent_c_abstract_linkable.AbstractLinkable._wait_core
25|mmpm.ap |   File "src/gevent/_abstract_linkable.py", line 490, in gevent._gevent_c_abstract_linkable.AbstractLinkable._wait_core
25|mmpm.ap |   File "src/gevent/_abstract_linkable.py", line 442, in gevent._gevent_c_abstract_linkable.AbstractLinkable._AbstractLinkable__wait_to_be_notified
25|mmpm.ap |   File "src/gevent/_abstract_linkable.py", line 451, in gevent._gevent_c_abstract_linkable.AbstractLinkable._switch_to_hub
25|mmpm.ap |   File "src/gevent/_greenlet_primitives.py", line 61, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
25|mmpm.ap |   File "src/gevent/_greenlet_primitives.py", line 64, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
25|mmpm.ap |   File "src/gevent/_greenlet_primitives.py", line 67, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch_out
25|mmpm.ap |   File "src/gevent/_greenlet_primitives.py", line 68, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch_out
25|mmpm.ap | gevent.exceptions.BlockingSwitchOutError: Impossible to call blocking function in the event loop callback
25|mmpm.ap | [2024-01-16 12:05:55 -0500] [11524] [INFO] Worker exiting (pid: 11524)
25|mmpm.ap | [2024-01-16 12:05:56 -0500] [11518] [INFO] Shutting down: Master
25|mmpm.ap | [2024-01-16 12:06:01 -0500] [18635] [INFO] Starting gunicorn 20.1.0
25|mmpm.ap | [2024-01-16 12:06:01 -0500] [18635] [INFO] Listening at: http://0.0.0.0:7891 (18635)
25|mmpm.ap | [2024-01-16 12:06:01 -0500] [18635] [INFO] Using worker: gevent
25|mmpm.ap | [2024-01-16 12:06:01 -0500] [18643] [INFO] Booting worker with pid: 18643

/home/pi/.pm2/logs/mmpm.repeater-error.log last 15 lines:
27|mmpm.re |   File "src/gevent/_greenlet_primitives.py", line 61, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
27|mmpm.re |   File "src/gevent/_greenlet_primitives.py", line 61, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
27|mmpm.re |   File "src/gevent/_greenlet_primitives.py", line 65, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
27|mmpm.re |   File "src/gevent/_gevent_c_greenlet_primitives.pxd", line 35, in gevent._gevent_c_greenlet_primitives._greenlet_switch
27|mmpm.re |   File "src/gevent/greenlet.py", line 908, in gevent._gevent_cgreenlet.Greenlet.run
27|mmpm.re |   File "/home/pi/.local/lib/python3.9/site-packages/gunicorn/workers/base.py", line 198, in handle_quit
27|mmpm.re |     sys.exit(0)
27|mmpm.re | SystemExit: 0
27|mmpm.re | 2024-01-16T17:05:56Z <greenlet.greenlet object at 0xf6115128 (otid=0xf6105c80) current active started main> failed with SystemExit
27|mmpm.re |
27|mmpm.re | [2024-01-16 12:05:56 -0500] [11520] [INFO] Shutting down: Master
27|mmpm.re | [2024-01-16 12:06:01 -0500] [18637] [INFO] Starting gunicorn 20.1.0
27|mmpm.re | [2024-01-16 12:06:01 -0500] [18637] [INFO] Listening at: http://0.0.0.0:8907 (18637)
27|mmpm.re | [2024-01-16 12:06:01 -0500] [18637] [INFO] Using worker: geventwebsocket.gunicorn.workers.GeventWebSocketWorker
27|mmpm.re | [2024-01-16 12:06:01 -0500] [18644] [INFO] Booting worker with pid: 18644

/home/pi/.pm2/logs/mmpm.log-server-error.log last 15 lines:
26|mmpm.lo | [2024-01-15 20:03:10 -0500] [11355] [INFO] Booting worker with pid: 11355
26|mmpm.lo | [2024-01-15 20:08:07 -0500] [11350] [INFO] Handling signal: int
26|mmpm.lo | [2024-01-15 20:08:07 -0500] [11355] [INFO] Worker exiting (pid: 11355)
26|mmpm.lo | [2024-01-15 20:08:07 -0500] [11350] [INFO] Shutting down: Master
26|mmpm.lo | [2024-01-15 20:08:12 -0500] [11519] [INFO] Starting gunicorn 20.1.0
26|mmpm.lo | [2024-01-15 20:08:12 -0500] [11519] [INFO] Listening at: http://0.0.0.0:6789 (11519)
26|mmpm.lo | [2024-01-15 20:08:12 -0500] [11519] [INFO] Using worker: geventwebsocket.gunicorn.workers.GeventWebSocketWorker
26|mmpm.lo | [2024-01-15 20:08:12 -0500] [11525] [INFO] Booting worker with pid: 11525
26|mmpm.lo | [2024-01-16 12:05:55 -0500] [11519] [INFO] Handling signal: int
26|mmpm.lo | [2024-01-16 12:05:55 -0500] [11525] [INFO] Worker exiting (pid: 11525)
26|mmpm.lo | [2024-01-16 12:05:56 -0500] [11519] [INFO] Shutting down: Master
26|mmpm.lo | [2024-01-16 12:06:01 -0500] [18636] [INFO] Starting gunicorn 20.1.0
26|mmpm.lo | [2024-01-16 12:06:01 -0500] [18636] [INFO] Listening at: http://0.0.0.0:6789 (18636)
26|mmpm.lo | [2024-01-16 12:06:01 -0500] [18636] [INFO] Using worker: geventwebsocket.gunicorn.workers.GeventWebSocketWorker
26|mmpm.lo | [2024-01-16 12:06:01 -0500] [18645] [INFO] Booting worker with pid: 18645

/home/pi/.pm2/logs/mmpm.ui-error.log last 15 lines:
28|mmpm.ui |   File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
28|mmpm.ui |     exec(code, run_globals)
28|mmpm.ui |   File "/usr/lib/python3.9/http/server.py", line 1289, in <module>
28|mmpm.ui |     test(
28|mmpm.ui |   File "/usr/lib/python3.9/http/server.py", line 1244, in test
28|mmpm.ui |     with ServerClass(addr, HandlerClass) as httpd:
28|mmpm.ui |   File "/usr/lib/python3.9/socketserver.py", line 452, in __init__
28|mmpm.ui |     self.server_bind()
28|mmpm.ui |   File "/usr/lib/python3.9/http/server.py", line 1287, in server_bind
28|mmpm.ui |     return super().server_bind()
28|mmpm.ui |   File "/usr/lib/python3.9/http/server.py", line 138, in server_bind
28|mmpm.ui |     socketserver.TCPServer.server_bind(self)
28|mmpm.ui |   File "/usr/lib/python3.9/socketserver.py", line 466, in server_bind
28|mmpm.ui |     self.socket.bind(self.server_address)
28|mmpm.ui | OSError: [Errno 98] Address already in use

Here is the other output:

$ cat /tmp/mmpm/ecosystem.json
{"apps": [{"namespace": "mmpm", "name": "mmpm.api", "script": "/usr/bin/python -m gunicorn -k gevent -b 0.0.0.0:7891 mmpm.wsgi:app", "version": "4.1.0", "watch": true}, {"namespace": "mmpm", "name": "mmpm.log-server", "script": "/usr/bin/python -m gunicorn -k geventwebsocket.gunicorn.workers.GeventWebSocketWorker -w 1 'mmpm.log.server:create()' -b 0.0.0.0:6789", "version": "4.1.0", "watch": true}, {"namespace": "mmpm", "name": "mmpm.repeater", "script": "/usr/bin/python -m gunicorn -k geventwebsocket.gunicorn.workers.GeventWebSocketWorker -w 1 'mmpm.api.repeater:create()' -b 0.0.0.0:8907", "version": "4.1.0", "watch": true}, {"namespace": "mmpm", "name": "mmpm.ui", "script": "/usr/bin/python -m http.server -d /home/pi/.local/lib/python3.9/site-packages/mmpm/ui -b 0.0.0.0 7890", "version": "4.1.0", "watch": true}]}

The one message about node from /home/pi/.pm2/logs/MagicMirror-error.log makes me wonder if maybe it is an older message or if it doesn't see the node version I have installed:

$ node --version
v20.11.0
$ nvm --version
0.39.7
$ npm --version
10.2.4

@Bee-Mar
Copy link
Owner

Bee-Mar commented Jan 17, 2024

Try uninstalling and reinstalling mmpm. I have a feeling some dependencies are clashing.

"python3 -m pip install --force-reinstall --upgrade --no-cache-for mmpm"

@dieseltravis
Copy link
Author

OK, this command succeeded: python3 -m pip install --force-reinstall --upgrade --no-cache-dir mmpm

Then I re-ran this one: mmpm ui reinstall -y ; pm2 logs

Here are the logs:

[TAILING] Tailing last 15 lines for [all] processes (change the value with --lines option)
/home/pi/.pm2/pm2.log last 15 lines:
PM2        | 2024-01-17T11:27:31: PM2 log: [Watch] Start watching mmpm.api
PM2        | 2024-01-17T11:27:31: PM2 log: App [mmpm.api:29] starting in -fork mode-
PM2        | 2024-01-17T11:27:31: PM2 log: [Watch] Start watching mmpm.log-server
PM2        | 2024-01-17T11:27:31: PM2 log: App [mmpm.log-server:30] starting in -fork mode-
PM2        | 2024-01-17T11:27:31: PM2 log: App [mmpm.api:29] online
PM2        | 2024-01-17T11:27:31: PM2 log: App [mmpm.log-server:30] online
PM2        | 2024-01-17T11:27:31: PM2 log: [Watch] Start watching mmpm.repeater
PM2        | 2024-01-17T11:27:31: PM2 log: App [mmpm.repeater:31] starting in -fork mode-
PM2        | 2024-01-17T11:27:31: PM2 log: [Watch] Start watching mmpm.ui
PM2        | 2024-01-17T11:27:31: PM2 log: App [mmpm.ui:32] starting in -fork mode-
PM2        | 2024-01-17T11:27:31: PM2 log: App [mmpm.repeater:31] online
PM2        | 2024-01-17T11:27:31: PM2 log: App [mmpm.ui:32] online
PM2        | 2024-01-17T11:27:32: PM2 log: App [mmpm.ui:32] exited with code [1] via signal [SIGINT]
PM2        | 2024-01-17T11:27:35: PM2 log: App [mmpm.ui:32] starting in -fork mode-
PM2        | 2024-01-17T11:27:35: PM2 log: App [mmpm.ui:32] online

/home/pi/.pm2/logs/mmpm.api-out.log last 15 lines:
/home/pi/.pm2/logs/mmpm.log-server-out.log last 15 lines:
/home/pi/.pm2/logs/mmpm.repeater-out.log last 15 lines:
/home/pi/.pm2/logs/mmpm.ui-out.log last 15 lines:
/home/pi/.pm2/logs/MagicMirror-out.log last 15 lines:
0|MagicMir | [15.01.2024 01:17.23.768] [LOG]   Loading config ...
0|MagicMir | [15.01.2024 01:17.23.775] [DEBUG] config template file not exists, no envsubst
0|MagicMir | [15.01.2024 01:17.25.136] [LOG]   Starting node_helper for module: MMM-GoogleMapsTraffic
0|MagicMir | [15.01.2024 01:17.25.138] [LOG]   Starting node_helper for module: MMM-MyGarbage
0|MagicMir | [15.01.2024 01:17.29.895] [LOG]   Working notification system. Notification: MMM-GOOGLE_MAPS_TRAFFIC-GET payload:  { style: 'transparent' }
0|MagicMir |
0|MagicMir | > magicmirror@2.26.0 start
0|MagicMir | > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
0|MagicMir |
0|MagicMir | [15.01.2024 20:31.45.629] [LOG]   Starting MagicMirror: v2.26.0
0|MagicMir | [15.01.2024 20:31.45.635] [LOG]   Loading config ...
0|MagicMir | [15.01.2024 20:31.45.638] [DEBUG] config template file not exists, no envsubst
0|MagicMir | [15.01.2024 20:31.46.190] [LOG]   Starting node_helper for module: MMM-GoogleMapsTraffic
0|MagicMir | [15.01.2024 20:31.46.192] [LOG]   Starting node_helper for module: MMM-MyGarbage
0|MagicMir | [15.01.2024 20:31.49.038] [LOG]   Working notification system. Notification: MMM-GOOGLE_MAPS_TRAFFIC-GET payload:  { style: 'transparent' }

/home/pi/.pm2/logs/MagicMirror-error.log last 15 lines:
0|MagicMir |     at CreateVkInstance (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:458)
0|MagicMir |     at Initialize (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:344)
0|MagicMir |     at Create (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:266)
0|MagicMir |     at operator() (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:521)
0|MagicMir |
0|MagicMir | /home/pi/MagicMirror/node_modules/electron/dist/electron exited with signal SIGINT
0|MagicMir | npm WARN cli npm v10.2.4 does not support Node.js v16.20.2. This version of npm supports the following node versions: `^18.17.0 || >=20.5.0`. You can find the latest version at https://nodejs.org/.
0|MagicMir | Warning: vkCreateInstance: Found no drivers!
0|MagicMir | Warning: vkCreateInstance failed with VK_ERROR_INCOMPATIBLE_DRIVER
0|MagicMir |     at CheckVkSuccessImpl (../../third_party/dawn/src/dawn/native/vulkan/VulkanError.cpp:88)
0|MagicMir |     at CreateVkInstance (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:458)
0|MagicMir |     at Initialize (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:344)
0|MagicMir |     at Create (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:266)
0|MagicMir |     at operator() (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:521)
0|MagicMir |

/home/pi/.pm2/logs/mmpm.ui-error.log last 15 lines:
32|mmpm.ui |   File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
32|mmpm.ui |     exec(code, run_globals)
32|mmpm.ui |   File "/usr/lib/python3.9/http/server.py", line 1289, in <module>
32|mmpm.ui |     test(
32|mmpm.ui |   File "/usr/lib/python3.9/http/server.py", line 1244, in test
32|mmpm.ui |     with ServerClass(addr, HandlerClass) as httpd:
32|mmpm.ui |   File "/usr/lib/python3.9/socketserver.py", line 452, in __init__
32|mmpm.ui |     self.server_bind()
32|mmpm.ui |   File "/usr/lib/python3.9/http/server.py", line 1287, in server_bind
32|mmpm.ui |     return super().server_bind()
32|mmpm.ui |   File "/usr/lib/python3.9/http/server.py", line 138, in server_bind
32|mmpm.ui |     socketserver.TCPServer.server_bind(self)
32|mmpm.ui |   File "/usr/lib/python3.9/socketserver.py", line 466, in server_bind
32|mmpm.ui |     self.socket.bind(self.server_address)
32|mmpm.ui | OSError: [Errno 98] Address already in use

/home/pi/.pm2/logs/mmpm.log-server-error.log last 15 lines:
30|mmpm.lo | [2024-01-15 20:08:12 -0500] [11525] [INFO] Booting worker with pid: 11525
30|mmpm.lo | [2024-01-16 12:05:55 -0500] [11519] [INFO] Handling signal: int
30|mmpm.lo | [2024-01-16 12:05:55 -0500] [11525] [INFO] Worker exiting (pid: 11525)
30|mmpm.lo | [2024-01-16 12:05:56 -0500] [11519] [INFO] Shutting down: Master
30|mmpm.lo | [2024-01-16 12:06:01 -0500] [18636] [INFO] Starting gunicorn 20.1.0
30|mmpm.lo | [2024-01-16 12:06:01 -0500] [18636] [INFO] Listening at: http://0.0.0.0:6789 (18636)
30|mmpm.lo | [2024-01-16 12:06:01 -0500] [18636] [INFO] Using worker: geventwebsocket.gunicorn.workers.GeventWebSocketWorker
30|mmpm.lo | [2024-01-16 12:06:01 -0500] [18645] [INFO] Booting worker with pid: 18645
30|mmpm.lo | [2024-01-17 11:27:27 -0500] [18636] [INFO] Handling signal: int
30|mmpm.lo | [2024-01-17 11:27:27 -0500] [18645] [INFO] Worker exiting (pid: 18645)
30|mmpm.lo | [2024-01-17 11:27:27 -0500] [18636] [INFO] Shutting down: Master
30|mmpm.lo | [2024-01-17 11:27:32 -0500] [27782] [INFO] Starting gunicorn 21.2.0
30|mmpm.lo | [2024-01-17 11:27:32 -0500] [27782] [INFO] Listening at: http://0.0.0.0:6789 (27782)
30|mmpm.lo | [2024-01-17 11:27:32 -0500] [27782] [INFO] Using worker: geventwebsocket.gunicorn.workers.GeventWebSocketWorker
30|mmpm.lo | [2024-01-17 11:27:35 -0500] [27798] [INFO] Booting worker with pid: 27798

/home/pi/.pm2/logs/mmpm.repeater-error.log last 15 lines:
31|mmpm.re | SystemExit: 0
31|mmpm.re | 2024-01-16T17:05:56Z <greenlet.greenlet object at 0xf6115128 (otid=0xf6105c80) current active started main> failed with SystemExit
31|mmpm.re |
31|mmpm.re | [2024-01-16 12:05:56 -0500] [11520] [INFO] Shutting down: Master
31|mmpm.re | [2024-01-16 12:06:01 -0500] [18637] [INFO] Starting gunicorn 20.1.0
31|mmpm.re | [2024-01-16 12:06:01 -0500] [18637] [INFO] Listening at: http://0.0.0.0:8907 (18637)
31|mmpm.re | [2024-01-16 12:06:01 -0500] [18637] [INFO] Using worker: geventwebsocket.gunicorn.workers.GeventWebSocketWorker
31|mmpm.re | [2024-01-16 12:06:01 -0500] [18644] [INFO] Booting worker with pid: 18644
31|mmpm.re | [2024-01-17 11:27:28 -0500] [18637] [INFO] Handling signal: int
31|mmpm.re | [2024-01-17 11:27:28 -0500] [18644] [INFO] Worker exiting (pid: 18644)
31|mmpm.re | [2024-01-17 11:27:28 -0500] [18637] [INFO] Shutting down: Master
31|mmpm.re | [2024-01-17 11:27:32 -0500] [27783] [INFO] Starting gunicorn 21.2.0
31|mmpm.re | [2024-01-17 11:27:32 -0500] [27783] [INFO] Listening at: http://0.0.0.0:8907 (27783)
31|mmpm.re | [2024-01-17 11:27:32 -0500] [27783] [INFO] Using worker: geventwebsocket.gunicorn.workers.GeventWebSocketWorker
31|mmpm.re | [2024-01-17 11:27:35 -0500] [27797] [INFO] Booting worker with pid: 27797

/home/pi/.pm2/logs/mmpm.api-error.log last 15 lines:
29|mmpm.ap |   File "src/gevent/_abstract_linkable.py", line 487, in gevent._gevent_c_abstract_linkable.AbstractLinkable._wait_core
29|mmpm.ap |   File "src/gevent/_abstract_linkable.py", line 490, in gevent._gevent_c_abstract_linkable.AbstractLinkable._wait_core
29|mmpm.ap |   File "src/gevent/_abstract_linkable.py", line 442, in gevent._gevent_c_abstract_linkable.AbstractLinkable._AbstractLinkable__wait_to_be_notified
29|mmpm.ap |   File "src/gevent/_abstract_linkable.py", line 451, in gevent._gevent_c_abstract_linkable.AbstractLinkable._switch_to_hub
29|mmpm.ap |   File "src/gevent/_greenlet_primitives.py", line 61, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
29|mmpm.ap |   File "src/gevent/_greenlet_primitives.py", line 64, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
29|mmpm.ap |   File "src/gevent/_greenlet_primitives.py", line 67, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch_out
29|mmpm.ap |   File "src/gevent/_greenlet_primitives.py", line 68, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch_out
29|mmpm.ap | gevent.exceptions.BlockingSwitchOutError: Impossible to call blocking function in the event loop callback
29|mmpm.ap | [2024-01-17 11:27:27 -0500] [18643] [INFO] Worker exiting (pid: 18643)
29|mmpm.ap | [2024-01-17 11:27:27 -0500] [18635] [INFO] Shutting down: Master
29|mmpm.ap | [2024-01-17 11:27:32 -0500] [27781] [INFO] Starting gunicorn 21.2.0
29|mmpm.ap | [2024-01-17 11:27:32 -0500] [27781] [INFO] Listening at: http://0.0.0.0:7891 (27781)
29|mmpm.ap | [2024-01-17 11:27:32 -0500] [27781] [INFO] Using worker: gevent
29|mmpm.ap | [2024-01-17 11:27:35 -0500] [27799] [INFO] Booting worker with pid: 27799

32|mmpm.ui  | Traceback (most recent call last):
32|mmpm.ui  |   File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
32|mmpm.ui  |     return _run_code(code, main_globals, None,
32|mmpm.ui  |   File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
32|mmpm.ui  |     exec(code, run_globals)
32|mmpm.ui  |   File "/usr/lib/python3.9/http/server.py", line 1289, in <module>
32|mmpm.ui  |     test(
32|mmpm.ui  |   File "/usr/lib/python3.9/http/server.py", line 1244, in test
32|mmpm.ui  |     with ServerClass(addr, HandlerClass) as httpd:
32|mmpm.ui  |   File "/usr/lib/python3.9/socketserver.py", line 452, in __init__
32|mmpm.ui  |     self.server_bind()
32|mmpm.ui  |   File "/usr/lib/python3.9/http/server.py", line 1287, in server_bind
32|mmpm.ui  |     return super().server_bind()
32|mmpm.ui  |   File "/usr/lib/python3.9/http/server.py", line 138, in server_bind
32|mmpm.ui  |     socketserver.TCPServer.server_bind(self)
32|mmpm.ui  |   File "/usr/lib/python3.9/socketserver.py", line 466, in server_bind
32|mmpm.ui  |     self.socket.bind(self.server_address)
32|mmpm.ui  | OSError: [Errno 98] Address already in use
PM2         | App [mmpm.ui:32] exited with code [1] via signal [SIGINT]
PM2         | App [mmpm.ui:32] starting in -fork mode-
PM2         | App [mmpm.ui:32] online

That last error message traceback from mmpm.ui just keeps repeating.

@Bee-Mar
Copy link
Owner

Bee-Mar commented Jan 18, 2024

@dieseltravis did you by chance have an older version ( less than 4.0.0) of mmpm installed? I'm wondering if nginx is running because the error indicates that address is being used already.

If the output from the command below shows something indicating the ngnix service is running:

sudo systemctl status nginx 

then run:

sudo systemctl disable --now mmpm
sudo systemctl disable --now nginx 

@dieseltravis
Copy link
Author

@Bee-Mar yeah, that is probably the issue, I had been running mmpm for a few years now and recently there were a few modules where it wasn't able to update them through the UI so I ssh'd into the pi to try to update everything manually. Here are the outputs of those three commands:

$ sudo systemctl status nginx
● nginx.service - A high performance web server and a reverse proxy server
     Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2024-01-15 01:17:08 EST; 3 days ago
       Docs: man:nginx(8)
   Main PID: 615 (nginx)
      Tasks: 5 (limit: 3933)
        CPU: 560ms
     CGroup: /system.slice/nginx.service
             ├─615 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
             ├─616 nginx: worker process
             ├─617 nginx: worker process
             ├─618 nginx: worker process
             └─619 nginx: worker process

Jan 15 01:17:06 smartmirror systemd[1]: Starting A high performance web server and a reverse proxy server...
Jan 15 01:17:08 smartmirror systemd[1]: Started A high performance web server and a reverse proxy server.

$ sudo systemctl disable --now mmpm
$ sudo systemctl disable --now nginx
Synchronizing state of nginx.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable nginx
Removed /etc/systemd/system/multi-user.target.wants/nginx.service.

@Bee-Mar
Copy link
Owner

Bee-Mar commented Jan 19, 2024

@dieseltravis great, that's at least removed one additional item at play. Have you attempted to get the UI running after running those commands?

Also, if nothing else is using nginx, you can remove it completely to make sure nothing else conflicts.

@dieseltravis
Copy link
Author

Running mmpm ui reinstall -y fixed it, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants