If I pass the following args on a terminal window:
locust --headless --master --expect-workers 5 -H http://localhost -u 100 -r 30 -t 20s -T "Test" -L DEBUG
Locust initializes as expected and I'm able to launch workers on another terminal window with locust --worker &
. But if I create a locust.conf
file, like following:
headless = true
master = true
expect-workers = 5
host = http://localhost
users = 100
spawn-rate = 30
run-time = 20s
tags = Test
loglevel = DEBUG
as we can see in Locust Documentation for configuration file, I can use just locust
on terminal to start a Locust master instance. And as expected, Locust starts as master, waiting for workers to connect, but when trying to launch workers, they don't connect to master and exits with this message:
The Locust master port (5557) was busy. Close any applications using that port - perhaps an old
instance of Locust master is still running? (Socket bind failure: Address already in use)
Even when locust.conf
file has a single master = true
line, workers fail on connect to a locust master instance launched before. I understand that both ways of starting Locust as master is valid, but they behave differently, as they shouldn't.
Is there anything I didn't see that could provide a way to make Locust work with a config file, or that is the expected behavior?