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

Docker Installation failed #231

Closed
kiurzz opened this issue Oct 4, 2022 · 3 comments · Fixed by opencve/opencve-docker#27
Closed

Docker Installation failed #231

kiurzz opened this issue Oct 4, 2022 · 3 comments · Fixed by opencve/opencve-docker#27

Comments

@kiurzz
Copy link

kiurzz commented Oct 4, 2022

image

Hello, when I want to install OpenCVE via Docker, when I start the containers, webserver and celery-worker they do not want to start and print this error message:
Traceback (most recent call last):
File "/app/venv/bin/opencve", line 11, in
load_entry_point('opencve==1.3.0', 'console_scripts', 'opencve')()
File "/app/venv/lib/python3.7/site-packages/pkg_resources/init.py", line 490, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/app/venv/lib/python3.7/site-packages/pkg_resources/init.py", line 2862, in load_entry_point
return ep.load()
File "/app/venv/lib/python3.7/site-packages/pkg_resources/init.py", line 2462, in load
return self.resolve()
File "/app/venv/lib/python3.7/site-packages/pkg_resources/init.py", line 2468, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/app/venv/lib/python3.7/site-packages/opencve/init.py", line 7, in
from opencve.api import api_bp
File "/app/venv/lib/python3.7/site-packages/opencve/api/init.py", line 4, in
from opencve.api.alerts import AlertListResource, AlertResource
File "/app/venv/lib/python3.7/site-packages/opencve/api/alerts.py", line 4, in
from opencve.api.base import BaseResource
File "/app/venv/lib/python3.7/site-packages/opencve/api/base.py", line 7, in
from opencve.extensions import limiter
File "/app/venv/lib/python3.7/site-packages/opencve/extensions.py", line 1, in
from celery import Celery
ImportError: cannot import name 'Celery' from 'celery' (/app/venv/lib/python3.7/site-packages/celery/init.py)

@therob89
Copy link

therob89 commented Oct 4, 2022

Modify the first line of Dockerfile as follow:

FROM python:3.8.14-slim-buster as base

and the containers will start correctly.

@ncrocfer
Copy link
Member

ncrocfer commented Oct 4, 2022

This seems related to a new release of the importlib-metadata package in Celery requirements: celery/celery#7783

We'll upgrade the Dockerfile to use Python 3.8 as proposed by @therob89

@kiurzz
Copy link
Author

kiurzz commented Oct 5, 2022

It's works now, thanks @therob89 ! Hope that will help somebody else ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants