Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Status Code 500 - Internal Server Error #28

Closed
MarcosxDeveloper opened this issue Mar 17, 2021 · 4 comments
Closed

Status Code 500 - Internal Server Error #28

MarcosxDeveloper opened this issue Mar 17, 2021 · 4 comments
Labels
bug Something isn't working packaging
Milestone

Comments

@MarcosxDeveloper
Copy link

Installation type: native packages

Apache2 Error Logs:

mod_wsgi (pid=2904): Exception occurred processing WSGI script '/usr/lib/python3/dist-packages/intelmq_api/intelmq-api.wsgi'.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/intelmq_api/intelmq-api.wsgi", line 11, in application
from intelmq_api.serve import __hug_wsgi__
File "/usr/lib/python3/dist-packages/intelmq_api/serve.py", line 31, in <module>
api.http.add_middleware(hug.middleware.CORSMiddleware(api, allow_origins=api_config.allow_origins))
AttributeError: module 'hug.middleware' has no attribute 'CORSMiddleware'
@MarcosxDeveloper MarcosxDeveloper changed the title Error 500 Internal Server Error Stats Code 500 - Internal Server Error Mar 17, 2021
@MarcosxDeveloper MarcosxDeveloper changed the title Stats Code 500 - Internal Server Error Status Code 500 - Internal Server Error Mar 17, 2021
@MarcosxDeveloper
Copy link
Author

MarcosxDeveloper commented Mar 17, 2021

I Fixed Installing hug-middleware-cors 1.0.0

And update the next code line in: /usr/lib/python3/dist-packages/intelmq_api/serve.py

OLD:

api.http.add_middleware(hug.middleware.CORSMiddleware(api, allow_origins=api_config.allow_origins))

NEW:

from hug_middleware_cors import CORSMiddleware
api.http.add_middleware(CORSMiddleware(api, allow_origins=api_config.allow_origins))

@ghost
Copy link

ghost commented Mar 17, 2021

Which OS do you use?

Today I identified an issue with the hug/falcon packages and provided more current versions in our repo. Can you check if you see an update and if that fixes your issues after a webserver restart (apt update && apt upgrade && systemctl restart apache2)

@ghost ghost added bug Something isn't working packaging labels Mar 17, 2021
@ghost ghost added this to the 2.3.1 milestone Mar 17, 2021
@MarcosxDeveloper
Copy link
Author

MarcosxDeveloper commented Mar 18, 2021

hello @wagner-certat ,

I use Ubuntu 18.04 LTS.

I Solved my problem removing my code and execute your script.

Thanks a lot.

@ghost
Copy link

ghost commented Mar 18, 2021

Thanks for the feedback (and reporting the issue)!

I hope we have found and fixed all issues now, we'll do bugfix releases next week.

@ghost ghost closed this as completed Mar 18, 2021
@ghost ghost self-assigned this Mar 18, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working packaging
Projects
None yet
Development

No branches or pull requests

1 participant