From b4256b246e7be7f6be976b29af62a8e0d7d0ee54 Mon Sep 17 00:00:00 2001 From: Hanne Moa Date: Wed, 3 Jul 2024 10:17:49 +0200 Subject: [PATCH 1/9] Document how to troubleshoot in (debian) production MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … or other system with systemd. --- docs/source/install-on-debian.rst | 3 +++ docs/source/troubleshooting-on-debian.rst | 24 +++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 docs/source/troubleshooting-on-debian.rst diff --git a/docs/source/install-on-debian.rst b/docs/source/install-on-debian.rst index d7d5e0c..e640c67 100644 --- a/docs/source/install-on-debian.rst +++ b/docs/source/install-on-debian.rst @@ -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. diff --git a/docs/source/troubleshooting-on-debian.rst b/docs/source/troubleshooting-on-debian.rst new file mode 100644 index 0000000..6a70cf3 --- /dev/null +++ b/docs/source/troubleshooting-on-debian.rst @@ -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 ned 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' start properly or has crashed. Go to +`Check journalctl`_ + +Check journalctl +================ + +Run `journalctl -since="-1h" 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. From 4249dd2a7f2dd9825ed7d1a1b70aa1b83a74fce7 Mon Sep 17 00:00:00 2001 From: Hanne Moa Date: Wed, 3 Jul 2024 14:37:56 +0200 Subject: [PATCH 2/9] Update docs/source/troubleshooting-on-debian.rst Co-authored-by: podliashanyk <60876078+podliashanyk@users.noreply.github.com> --- docs/source/troubleshooting-on-debian.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/troubleshooting-on-debian.rst b/docs/source/troubleshooting-on-debian.rst index 6a70cf3..5d439e9 100644 --- a/docs/source/troubleshooting-on-debian.rst +++ b/docs/source/troubleshooting-on-debian.rst @@ -3,7 +3,7 @@ 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 ned to log in to the console of the site. +exported to an external log tool you need to log in to the console of the site. Check systemctl status ====================== From 8fe714c3042e84f30f9e881f2820ab96352d97e3 Mon Sep 17 00:00:00 2001 From: Hanne Moa Date: Wed, 3 Jul 2024 14:38:07 +0200 Subject: [PATCH 3/9] Update docs/source/troubleshooting-on-debian.rst Co-authored-by: podliashanyk <60876078+podliashanyk@users.noreply.github.com> --- docs/source/troubleshooting-on-debian.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/troubleshooting-on-debian.rst b/docs/source/troubleshooting-on-debian.rst index 5d439e9..81f800b 100644 --- a/docs/source/troubleshooting-on-debian.rst +++ b/docs/source/troubleshooting-on-debian.rst @@ -9,7 +9,7 @@ Check systemctl status ====================== Run ``sudo systemctl status howitz-gunicorn.service``. If it says "disabled" or -there is red text, howitz didn' start properly or has crashed. Go to +there is red text, Howitz didn't start properly or has crashed. Go to `Check journalctl`_ Check journalctl From f54626d881439ac0c10df4a486f7b99b5b4d5ee4 Mon Sep 17 00:00:00 2001 From: Hanne Moa Date: Wed, 3 Jul 2024 14:38:13 +0200 Subject: [PATCH 4/9] Update docs/source/troubleshooting-on-debian.rst Co-authored-by: podliashanyk <60876078+podliashanyk@users.noreply.github.com> --- docs/source/troubleshooting-on-debian.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/troubleshooting-on-debian.rst b/docs/source/troubleshooting-on-debian.rst index 81f800b..b66580e 100644 --- a/docs/source/troubleshooting-on-debian.rst +++ b/docs/source/troubleshooting-on-debian.rst @@ -1,5 +1,5 @@ ========================= -Troubleshooting on debian +Troubleshooting on Debian ========================= Visit the url of the site. If there is a "50x"-error, and the logs are not From f6b96fb2375aae857f5023e36960cfb69a99984e Mon Sep 17 00:00:00 2001 From: Hanne Moa Date: Wed, 3 Jul 2024 14:38:23 +0200 Subject: [PATCH 5/9] Update docs/source/troubleshooting-on-debian.rst Co-authored-by: podliashanyk <60876078+podliashanyk@users.noreply.github.com> --- docs/source/troubleshooting-on-debian.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/troubleshooting-on-debian.rst b/docs/source/troubleshooting-on-debian.rst index b66580e..8f01fa2 100644 --- a/docs/source/troubleshooting-on-debian.rst +++ b/docs/source/troubleshooting-on-debian.rst @@ -2,7 +2,7 @@ Troubleshooting on Debian ========================= -Visit the url of the site. If there is a "50x"-error, and the logs are not +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 From 09c62a1987f0fea07c2c0d962ae1bd5c015644dc Mon Sep 17 00:00:00 2001 From: Hanne Moa Date: Wed, 3 Jul 2024 14:38:33 +0200 Subject: [PATCH 6/9] Update docs/source/troubleshooting-on-debian.rst Co-authored-by: podliashanyk <60876078+podliashanyk@users.noreply.github.com> --- docs/source/troubleshooting-on-debian.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/troubleshooting-on-debian.rst b/docs/source/troubleshooting-on-debian.rst index 8f01fa2..ae9412b 100644 --- a/docs/source/troubleshooting-on-debian.rst +++ b/docs/source/troubleshooting-on-debian.rst @@ -18,7 +18,7 @@ Check journalctl Run `journalctl -since="-1h" 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 +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. From 57e4ba169c770feb97fb999e20c2ee40c98d93b2 Mon Sep 17 00:00:00 2001 From: Hanne Moa Date: Wed, 3 Jul 2024 14:38:42 +0200 Subject: [PATCH 7/9] Update docs/source/troubleshooting-on-debian.rst Co-authored-by: podliashanyk <60876078+podliashanyk@users.noreply.github.com> --- docs/source/troubleshooting-on-debian.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/troubleshooting-on-debian.rst b/docs/source/troubleshooting-on-debian.rst index ae9412b..910fdeb 100644 --- a/docs/source/troubleshooting-on-debian.rst +++ b/docs/source/troubleshooting-on-debian.rst @@ -20,5 +20,5 @@ 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 +``listen`` must be set to an IP address and ``port`` must be set to a port number. From 75164cda107ca9ddb308995d27ae97484d300519 Mon Sep 17 00:00:00 2001 From: Hanne Moa Date: Wed, 3 Jul 2024 14:38:47 +0200 Subject: [PATCH 8/9] Update docs/source/install-on-debian.rst Co-authored-by: podliashanyk <60876078+podliashanyk@users.noreply.github.com> --- docs/source/install-on-debian.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/install-on-debian.rst b/docs/source/install-on-debian.rst index e640c67..4cd12da 100644 --- a/docs/source/install-on-debian.rst +++ b/docs/source/install-on-debian.rst @@ -168,7 +168,7 @@ Set up the configuration file ``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. + 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. From f5a7617323d45f58b779c1eabc51d03e1dbe1969 Mon Sep 17 00:00:00 2001 From: Hanne Moa Date: Wed, 3 Jul 2024 14:39:02 +0200 Subject: [PATCH 9/9] Update docs/source/troubleshooting-on-debian.rst Co-authored-by: podliashanyk <60876078+podliashanyk@users.noreply.github.com> --- docs/source/troubleshooting-on-debian.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/troubleshooting-on-debian.rst b/docs/source/troubleshooting-on-debian.rst index 910fdeb..2764e8b 100644 --- a/docs/source/troubleshooting-on-debian.rst +++ b/docs/source/troubleshooting-on-debian.rst @@ -15,7 +15,7 @@ there is red text, Howitz didn't start properly or has crashed. Go to Check journalctl ================ -Run `journalctl -since="-1h" howitz-gunicorn.service`. This will show the +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