certtools / intelmq-api

FastAPI-based API for the IntelMQ project
https://docs.intelmq.org/latest/user/api/
1 stars 7 forks source link

Incompatibility with intelmq develop: defaults and pipeline configuration file removed #29

Closed ghost closed 3 years ago

ghost commented 3 years ago

API tries to access defaults and pipeline configuration: https://github.com/certtools/intelmq-api/blob/477aa8e8d21f9ba227f6056561db20ce5fa6319c/intelmq_api/files.py#L65-L67 Those files no longer exist and access to these files leads to an exception

[Mon Apr 19 17:39:09.267572 2021] [wsgi:error] [pid 13357] [client 172.31.2.23:34620] mod_wsgi (pid=13357): Exception occurred processing WSGI script '/usr/lib/python3/dist-packages/intelmq_api/intelmq-api.wsgi'., referer: http://localhost/intelmq-manager/configs.html
[Mon Apr 19 17:39:09.268192 2021] [wsgi:error] [pid 13357] [client 172.31.2.23:34620] Traceback (most recent call last):, referer: http://localhost/intelmq-manager/configs.html
[Mon Apr 19 17:39:09.268373 2021] [wsgi:error] [pid 13357] [client 172.31.2.23:34620]   File "/usr/lib/python3/dist-packages/intelmq_api/intelmq-api.wsgi", line 12, in application, referer: http://localhost/intelmq-manager/configs.html
[Mon Apr 19 17:39:09.268434 2021] [wsgi:error] [pid 13357] [client 172.31.2.23:34620]     return __hug_wsgi__(environ, start_response), referer: http://localhost/intelmq-manager/configs.html
[Mon Apr 19 17:39:09.268474 2021] [wsgi:error] [pid 13357] [client 172.31.2.23:34620]   File "/usr/local/lib/python3.7/dist-packages/hug/api.py", line 500, in api_auto_instantiate, referer: http://localhost/intelmq-manager/configs.html
[Mon Apr 19 17:39:09.268512 2021] [wsgi:error] [pid 13357] [client 172.31.2.23:34620]     module.__hug_wsgi__ = module.__hug__.http.server(), referer: http://localhost/intelmq-manager/configs.html
[Mon Apr 19 17:39:09.268554 2021] [wsgi:error] [pid 13357] [client 172.31.2.23:34620]   File "/usr/local/lib/python3.7/dist-packages/hug/api.py", line 371, in server, referer: http://localhost/intelmq-manager/configs.html
[Mon Apr 19 17:39:09.268601 2021] [wsgi:error] [pid 13357] [client 172.31.2.23:34620]     self.api._ensure_started(), referer: http://localhost/intelmq-manager/configs.html
[Mon Apr 19 17:39:09.268645 2021] [wsgi:error] [pid 13357] [client 172.31.2.23:34620]   File "/usr/local/lib/python3.7/dist-packages/hug/api.py", line 638, in _ensure_started, referer: http://localhost/intelmq-manager/configs.html
[Mon Apr 19 17:39:09.268684 2021] [wsgi:error] [pid 13357] [client 172.31.2.23:34620]     startup_handler(self), referer: http://localhost/intelmq-manager/configs.html
[Mon Apr 19 17:39:09.268724 2021] [wsgi:error] [pid 13357] [client 172.31.2.23:34620]   File "/path/to/intelmq-api/intelmq_api/serve.py", line 46, in setup, referer: http://localhost/intelmq-manager/configs.html
[Mon Apr 19 17:39:09.268757 2021] [wsgi:error] [pid 13357] [client 172.31.2.23:34620]     intelmq_api.api.initialize_api(api_config), referer: http://localhost/intelmq-manager/configs.html
[Mon Apr 19 17:39:09.268786 2021] [wsgi:error] [pid 13357] [client 172.31.2.23:34620]   File "/path/to/intelmq-api/intelmq_api/api.py", line 76, in initialize_api, referer: http://localhost/intelmq-manager/configs.html
[Mon Apr 19 17:39:09.268825 2021] [wsgi:error] [pid 13357] [client 172.31.2.23:34620]     file_access.update_from_runctl(runner.get_paths()), referer: http://localhost/intelmq-manager/configs.html
[Mon Apr 19 17:39:09.268868 2021] [wsgi:error] [pid 13357] [client 172.31.2.23:34620]   File "/path/to/intelmq-api/intelmq_api/files.py", line 66, in update_from_runctl, referer: http://localhost/intelmq-manager/configs.html
[Mon Apr 19 17:39:09.268910 2021] [wsgi:error] [pid 13357] [client 172.31.2.23:34620]     self.writable_files["defaults"] = Path(paths["DEFAULTS_CONF_FILE"]), referer: http://localhost/intelmq-manager/configs.html
[Mon Apr 19 17:39:09.268993 2021] [wsgi:error] [pid 13357] [client 172.31.2.23:34620] KeyError: 'DEFAULTS_CONF_FILE', referer: http://localhost/intelmq-manager/configs.html
ghost commented 3 years ago

This was fixed in 077146d