[IntelMQ-dev] intelmq-manager problem at login

Mika Silander mika.silander at csc.fi
Tue Sep 19 14:41:24 CEST 2023


Hi Kamil,

 Yes, the "allow_origins" is present only once within /etc/intelmq/api-config.json and contains the default value ["*"].
I've now built and installed intelmq-api 3.1.0-rc and the same problem shows up, the stack trace is the same:

[Tue Sep 19 15:31:39.825091 2023] [wsgi:info] [pid 196708:tid 139826913322560] [client client_ip_here:43286] mod_wsgi (pid=196708, process='', application=''): Loading Python script file '/usr/lib/python3/dist-packages/intelmq_api/intelmq-api.wsgi'., referer: https://fqdn/intelmq_manager/
[Tue Sep 19 15:31:40.314824 2023] [wsgi:error] [pid 196708:tid 139826913322560] [client client_ip_here:43286] Loading config from /etc/intelmq/api-config.json, referer: https://fqdn/intelmq_manager/
[Tue Sep 19 15:31:40.315153 2023] [wsgi:error] [pid 196708:tid 139826913322560] [client client_ip_here:43286] mod_wsgi (pid=196708): Exception occurred processing WSGI script '/usr/lib/python3/dist-packages/intelmq_api/intelmq-api.wsgi'., referer: https://fqdn/intelmq_manager/
[Tue Sep 19 15:31:40.315487 2023] [wsgi:error] [pid 196708:tid 139826913322560] [client client_ip_here:43286] Traceback (most recent call last):, referer: https://fqdn/intelmq_manager/
[Tue Sep 19 15:31:40.315519 2023] [wsgi:error] [pid 196708:tid 139826913322560] [client client_ip_here:43286]   File "/usr/lib/python3/dist-packages/intelmq_api/intelmq-api.wsgi", line 11, in application, referer: https://fqdn/intelmq_manager/
[Tue Sep 19 15:31:40.315532 2023] [wsgi:error] [pid 196708:tid 139826913322560] [client client_ip_here:43286]     from intelmq_api.serve import __hug_wsgi__, referer: https://fqdn/intelmq_manager/
[Tue Sep 19 15:31:40.315544 2023] [wsgi:error] [pid 196708:tid 139826913322560] [client client_ip_here:43286]   File "/usr/lib/python3/dist-packages/intelmq_api/serve.py", line 31, in <module>, referer: https://fqdn/intelmq_manager/
[Tue Sep 19 15:31:40.315552 2023] [wsgi:error] [pid 196708:tid 139826913322560] [client client_ip_here:43286]     api.http.add_middleware(hug.middleware.CORSMiddleware(api, allow_origins=api_config.allow_origins)), referer: https://fqdn/intelmq_manager/
[Tue Sep 19 15:31:40.315563 2023] [wsgi:error] [pid 196708:tid 139826913322560] [client client_ip_here:43286]   File "falcon/middleware.py", line 39, in falcon.middleware.CORSMiddleware.__init__, referer: https://fqdn/intelmq_manager/
[Tue Sep 19 15:31:40.315593 2023] [wsgi:error] [pid 196708:tid 139826913322560] [client client_ip_here:43286] TypeError: __init__() got multiple values for keyword argument 'allow_origins', referer: https://fqdn/intelmq_manager/

 It is also worth noting that I've made a few changes to configurations, e.g. my allowed_path setting in api-config.json is "/var/lib/intelmq/bots/". The odd thing is that I had this exact version (3.1.0-rc) of intelmq-api working ok some time ago.

Br, Mika  


----- Original Message -----
From: "Kamil Mankowski" <mankowski at cert.at>
To: "Mika Silander" <mika.silander at csc.fi>, "intelmq-dev" <intelmq-dev at lists.cert.at>
Sent: Tuesday, 19 September, 2023 15:10:31
Subject: Re: [IntelMQ-dev] intelmq-manager problem at login

Hey, were you able to provide a little longer error log? Or there is no 
stack trace in the log file? And please take a look at your API config 
in most probably /etc/intelmq/api-config.json - does it have the line 
(possibly with adjustments):

"allow_origins": ["*"]

once, and only once?

Best regards,
Kamil Mankowski
CERT.at GmbH
www.cert.at

On 9/19/23 13:29, Mika Silander wrote:
> Hi again,
> 
>   Related to the below, I went and tried to install intelmq-manager 3.2.0-1 and intelmq-api 3.0.1-1 from the stable repository https://download.opensuse.org/repositories/home:/sebix:/intelmq/xUbuntu_22.04/ and I'm afraid the stable also contains some problems that have not been ironed out.
> Maybe this was the reason why I jumped over to unstable, can't remember. Still, fyi when setting apache2's LogLevel to debug and attempting to open any of intelmq-manager's tabs behind
> password authentication, /var/log/apache2/intelmq-error.log starts to fill with errors related to https://fqdn/intelmq/v1/api/_function_ calls (500 internal server error). The reason seems to be
> 
> [Tue Sep 19 12:27:08.534474 2023] [wsgi:error] [pid 189852:tid 139757103318592] [client client_ip_here.port] TypeError: __init__() got multiple values for keyword argument 'allow_origins', referer: https://fqdn/intelmq_manager/about.html
> 
>   I may be wrong but to me it looks like intelmq-manager has not invoked any function related to intelmq at this stage yet, so I believe my unstable version of intelmq installed on the same host is not involved in this. Anyway, I'll continue debugging.
> 
> Br, Mika
> 
> 
> ----- Original Message -----
> From: "Sebix" <sebix at sebix.at>
> To: "intelmq-dev" <intelmq-dev at lists.cert.at>
> Sent: Monday, 18 September, 2023 13:22:30
> Subject: Re: [IntelMQ-dev] intelmq-manager problem at login
> 
> Hi Mika,
> 
> On 9/18/23 09:39, Mika Silander wrote:
>> I vaguely remember I switched a good while ago to the unstable package repos due to some bug I found in the stable ones ...
> 
> Be careful with the unstable repository, they are not well maintained
> and may not only contain unstable version, but also also older versions
> than the stable repository, or packages incompatible with the stable
> repository when mixed
> 
> best regards
> Sebastian
> 
> ---
> Institute for Common Good Technology
> gemeinnütziger Kulturverein - nonprofit cultural society
> https://commongoodtechnology.org/
> ZVR 1510673578
> 
> _______________________________________________
> IntelMQ-dev mailing list
> https://lists.cert.at/cgi-bin/mailman/listinfo/intelmq-dev
> https://intelmq.readthedocs.io/
> _______________________________________________
> IntelMQ-dev mailing list
> https://lists.cert.at/cgi-bin/mailman/listinfo/intelmq-dev
> https://intelmq.readthedocs.io/


More information about the IntelMQ-dev mailing list