Locust is not starting with pyzmq 23.0.0
See original GitHub issueDescribe the bug
With latest ZMQ release (23.0.0) Locust stopped working - following error appears on Master:
locust-master: File "/root/.local/share/virtualenvs/locust-1T7N9san/bin/locust", line 8, in <module>
locust-master: sys.exit(main())
locust-master: File "/root/.local/share/virtualenvs/locust-1T7N9san/lib/python3.9/site-packages/locust/main.py", line 230, in main
locust-master: runner = environment.create_master_runner(
locust-master: File "/root/.local/share/virtualenvs/locust-1T7N9san/lib/python3.9/site-packages/locust/env.py", line 138, in create_master_runner
locust-master: return self._create_runner(
locust-master: File "/root/.local/share/virtualenvs/locust-1T7N9san/lib/python3.9/site-packages/locust/env.py", line 116, in _create_runner
locust-master: self.runner = runner_class(self, *args, **kwargs)
locust-master: File "/root/.local/share/virtualenvs/locust-1T7N9san/lib/python3.9/site-packages/locust/runners.py", line 619, in __init__
locust-master: self.server = rpc.Server(master_bind_host, master_bind_port)
locust-master: File "/root/.local/share/virtualenvs/locust-1T7N9san/lib/python3.9/site-packages/locust/rpc/zmqrpc.py", line 58, in __init__
locust-master: BaseSocket.__init__(self, zmq.ROUTER)
locust-master: AttributeError: module 'zmq.green' has no attribute 'ROUTER'
and similar on worker:
locust-worker_four: Traceback (most recent call last):
locust-worker_four: File "/root/.local/share/virtualenvs/locust-1T7N9san/bin/locust", line 8, in <module>
locust-worker_four: sys.exit(main())
locust-worker_four: File "/root/.local/share/virtualenvs/locust-1T7N9san/lib/python3.9/site-packages/locust/main.py", line 236, in main
locust-worker_four: runner = environment.create_worker_runner(options.master_host, options.master_port)
locust-worker_four: File "/root/.local/share/virtualenvs/locust-1T7N9san/lib/python3.9/site-packages/locust/env.py", line 154, in create_worker_runner
locust-worker_four: return self._create_runner(
locust-worker_four: File "/root/.local/share/virtualenvs/locust-1T7N9san/lib/python3.9/site-packages/locust/env.py", line 116, in _create_runner
locust-worker_four: self.runner = runner_class(self, *args, **kwargs)
locust-worker_four: File "/root/.local/share/virtualenvs/locust-1T7N9san/lib/python3.9/site-packages/locust/runners.py", line 1051, in __init__
locust-worker_four: self.client = rpc.Client(master_host, master_port, self.client_id)
locust-worker_four: File "/root/.local/share/virtualenvs/locust-1T7N9san/lib/python3.9/site-packages/locust/rpc/zmqrpc.py", line 71, in __init__
locust-worker_four: BaseSocket.__init__(self, zmq.DEALER)
locust-worker_four: AttributeError: module 'zmq.green' has no attribute 'DEALER'
Expected behavior
Actual behavior
Steps to reproduce
Install Locust with inclusion of latest ZMQ release - start master o start worker
Environment
- OS: CentOS
- Python version: 3.9
- Locust version: 2.8.4
- Locust command line that you ran:
- Locust file contents (anonymized if necessary):
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:5
Top Results From Across the Web
ERROR: Failed building wheel for gevent when installing Locust
I found the solution to this issue, the gevent 22.10.1 is just released yesterday (Released: Oct 15, 2022) causes the problem.
Read more >Installation — Locust 0.6.1 documentation
When Locust is installed, a locust command should be available in your shell (if you're not using virtualenv - which you should -...
Read more >pyzmq · PyPI
PyZMQ releases ≤ 2.2.0 matched libzmq versioning, but this is no longer the case, starting with PyZMQ 13.0.0 (it was the thirteenth release,...
Read more >https://raw.githubusercontent.com/locustio/locust/...
... Locust is not starting with pyzmq 23.0.0 [\#2099](https://github.com/locustio/locust/issues/2099) - Users with `fixed_count` not being relocated after ...
Read more >locust changelog - Awesome Python | LibHunt
Editing a running test in the Web UI with class-picker restarts user count ... Locust is not starting with pyzmq 23.0.0 #2099; Users...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Quick and Dirt fix for version 2.4.3 marcosborges/terraform-aws-loadtest-distribuited if don’t wish to update to Locust 2.9.0
file: locust.entrypoint.leader.full.sh.tpl
file: locust.entrypoint.node.full.sh.tpl
This is also causing issues with my application when run in a Master / Worker mode. Needed to pin 22.3.0 to resolve it. The issue seems to be with pyzmq v.23.0.0