How to run Locust in distributed mode

397 views
Skip to first unread message

oat...@gmail.com

unread,
Jun 1, 2017, 2:57:34 AM6/1/17
to codename-taurus
Hi. Recently read in a topic that now is possible to run Locust by Taurus in distributed mode. Not found about that in docs, guess that it is like jmeter config

execution:
- distributed:
 
- ip1
 
- ip2
- executor: locust
 concurrency
: 1
 ramp
-up: 20s
 iterations
: 10
 scenario
: example
 master
: True
 slaves
: 1

scenarios
:
 example
:
 
default-address: http://example.com
 script
: sample.py


But get 
ERROR: Config Error: Scenario is not found in execution: defaultdict(None, {'distributed': ['ip1', 'ip2'], 'executor': 'jmeter'})

I have installed Taurus CLI Tool v1.9.2

How to run it correctly?

ta...@blazemeter.com

unread,
Jun 1, 2017, 4:06:21 AM6/1/17
to codename-taurus, oat...@gmail.com
Hello.
You have to fix scenarios part.
(hint: look at indentations of 'example' and 'default-address'. they must be different)
More than, you have other indentation mistakes about in your script. Please revise hierarchy carefully. 

Andrey Pokhilko

unread,
Jun 1, 2017, 6:25:16 AM6/1/17
to codenam...@googlegroups.com
The right config would be like below. But "distributed" option does nothing - Taurus is unable to start locust slaves. You have to start the slaves manually. Or you can also look at cloud provisioned exectution in Taurus.

execution:
- distributed:
 
- ip1
 
- ip2
  executor: locust
  concurrency
: 1
  ramp
-up: 20s
  iterations
: 10
  scenario
: example
  master
: True
  slaves
: 1

scenarios
:
  example
:
 
default-address: http://example.com
  script
: sample.py


Andrey Pohilko
Chief Scientist
P: +7 (909) 631-21-69
BlazeMeter Inc.
--
You received this message because you are subscribed to the Google Groups "codename-taurus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codename-taur...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codename-taurus/1af480a1-d6c8-42b7-895a-47e96900e94b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

oat...@gmail.com

unread,
Jun 1, 2017, 11:14:57 AM6/1/17
to codename-taurus, andrey....@contractor.ca.com
Clear, thanks. Did it.

I test it just locally, in 1 master and 2 slaves docker containers. Now I have an error at launch bzt
Child Process Error: Empty results, most likely example (LocustIOExecutor) failed.
and the locust.log

[2017-06-01 15:00:39,631] f810e3c012e8/ERROR/stderr: Traceback (most recent call last):
[2017-06-01 15:00:39,632] f810e3c012e8/ERROR/stderr: File "/usr/local/lib/python2.7/site-packages/bzt/resources/locustio-taurus-wrapper.py", line 97, in <module>
[2017-06-01 15:00:39,632] f810e3c012e8/ERROR/stderr:
[2017-06-01 15:00:39,632] f810e3c012e8/ERROR/stderr: locust_starter.execute()
[2017-06-01 15:00:39,632] f810e3c012e8/ERROR/stderr: File "/usr/local/lib/python2.7/site-packages/bzt/resources/locustio-taurus-wrapper.py", line 91, in execute
[2017-06-01 15:00:39,632] f810e3c012e8/ERROR/stderr:
[2017-06-01 15:00:39,632] f810e3c012e8/ERROR/stderr: main.main()
[2017-06-01 15:00:39,632] f810e3c012e8/ERROR/stderr: File "/usr/local/lib/python2.7/site-packages/locust/main.py", line 426, in main
[2017-06-01 15:00:39,633] f810e3c012e8/ERROR/stderr:
[2017-06-01 15:00:39,633] f810e3c012e8/ERROR/stderr: runners.locust_runner = MasterLocustRunner(locust_classes, options)
[2017-06-01 15:00:39,633] f810e3c012e8/ERROR/stderr: File "/usr/local/lib/python2.7/site-packages/locust/runners.py", line 247, in __init__
[2017-06-01 15:00:39,633] f810e3c012e8/ERROR/stderr:
[2017-06-01 15:00:39,633] f810e3c012e8/ERROR/stderr: self.server = rpc.Server(self.master_bind_host, self.master_bind_port)
[2017-06-01 15:00:39,633] f810e3c012e8/ERROR/stderr: File "/usr/local/lib/python2.7/site-packages/locust/rpc/zmqrpc.py", line 18, in __init__
[2017-06-01 15:00:39,633] f810e3c012e8/ERROR/stderr:
[2017-06-01 15:00:39,633] f810e3c012e8/ERROR/stderr: self.receiver.bind("tcp://%s:%i" % (host, port))
[2017-06-01 15:00:39,633] f810e3c012e8/ERROR/stderr: File "zmq/backend/cython/socket.pyx", line 487, in zmq.backend.cython.socket.Socket.bind (zmq/backend/cython/socket.c:5156)
[2017-06-01 15:00:39,634] f810e3c012e8/ERROR/stderr: File "zmq/backend/cython/checkrc.pxd", line 25, in zmq.backend.cython.checkrc._check_rc (zmq/backend/cython/socket.c:7535)
[2017-06-01 15:00:39,634] f810e3c012e8/ERROR/stderr: zmq.error
[2017-06-01 15:00:39,634] f810e3c012e8/ERROR/stderr: .
[2017-06-01 15:00:39,634] f810e3c012e8/ERROR/stderr: ZMQError
[2017-06-01 15:00:39,635] f810e3c012e8/ERROR/stderr: :
[2017-06-01 15:00:39,635] f810e3c012e8/ERROR/stderr: Address already in use
[2017-06-01 15:00:39,635] f810e3c012e8/ERROR/stderr:

Though manually locust launch via web-page works fine with same docker-compose file except --host option at slaves start.


четверг, 1 июня 2017 г., 15:25:16 UTC+5 пользователь Andrey Pokhilko написал:
Reply all
Reply to author
Forward
Message has been deleted
0 new messages