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

792
Vistas
Test with locust and [Errno 111] Connection refused

I have django (1.6) app and I want to test it with locust. I installed locust==0.7.5 and pyzmq==16.0.2 and I revived a lot of fails: [Errno 111] Connection refused' more details below

When I run app with command: locust --host=http://127.0.0.1 I receive the following error:

ConnectionError(MaxRetryError("HTTPConnectionPool(host='127.0.0.1', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f7639d89750>: Failed to establish a new connection: [Errno 111] Connection refused',))",),)

My locust file:

from locust import TaskSet, HttpLocust, task


class UserBehavior(TaskSet):
    @task
    def home(self):
        self.client.get('/')

    @task
    def programm(self):
        self.client.get('/programm')


class WebsiteUser(HttpLocust):
    task_set = UserBehavior

Any help on regarding how to resolve the error would be appreciated!

about 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

Since your server is running on port 8000 and not 80, try running the command

locust --host=http://127.0.0.1:8000 -f <your-locust-file.py>
about 4 years ago · Santiago Trujillo Denunciar

0

Use your local ip address like 192.168.1.1:8080/api/. localhost throw Connection refused.

about 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