Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distributed command line cannot run #1458

Closed
MarcSteven opened this issue Jul 1, 2020 · 7 comments
Closed

Distributed command line cannot run #1458

MarcSteven opened this issue Jul 1, 2020 · 7 comments

Comments

@MarcSteven
Copy link

MarcSteven commented Jul 1, 2020

Describe the bug

I use the command to run but cannot start a swarming. Please like the picture
locust -f load.py --master[2020-07-01 16:03:38,423] Marcs-MacBook-Pro.local/ERROR/stderr: Traceback (most recent call last):
[2020-07-01 16:03:38,423] Marcs-MacBook-Pro.local/ERROR/stderr: File "/Users/user/PycharmProjects/APILoadTest/venv/bin/locust", line 10, in
[2020-07-01 16:03:38,423] Marcs-MacBook-Pro.local/ERROR/stderr:
[2020-07-01 16:03:38,423] Marcs-MacBook-Pro.local/ERROR/stderr: sys.exit(main())
[2020-07-01 16:03:38,423] Marcs-MacBook-Pro.local/ERROR/stderr:
[2020-07-01 16:03:38,423] Marcs-MacBook-Pro.local/ERROR/stderr: File "/Users/user/PycharmProjects/APILoadTest/venv/lib/python3.8/site-packages/locust/main.py", line 495, in main
[2020-07-01 16:03:38,424] Marcs-MacBook-Pro.local/ERROR/stderr:
[2020-07-01 16:03:38,424] Marcs-MacBook-Pro.local/ERROR/stderr: runners.locust_runner = MasterLocustRunner(locust_classes, options)
[2020-07-01 16:03:38,424] Marcs-MacBook-Pro.local/ERROR/stderr:
[2020-07-01 16:03:38,424] Marcs-MacBook-Pro.local/ERROR/stderr: File "/Users/user/PycharmProjects/APILoadTest/venv/lib/python3.8/site-packages/locust/runners.py", line 346, in init
[2020-07-01 16:03:38,425] Marcs-MacBook-Pro.local/ERROR/stderr:
[2020-07-01 16:03:38,425] Marcs-MacBook-Pro.local/ERROR/stderr: self.server = rpc.Server(self.master_bind_host, self.master_bind_port)
[2020-07-01 16:03:38,425] Marcs-MacBook-Pro.local/ERROR/stderr:
[2020-07-01 16:03:38,425] Marcs-MacBook-Pro.local/ERROR/stderr: File "/Users/user/PycharmProjects/APILoadTest/venv/lib/python3.8/site-packages/locust/rpc/zmqrpc.py", line 41, in init
[2020-07-01 16:03:38,426] Marcs-MacBook-Pro.local/ERROR/stderr:
[2020-07-01 16:03:38,426] Marcs-MacBook-Pro.local/ERROR/stderr: self.socket.bind("tcp://%s:%i" % (host, port))
[2020-07-01 16:03:38,426] Marcs-MacBook-Pro.local/ERROR/stderr:
[2020-07-01 16:03:38,426] Marcs-MacBook-Pro.local/ERROR/stderr: File "zmq/backend/cython/socket.pyx", line 550, in zmq.backend.cython.socket.Socket.bind
[2020-07-01 16:03:38,426] Marcs-MacBook-Pro.local/ERROR/stderr: File "zmq/backend/cython/checkrc.pxd", line 26, in zmq.backend.cython.checkrc._check_rc
[2020-07-01 16:03:38,426] Marcs-MacBook-Pro.local/ERROR/stderr: zmq.error
[2020-07-01 16:03:38,426] Marcs-MacBook-Pro.local/ERROR/stderr: .
[2020-07-01 16:03:38,426] Marcs-MacBook-Pro.local/ERROR/stderr: ZMQError
[2020-07-01 16:03:38,426] Marcs-MacBook-Pro.local/ERROR/stderr: :
[2020-07-01 16:03:38,426] Marcs-MacBook-Pro.local/ERROR/stderr: Address already in use
[2020-07-01 16:03:38,426] Marcs-MacBook-Pro.local/ERROR/stderr:
`

Expected behavior

Hope it can run well

Actual behavior

Cannot start swarming even though click the button of starting a swarming, it cannot go
截屏2020-07-01 下午3 22 40

Steps to reproduce

Environment

  • OS: Mac OS
  • Python version:3.8
  • Locust version:2.4
  • Locust command line that you ran: locust -f YouthBombAPI.py --slave
  • Locust file contents (anonymized if necessary):
@MarcSteven MarcSteven added the bug label Jul 1, 2020
@cyberw
Copy link
Collaborator

cyberw commented Jul 1, 2020

Locust version:2.4

This version does not exist. What is the output of locust -V

@MarcSteven
Copy link
Author

locust1.1
@cyberw

@cyberw
Copy link
Collaborator

cyberw commented Jul 2, 2020

Do you have another instance of locust running? Address already in use would suggest the port the master uses to communicate with slaves is busy.

@MarcSteven
Copy link
Author

Nope, I closed all the instance

@cyberw
Copy link
Collaborator

cyberw commented Jul 2, 2020

Check for any left over python processes. Something must be using that port. Restart your machine if nothing else helps :)

@MarcSteven
Copy link
Author

Yeah, right, restart it and then it disappeared.

@cyberw cyberw added the invalid label Jul 7, 2020
@cyberw
Copy link
Collaborator

cyberw commented Jul 7, 2020

I have tried to improve the logging in #1471

@cyberw cyberw closed this as completed Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants