kizniche / Mycodo

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

Bad Gateway Error after install of Mycodo #1155

Closed MSPGrow closed 2 years ago

MSPGrow commented 2 years ago

Error 502: Bad Gateway Error

Something bad happened but it's probably not your fault. Try refreshing the page to see if it will load. If that doesn't work, try rebooting your system, then try refreshing it again. If that still doesn't work, submit a new issue on GitHub with any usefull information that can help determine the cause of this issue.

The last 50 lines from the Mycodo frontend web log can be viewed with the command:

journalctl -u mycodoflask | tail -n 50 If you create an issue on github, provide this excerpt of the log for diagnostic purposes.

pi@raspberrypi:~ $ journalctl -u mycodoflask | tail -n 50 Feb 18 19:15:54 raspberrypi gunicorn[2075]: return util.import_app(self.app_uri) Feb 18 19:15:54 raspberrypi gunicorn[2075]: File "/home/pi/Mycodo/env/lib/python3.9/site-packages/gunicorn/util.py", line 359, in import_app Feb 18 19:15:54 raspberrypi gunicorn[2075]: mod = importlib.import_module(module) Feb 18 19:15:54 raspberrypi gunicorn[2075]: File "/usr/lib/python3.9/importlib/init.py", line 127, in import_module Feb 18 19:15:54 raspberrypi gunicorn[2075]: return _bootstrap._gcd_import(name[level:], package, level) Feb 18 19:15:54 raspberrypi gunicorn[2075]: File "", line 1030, in _gcd_import Feb 18 19:15:54 raspberrypi gunicorn[2075]: File "", line 1007, in _find_and_load Feb 18 19:15:54 raspberrypi gunicorn[2075]: File "", line 986, in _find_and_load_unlocked Feb 18 19:15:54 raspberrypi gunicorn[2075]: File "", line 680, in _load_unlocked Feb 18 19:15:54 raspberrypi gunicorn[2075]: File "", line 790, in exec_module Feb 18 19:15:54 raspberrypi gunicorn[2075]: File "", line 228, in _call_with_frames_removed Feb 18 19:15:54 raspberrypi gunicorn[2075]: File "/home/pi/Mycodo/mycodo/start_flask_ui.py", line 11, in Feb 18 19:15:54 raspberrypi gunicorn[2075]: from mycodo.mycodo_flask.app import create_app Feb 18 19:15:54 raspberrypi gunicorn[2075]: File "/home/pi/Mycodo/mycodo/mycodo_flask/app.py", line 24, in Feb 18 19:15:54 raspberrypi gunicorn[2075]: from mycodo.databases.models import Misc Feb 18 19:15:54 raspberrypi gunicorn[2075]: File "/home/pi/Mycodo/mycodo/databases/init.py", line 7, in Feb 18 19:15:54 raspberrypi gunicorn[2075]: from mycodo.mycodo_flask.extensions import db Feb 18 19:15:54 raspberrypi gunicorn[2075]: File "", line 1007, in _find_and_load Feb 18 19:15:54 raspberrypi gunicorn[2075]: File "", line 986, in _find_and_load_unlocked Feb 18 19:15:54 raspberrypi gunicorn[2075]: File "", line 680, in _load_unlocked Feb 18 19:15:54 raspberrypi gunicorn[2075]: File "", line 790, in exec_module Feb 18 19:15:54 raspberrypi gunicorn[2075]: File "/home/pi/Mycodo/mycodo/mycodo_flask/extensions.py", line 12, in Feb 18 19:15:54 raspberrypi gunicorn[2075]: from flask_sqlalchemy import SQLAlchemy Feb 18 19:15:54 raspberrypi gunicorn[2075]: File "/home/pi/Mycodo/env/lib/python3.9/site-packages/flask_sqlalchemy/init.py", line 13, in Feb 18 19:15:54 raspberrypi gunicorn[2075]: import sqlalchemy Feb 18 19:15:54 raspberrypi gunicorn[2075]: File "/home/pi/Mycodo/env/lib/python3.9/site-packages/sqlalchemy/init.py", line 9, in Feb 18 19:15:54 raspberrypi gunicorn[2075]: from .engine import create_engine Feb 18 19:15:54 raspberrypi gunicorn[2075]: File "/home/pi/Mycodo/env/lib/python3.9/site-packages/sqlalchemy/engine/init.py", line 18, in Feb 18 19:15:54 raspberrypi gunicorn[2075]: from . import events Feb 18 19:15:54 raspberrypi gunicorn[2075]: File "/home/pi/Mycodo/env/lib/python3.9/site-packages/sqlalchemy/engine/events.py", line 9, in Feb 18 19:15:54 raspberrypi gunicorn[2075]: from .base import Engine Feb 18 19:15:54 raspberrypi gunicorn[2075]: File "/home/pi/Mycodo/env/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 12, in Feb 18 19:15:54 raspberrypi gunicorn[2075]: from .interfaces import Connectable Feb 18 19:15:54 raspberrypi gunicorn[2075]: File "/home/pi/Mycodo/env/lib/python3.9/site-packages/sqlalchemy/engine/interfaces.py", line 11, in Feb 18 19:15:54 raspberrypi gunicorn[2075]: from ..sql.compiler import Compiled # noqa Feb 18 19:15:54 raspberrypi gunicorn[2075]: File "/home/pi/Mycodo/env/lib/python3.9/site-packages/sqlalchemy/sql/init.py", line 9, in Feb 18 19:15:54 raspberrypi gunicorn[2075]: from .compiler import COLLECT_CARTESIAN_PRODUCTS Feb 18 19:15:54 raspberrypi gunicorn[2075]: File "/home/pi/Mycodo/env/lib/python3.9/site-packages/sqlalchemy/sql/compiler.py", line 33, in Feb 18 19:15:54 raspberrypi gunicorn[2075]: from . import coercions Feb 18 19:15:54 raspberrypi gunicorn[2075]: File "/home/pi/Mycodo/env/lib/python3.9/site-packages/sqlalchemy/sql/coercions.py", line 1077, in Feb 18 19:15:54 raspberrypi gunicorn[2075]: impl = globals()name Feb 18 19:15:54 raspberrypi gunicorn[2075]: KeyError: 'DMLTableImpl' Feb 18 19:15:54 raspberrypi gunicorn[2075]: [2022-02-18 19:15:54 +0000] [2075] [INFO] Worker exiting (pid: 2075) Feb 18 19:15:54 raspberrypi gunicorn[2075]: Exception ignored deletion of interned string failed: Feb 18 19:15:54 raspberrypi gunicorn[2075]: KeyError: 'perf_counter' Feb 18 19:15:54 raspberrypi gunicorn[1663]: [2022-02-18 19:15:54 +0000] [1663] [INFO] Shutting down: Master Feb 18 19:15:54 raspberrypi gunicorn[1663]: [2022-02-18 19:15:54 +0000] [1663] [INFO] Reason: Worker failed to boot. Feb 18 19:15:54 raspberrypi systemd[1]: mycodoflask.service: Main process exited, code=exited, status=3/NOTIMPLEMENTED Feb 18 19:15:54 raspberrypi systemd[1]: mycodoflask.service: Failed with result 'exit-code'. Feb 18 19:15:54 raspberrypi systemd[1]: mycodoflask.service: Consumed 15.546s CPU time.

MSPGrow commented 2 years ago

Can someone help me with this? I don't know how to get past it. Thanks

kizniche commented 2 years ago

What operating system?

MSPGrow commented 2 years ago

Raspberry PI OS Lite (32-bit)

kizniche commented 2 years ago

No idea about this issue. Try installing again from the master branch.

MSPGrow commented 2 years ago

Thanks Kyle,

Where can I find the master branch?

Thanks, Mark

Also, would it do any good to use the 64-bt Raspberry Pi OS Lite?

Sent with ProtonMail secure email.

------- Original Message ------- On Friday, March 18th, 2022 at 11:18 AM, Kyle Gabriel @.***> wrote:

No idea about this issue. Try installing again from the master branch.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>