Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

335
Vistas
Unable to start gunicorn.service due to import module error

I am trying to start Gunicorn from systemd service file, but I get import module error. How can I fix it?

My gunicorn service file:

[Unit]
Description=gunicorn daemon
After=network.target

[Service]
User=sammy
Group=www-data
WorkingDirectory=/home/sammy/myproject
ExecStart=/home/sammy/myproject/venv/bin/gunicorn --workers 3 --bind unix:/home/sammy/myproject/myproject.sock myproject.wsgi:application

[Install]
WantedBy=multi-user.target

When I execute gunicorn --bind 0.0.0.0:8000 myproject.wsgi:application, there is no error.

But when I use

sudo systemctl start gunicorn
sudo systemctl enable gunicorn

I get this error:

ImportError: No module named 'myproject'

What is wrong?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

It is probably a directory permission problem. Make sure the user sammy is in the www-data group and set the home directory permissions with a chmod 710.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda