Hi Bernhard,
I set the log level to debug as no error was shown before and after that I found the following line:
[Thu Mar 24 09:46:19.503761 2022] [core:info] [pid 23067] [client 127.0.0.1:43270] AH00128: File does not exist: /var/www/html/intelmq/v1/api/login/
And indeed there is no intelmq directory under /var/www/html. Shouldn't the installer create that folder if needed? I couldn't find a step in the docu neither which pointed out that this must be created.
The following directories with the name "intelmq" exist on my system: /run/intelmq /usr/share/doc/intelmq /usr/lib/python3/dist-packages/intelmq /etc/intelmq /var/lib/intelmq /var/log/intelmq
I also couldn't find anything like v1/api/ on the whole server and I think thats the main problem here?!
My intelmq-api.wsgi looks like the one on github:
""" WSGI file for intelmq-api
SPDX-FileCopyrightText: 2020 Birger Schacht SPDX-License-Identifier: AGPL-3.0-or-later """ import os
def application (environ, start_response): if 'INTELMQ_API_CONFIG' in environ: os.environ['INTELMQ_API_CONFIG'] = environ['INTELMQ_API_CONFIG'] from intelmq_api.serve import __hug_wsgi__ return __hug_wsgi__(environ, start_response)
and I also see the environment variable is set INTELMQ_API_CONFIG=/etc/intelmq/api-config.json
Regards Chris
-----Ursprüngliche Nachricht----- Von: IntelMQ-users intelmq-users-bounces@lists.cert.at Im Auftrag von Bernhard Reiter Gesendet: Mittwoch, 23. März 2022 17:13 An: intelmq-users@lists.cert.at Betreff: Re: [IntelMQ-users] Installation problems intelmq and manager
Hi Chris,
Am Mittwoch, 23. März 2022, 16:36:18 CET schrieb Harbich, Christian:
https://intelmq.readthedocs.io/en/maintenance/user/intelmq-api.html
(haven't personally set this version up recently myself, but maybe I can give hints for you to analyse further.)
curl --location --request POST http://localhost/intelmq/v1/api/login/%5C
[..]
<title>404 Not Found</title>
I'm running on Ubuntu 18.04 and used the native packages which I downloaded manually and installed them using dpkg.
I also noticed that my apache2 only got a conf file for intelmq-api.conf ... shouldnt there be one for the intelmq itself when the curl statement on top is called?
If this is the file you are looking at https://github.com/certtools/intelmq-api/blob/develop/contrib/api-apache.con... WSGIScriptAlias /intelmq /usr/lib/python3/dist-packages/intelmq_api/intelmq- api.wsgi it seems that all with the prefix path "/intelmq" is passed in to the wsgi Skript. (You should check your apache logs to see if there are other errors coming from this wsgi or elsewhere.)
So next stop https://github.com/certtools/intelmq-api/blob/develop/intelmq_api/intelmq-ap... and then it goes into https://github.com/certtools/intelmq-api/blob/develop/intelmq_api/serve.py where it initialises and goes to https://github.com/certtools/intelmq-api/blob/develop/intelmq_api/api.py where it should end up at https://github.com/certtools/intelmq-api/blob/ 9f8513bb0268144b62522e67bee3c290eb6eac8a/intelmq_api/api.py#L186 @hug.post("/api/login", versions=1) somehow not all of these connections work, again I'd start at the apache configuration and logs, possibily adding debugging infos there for calling the wsgi Skript.
Best Bernhard