Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

330
Views
No se puede iniciar gunicorn.service debido a un error de módulo de importación

Estoy tratando de iniciar Gunicorn desde el archivo de servicio systemd, pero obtengo un error de módulo de importación. ¿Cómo puedo arreglarlo?

Mi archivo de servicio gunicorn:

 [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

Cuando ejecuto gunicorn --bind 0.0.0.0:8000 myproject.wsgi:application , no hay ningún error.

Pero cuando uso

 sudo systemctl start gunicorn sudo systemctl enable gunicorn

me sale este error:

 ImportError: No module named 'myproject'

¿Lo que está mal?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Probablemente sea un problema de permisos de directorio. Asegúrese de que el usuario sammy esté en el grupo www-data y configure los permisos del directorio de inicio con un chmod 710.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!