kizniche / Mycodo

An environmental monitoring and regulation system
http://kylegabriel.com/projects/
GNU General Public License v3.0
2.95k stars 494 forks source link

Issue during upgrade: Bad gateway error #1225

Closed TeaPot169 closed 1 year ago

TeaPot169 commented 2 years ago

Tried to update, got error of bad gateway. With journalctl -u mycodoflask | tail -n 50 results indicated virtual env missing. This was upgraded. Still bad gateway erre. now journalctl -u mycodoflask | tail -n 50 gives results: Sep 10 10:01:38 mush-room gunicorn[493]: File "/home/pi/Mycodo/env/lib/python3.7/site-packages/gunicorn/workers/base.py", line 134, in init_process Sep 10 10:01:38 mush-room gunicorn[493]: self.load_wsgi() Sep 10 10:01:38 mush-room gunicorn[493]: File "/home/pi/Mycodo/env/lib/python3.7/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi Sep 10 10:01:38 mush-room gunicorn[493]: self.wsgi = self.app.wsgi() Sep 10 10:01:38 mush-room gunicorn[493]: File "/home/pi/Mycodo/env/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi Sep 10 10:01:38 mush-room gunicorn[493]: self.callable = self.load() Sep 10 10:01:38 mush-room gunicorn[493]: File "/home/pi/Mycodo/env/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 58, in load Sep 10 10:01:38 mush-room gunicorn[493]: return self.load_wsgiapp() Sep 10 10:01:38 mush-room gunicorn[493]: File "/home/pi/Mycodo/env/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp Sep 10 10:01:38 mush-room gunicorn[493]: return util.import_app(self.app_uri) Sep 10 10:01:38 mush-room gunicorn[493]: File "/home/pi/Mycodo/env/lib/python3.7/site-packages/gunicorn/util.py", line 359, in import_app Sep 10 10:01:38 mush-room gunicorn[493]: mod = importlib.import_module(module) Sep 10 10:01:38 mush-room gunicorn[493]: File "/usr/lib/python3.7/importlib/init.py", line 127, in import_module Sep 10 10:01:38 mush-room gunicorn[493]: return _bootstrap._gcd_import(name[level:], package, level) Sep 10 10:01:38 mush-room gunicorn[493]: File "", line 1006, in _gcd_import Sep 10 10:01:38 mush-room gunicorn[493]: File "", line 983, in _find_and_load Sep 10 10:01:38 mush-room gunicorn[493]: File "", line 967, in _find_and_load_unlocked Sep 10 10:01:38 mush-room gunicorn[493]: File "", line 677, in _load_unlocked Sep 10 10:01:38 mush-room gunicorn[493]: File "", line 728, in exec_module Sep 10 10:01:38 mush-room gunicorn[493]: File "", line 219, in _call_with_frames_removed Sep 10 10:01:38 mush-room gunicorn[493]: File "/home/pi/Mycodo/mycodo/start_flask_ui.py", line 11, in Sep 10 10:01:38 mush-room gunicorn[493]: from mycodo.mycodo_flask.app import create_app Sep 10 10:01:38 mush-room gunicorn[493]: File "/home/pi/Mycodo/mycodo/mycodo_flask/app.py", line 17, in Sep 10 10:01:38 mush-room gunicorn[493]: from flask_limiter import Limiter Sep 10 10:01:38 mush-room gunicorn[493]: File "/home/pi/Mycodo/env/lib/python3.7/site-packages/flask_limiter/init.py", line 4, in Sep 10 10:01:38 mush-room gunicorn[493]: from .extension import Limiter, HEADERS Sep 10 10:01:38 mush-room gunicorn[493]: File "/home/pi/Mycodo/env/lib/python3.7/site-packages/flask_limiter/extension.py", line 14, in Sep 10 10:01:38 mush-room gunicorn[493]: from limits.errors import ConfigurationError Sep 10 10:01:38 mush-room gunicorn[493]: File "/home/pi/Mycodo/env/lib/python3.7/site-packages/limits/init.py", line 5, in Sep 10 10:01:38 mush-room gunicorn[493]: from . import _version, aio, storage, strategies Sep 10 10:01:38 mush-room gunicorn[493]: File "/home/pi/Mycodo/env/lib/python3.7/site-packages/limits/aio/init.py", line 1, in Sep 10 10:01:38 mush-room gunicorn[493]: from . import storage, strategies Sep 10 10:01:38 mush-room gunicorn[493]: File "/home/pi/Mycodo/env/lib/python3.7/site-packages/limits/aio/storage/init.py", line 6, in Sep 10 10:01:38 mush-room gunicorn[493]: from .base import MovingWindowSupport, Storage Sep 10 10:01:38 mush-room gunicorn[493]: File "/home/pi/Mycodo/env/lib/python3.7/site-packages/limits/aio/storage/base.py", line 5, in Sep 10 10:01:38 mush-room gunicorn[493]: from limits.storage.registry import StorageRegistry Sep 10 10:01:38 mush-room gunicorn[493]: File "/home/pi/Mycodo/env/lib/python3.7/site-packages/limits/storage/init.py", line 12, in Sep 10 10:01:38 mush-room gunicorn[493]: from .base import MovingWindowSupport, Storage Sep 10 10:01:38 mush-room gunicorn[493]: File "/home/pi/Mycodo/env/lib/python3.7/site-packages/limits/storage/base.py", line 4, in Sep 10 10:01:38 mush-room gunicorn[493]: from limits.storage.registry import StorageRegistry Sep 10 10:01:38 mush-room gunicorn[493]: File "/home/pi/Mycodo/env/lib/python3.7/site-packages/limits/storage/registry.py", line 5, in Sep 10 10:01:38 mush-room gunicorn[493]: from limits.typing import Dict, List, Tuple, Union Sep 10 10:01:38 mush-room gunicorn[493]: File "/home/pi/Mycodo/env/lib/python3.7/site-packages/limits/typing.py", line 13, in Sep 10 10:01:38 mush-room gunicorn[493]: from typing_extensions import ClassVar, Counter, ParamSpec, Protocol Sep 10 10:01:38 mush-room gunicorn[493]: ImportError: cannot import name 'ParamSpec' from 'typing_extensions' (/usr/local/lib/python3.7/dist-packages/typing_extensions.py) Sep 10 10:01:38 mush-room gunicorn[493]: [2022-09-10 10:01:38 +0200] [674] [INFO] Worker exiting (pid: 674) Sep 10 10:01:38 mush-room gunicorn[493]: [2022-09-10 10:01:38 +0200] [493] [INFO] Shutting down: Master Sep 10 10:01:38 mush-room gunicorn[493]: [2022-09-10 10:01:38 +0200] [493] [INFO] Reason: Worker failed to boot. Sep 10 10:01:38 mush-room systemd[1]: mycodoflask.service: Main process exited, code=exited, status=3/NOTIMPLEMENTED Sep 10 10:01:38 mush-room systemd[1]: mycodoflask.service: Failed with result 'exit-code'.

Unsure what the problem would be.. Any help would be appreciated. Thanks

kizniche commented 2 years ago

No idea what the issue is. Networking issues can cause a number of different issues, since an inability to download just one dependency can break a system. Run sudo ~/Mycodo/mycodo/scripts/upgrade_post.sh and see if it fixes the issue.