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

604
Views
Configuración de Django + Nginx + Gunicorn con error: (104: restablecimiento de la conexión por par) al leer el encabezado de respuesta desde el origen

Tengo un servidor configurado con Ubuntu 20.04, Nginx y ejecuto una aplicación Django con Gunicorn. Mi archivo gunicorn.socket es así:

 [Unit] Description=gunicorn socket [Socket] ListenStream=/run/gunicorn.sock [Install] WantedBy=sockets.target

Y mi archivo gunicorn.service es así:

 [Unit] Description=gunicorn daemon Requires=gunicorn.socket After=network.target [Service] User=root Group=www-data WorkingDirectory=/root/backend ExecStart=/root/.local/share/virtualenvs/backend-Lu9kB6KY/bin/gunicorn \ --access-logfile /var/log/nginx/backend.log \ --workers 3 \ --bind unix:/run/gunicorn.sock \ backend.wsgi:application [Install] WantedBy=multi-user.target

Y en un archivo en /etc/nginx/sites-available/backend , tengo:

 server { listen 80; listen [::]:80; server_name domain.com; location = /favicon.ico { access_log off; log_not_found off; } location /static/ { root /root/backend/; } location / { include proxy_params; proxy_pass http://unix:/run/gunicorn.sock; } }

Cuando visito la página de inicio, veo un 502 Bad Gateway error y los registros en /var/log/nginx/error.log muestran: [error] 15866#15866: *86 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 82.102.24.9, server: domain.com, request: "GET / HTTP/1.1", upstream: "http://unix:/run/gunicorn.sock:/", host: "domain.com"

¿Qué he hecho mal? ¿Qué hacer?

over 4 years ago · Santiago Trujillo
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!