blabla1337 / skf-flask

Security Knowledge Framework (SKF) Python Flask / Angular project
https://www.securityknowledgeframework.org
Apache License 2.0
810 stars 308 forks source link

SKF Flask Api docker not working #826

Open Vigneshkna opened 1 year ago

Vigneshkna commented 1 year ago

Docker Desktop -> 4.19.0 Docker Image -> blabla1337/skf-api:4.1.1

I'm facing issue in pika.exceptions.AMQPConnectionError BlockingConnection in pika packages, due to this i couldnt establish the connection to the database to frontend, and in localhost i'm getting "The Requested URL notFound" error.

Terminal stackTrace Log: image image image

Environment: image image

LocalHost: image

github-actions[bot] commented 1 year ago

Thank you for creating an issue ticket for our SKF project, we highly appriciate the feedback so we can improve the project and make it more awesome for everyone! We will shortly come back to you after the evaluation of the issue.

cptfixit commented 1 year ago

I'm having similar problems. The logging is:

skf-api_container | Traceback (most recent call last):
skf-api_container |   File "skf/rabbit_mq_workers/deployment-worker.py", line 207, in <module>
skf-api_container |     channel.start_consuming()
skf-api_container |   File "/home/user_api/.local/lib/python3.7/site-packages/pika/adapters/blocking_connection.py", line 1866, in start_consuming
skf-api_container |     self._process_data_events(time_limit=None)
skf-api_container |   File "/home/user_api/.local/lib/python3.7/site-packages/pika/adapters/blocking_connection.py", line 2027, in _process_data_events
skf-api_container |     self.connection.process_data_events(time_limit=time_limit)
skf-api_container |   File "/home/user_api/.local/lib/python3.7/site-packages/pika/adapters/blocking_connection.py", line 825, in process_data_events
skf-api_container |     self._flush_output(common_terminator)
skf-api_container |   File "/home/user_api/.local/lib/python3.7/site-packages/pika/adapters/blocking_connection.py", line 522, in _flush_output
skf-api_container |     raise self._closed_result.value.error
skf-api_container | pika.exceptions.StreamLostError: Stream connection lost: ConnectionResetError(104, 'Connection reset by peer')
skf-api_container | Traceback (most recent call last):
skf-api_container |   File "skf/rabbit_mq_workers/deletion-worker.py", line 51, in <module>
skf-api_container |     channel.start_consuming()
skf-api_container |   File "/home/user_api/.local/lib/python3.7/site-packages/pika/adapters/blocking_connection.py", line 1866, in start_consuming
skf-api_container |     self._process_data_events(time_limit=None)
skf-api_container |   File "/home/user_api/.local/lib/python3.7/site-packages/pika/adapters/blocking_connection.py", line 2027, in _process_data_events
skf-api_container |     self.connection.process_data_events(time_limit=time_limit)
skf-api_container |   File "/home/user_api/.local/lib/python3.7/site-packages/pika/adapters/blocking_connection.py", line 825, in process_data_events
skf-api_container |     self._flush_output(common_terminator)
skf-api_container |   File "/home/user_api/.local/lib/python3.7/site-packages/pika/adapters/blocking_connection.py", line 522, in _flush_output
skf-api_container |     raise self._closed_result.value.error
skf-api_container | pika.exceptions.StreamLostError: Stream connection lost: ConnectionResetError(104, 'Connection reset by peer')

Interestingly I notice that the RabbitMQ container will automatically die within a few minutes after startup. The logs show:

skf-rabbitmq_container exited with code 0

... without a clear indication as to why this would be happening.