question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

locust status ready but 0 users

See original GitHub issue

Locust docker installed and working, but when executed there is no users ??

image

Describe the bug

no users running for test

Expected behavior

users should be not 0 (zero)
version: '3.7'

networks:
  bridge:
    external: true

services:
  master:
    image: locustio/locust:latest
    deploy:
      replicas: 1
      # service restart policy
      restart_policy:
        condition: on-failure
        delay: 5s
        max_attempts: 3
        window: 120s
    ports:
     - "8089:8089"
    networks:
      - bridge
    volumes:
      - /home/core/locust:/mnt/locust
    command: -f /mnt/locust/locustfile.py --master -H http://192.168.33.231:8089
    
  worker:
    image: locustio/locust:latest
    networks:
      - bridge
    deploy:
      replicas: 3
      # service restart policy
      restart_policy:
        condition: on-failure
        delay: 5s
        max_attempts: 3
        window: 120s
    volumes:
      - /home/core/locust:/mnt/locust
    command: -f /mnt/locust/locustfile.py --worker --master-host 192.168.33.231:8089

I copy all files from https://github.com/locustio/locust/tree/master/examples to the docker yaml volume path, and change ip 127.0.0.1 to 192.68.33.231

image

Why locust is not running ??

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
4ss3g4fcommented, Aug 30, 2020

Guys, thank you very much. locust is running properly now

image

image

version: '3.7'

networks:
  bridge:
    external: true

services:
  master:
    image: locustio/locust:latest
    deploy:
      replicas: 1
      # service restart policy
      restart_policy:
        condition: on-failure
        delay: 5s
        max_attempts: 3
        window: 120s
    ports:
     - "8089:8089"
     - "5557:5557"
    networks:
      - bridge
    volumes:
      - /home/core/locust:/mnt/locust
    command: -f /mnt/locust/locustfile.py --master -H http://www.google.com
    
  worker:
    image: locustio/locust:latest
    networks:
      - bridge
    ports:
     - "5558:5558"
    deploy:
      replicas: 3
      # service restart policy
      restart_policy:
        condition: on-failure
        delay: 5s
        max_attempts: 3
        window: 120s
    depends_on:
      - master
    volumes:
      - /home/core/locust:/mnt/locust
    command: -f /mnt/locust/locustfile.py --worker --master-host=192.168.33.230
0reactions
4ss3g4fcommented, Aug 29, 2020

@cyberw ,

Here are the master and worker logs from portainer,

image

image

@max-rocket-internet ,

yes i think you are right

version: '3.7'

networks:
  bridge:
    external: true

services:
  master:
    image: locustio/locust:latest
    deploy:
      replicas: 1
      # service restart policy
      restart_policy:
        condition: on-failure
        delay: 5s
        max_attempts: 3
        window: 120s
    ports:
     - "8089:8089"
    networks:
      - bridge
    volumes:
      - /home/core/locust:/mnt/locust
    command: -f /mnt/locust/locustfile.py --master -H http://www.google.com
    
  worker:
    image: locustio/locust:latest
    networks:
      - bridge
    deploy:
      replicas: 3
      # service restart policy
      restart_policy:
        condition: on-failure
        delay: 5s
        max_attempts: 3
        window: 120s
    volumes:
      - /home/core/locust:/mnt/locust
    command: -f /mnt/locust/locustfile.py --worker --master-host master

it should be connected between master and worker, i will check again. Thank you

Read more comments on GitHub >

github_iconTop Results From Across the Web

all Locust tests results suddenly turned to all 0 - Stack Overflow
So in this case it looks like your login attempts happen before locust is "ready" to actually begin counting requests, given that they...
Read more >
Writing a locustfile — Locust 2.14.0 documentation
Here we define a class for the users that we will be simulating. It inherits from HttpUser which gives each user a client...
Read more >
Locust Forecast Web API User Guide
The application tracks this water landing, but then does not allow the swarm to continue. It is as if the swarm ended when...
Read more >
Performance and Load Testing using Locust - PFLB
Locust is an open-source load testing tool where user behavior is described using ordinary code written in Python. This feature seriously simplifies the ......
Read more >
Implementing dynamic allocation of user load in a distributed ...
a Locust test can be scaled up to simulate millions of simultaneous users. ... class handles no simulated users of its own but...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found