Locust Worker节点无法连接Master节点偶发问题求助
问题现象
- 启动Locust Worker节点时无法正常工作,Worker节点无法连接到Master节点
- 问题为偶发情况
启动Master节点的命令及日志:
$ locust -f /path/to/a.py --config=config/master.conf [2022-10-25 17:56:34,618] PC-0003395.local/INFO/locust.main: Starting web interface at http://0.0.0.0:8089 (accepting connections from all network interfaces) [2022-10-25 17:56:34,623] PC-0003395.local/INFO/locust.main: Starting Locust 2.12.2
启动Worker节点的命令及日志:
$ locust -f /path/to/a.py --config=config/worker.conf [2022-10-25 17:56:59,326] PC-0003395.local/WARNING/locust.runners: Failed to connect to master 127.0.0.1:5557, retry 3/60. [2022-10-25 17:57:04,331] PC-0003395.local/WARNING/locust.runners: Failed to connect to master 127.0.0.1:5557, retry 4/60. [2022-10-25 17:57:09,334] PC-0003395.local/WARNING/locust.runners: Failed to connect to master 127.0.0.1:5557, retry 5/60.
使用的配置文件:
- master.conf
headless = false master = true expect-workers = 1 host = SOME_HOST users = 1 spawn-rate = 1 run-time = 1m
- worker.conf
headless = false worker = true master-host = 127.0.0.1
环境信息
- 操作系统:macOS Monterey version 12.4
- CPU:M1
- Python/Locust版本:
locust 2.12.2 from /opt/homebrew/Cellar/locust/2.12.2/libexec/lib/python3.10/site-packages/locust (python 3.10.8)
目前仅能通过重启Mac解决该问题,求其他可行修复方法。
内容的提问来源于stack exchange,提问作者Kohei Yasan
相关产品推荐
相关产品推荐

