Hyperkitty is not archiving due to 405 error - GET instead of POST
Hi there,
I am running mailman3 on Debian 12 - latest package (GNU Mailman 3.3.8 (Tom Sawyer)). Message handling in general is working fine, but as soon as a message is released, archiving with Hyperkitty is not working, due to a 405 error:
Feb 11 16:18:48 2024 (3479662) HyperKitty failure on http://lists.domain.tld/mailman3/hyperkitty/api/mailman/archive: (405) Feb 11 16:18:48 2024 (3479662) Could not archive the message with id <170766472771.3479669.4791049109141956450@otherdomain.tld> Feb 11 16:18:48 2024 (3479662) archiving failed, re-queuing (mailing-list jahrgang.domain.tld, message <170766472771.3479669.4791049109141956450@otherdomain.tld>) Feb 11 16:18:48 2024 (3479662) Exception in the HyperKitty archiver: Feb 11 16:18:48 2024 (3479662) Traceback (most recent call last): File "/usr/lib/python3/dist-packages/mailman_hyperkitty/__init__.py", line 158, in _archive_message url = self._send_message(mlist, msg) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/mailman_hyperkitty/__init__.py", line 228, in _send_message raise ValueError(result.text) ValueError
When tracing this back, even the frontend Nginx server receives a get in his logs, hence I assume that hyperkitty is really creating a GET instead of a POST request?
217.72.204.162 - - [11/Feb/2024:16:18:48 +0100] "GET /mailman3/hyperkitty/api/mailman/archive HTTP/1.1" 405 0 "-" "python-requests/2.28.1"
Any idea how to trace this down any further?
Any help is really appreciated! Thanks, Matthias
On 2/12/24 8:46 AM, Matthias via Mailman-users wrote:
Hi there,
I am running mailman3 on Debian 12 - latest package (GNU Mailman 3.3.8 (Tom Sawyer)). Message handling in general is working fine, but as soon as a message is released, archiving with Hyperkitty is not working, due to a 405 error:
Feb 11 16:18:48 2024 (3479662) HyperKitty failure on http://lists.domain.tld/mailman3/hyperkitty/api/mailman/archive: (405) Feb 11 16:18:48 2024 (3479662) Could not archive the message with id <170766472771.3479669.4791049109141956450@otherdomain.tld> Feb 11 16:18:48 2024 (3479662) archiving failed, re-queuing (mailing-list jahrgang.domain.tld, message <170766472771.3479669.4791049109141956450@otherdomain.tld>) Feb 11 16:18:48 2024 (3479662) Exception in the HyperKitty archiver: Feb 11 16:18:48 2024 (3479662) Traceback (most recent call last): File "/usr/lib/python3/dist-packages/mailman_hyperkitty/__init__.py", line 158, in _archive_message url = self._send_message(mlist, msg) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/mailman_hyperkitty/__init__.py", line 228, in _send_message raise ValueError(result.text) ValueError
I would expect to see the text from the requests.post result here.
When tracing this back, even the frontend Nginx server receives a get in his logs, hence I assume that hyperkitty is really creating a GET instead of a POST request?
217.72.204.162 - - [11/Feb/2024:16:18:48 +0100] "GET /mailman3/hyperkitty/api/mailman/archive HTTP/1.1" 405 0 "-" "python-requests/2.28.1"
I don't know what's going on here. The code is doing a POST <https://gitlab.com/mailman/mailman-hyperkitty/-/blob/master/mailman_hyperkit...>. If in fact HyperKitty is seeing a GET and therefore returning a 405, that explains the above traceback, but I don't know why that would be.
You could always try adding additional logging to mailman_hyperkitty/__init__.py to log the entire result, but I suspect the issue is that there is a redirect somewhere in the path from the configured HyperKitty base_url (see mailman_hyperkitty.cfg) and the actual HyperKitty API that is redirecting the POST to a GET and also dropping the POST data.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Hi Mark,
Mark Sapiro wrote: ...
You could always try adding additional logging to mailman_hyperkitty/__init__.py to log the entire result, but I suspect the issue is that there is a redirect somewhere in the path from the configured HyperKitty base_url (see mailman_hyperkitty.cfg) and the actual HyperKitty API that is redirecting the POST to a GET and also dropping the POST data.
Thanks a lot...I assumed already the same, but your sentence was giving me again some hint...and I found the base_url...there it wasn't httpS but http, which then was redirected and lost the POST... Now it is working as intended!
Great, Thanks, Matthias
participants (2)
-
Mark Sapiro
-
Matthias