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

Document how to troubleshoot in (debian) production #148

Merged
merged 9 commits into from
Jul 3, 2024
3 changes: 3 additions & 0 deletions docs/source/install-on-debian.rst
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ Set up the configuration file
it.
#. In the config-file, set ``devmode`` in the ``[howitz]`` section to
``false``, no quotes.
#. Because of ``devmode`` being ``false`` you also need to set ``listen`` to
``"127.0.0.1"`` and ``port`` to ``5000`` in the same section as ``devmode``,
so that gunicorn can find Howitz.
#. Eventually you will probably wish to lower the log-level. In the
config-file, set ``level`` in the ``[logging.root]`` section to ``"INFO"``,
note the quotes.
Expand Down
24 changes: 24 additions & 0 deletions docs/source/troubleshooting-on-debian.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
=========================
Troubleshooting on Debian
=========================

Visit the URL of the site. If there is a "50x"-error, and the logs are not
exported to an external log tool you need to log in to the console of the site.

Check systemctl status
======================

Run ``sudo systemctl status howitz-gunicorn.service``. If it says "disabled" or
there is red text, Howitz didn't start properly or has crashed. Go to
`Check journalctl`_

Check journalctl
================

Run `journalctl --since="-1h" -u howitz-gunicorn.service`. This will show the
gunicorn log for the last hour.

If there is an exception mentioning "pydantic", you might have forgotten to
configure everything. Remember that if ``devmode`` is ``false``, then
``listen`` must be set to an IP address and ``port`` must be set to a port
number.