myzhan / locust4j

Locust4j is a load generator for locust, written in Java.
MIT License
81 stars 30 forks source link

Locast throw Unhandled exception on master node during slave connection #27

Closed ocherniavskyi-lohika-tix closed 3 years ago

ocherniavskyi-lohika-tix commented 3 years ago

Got:

Unhandled exception in greenlet: <Greenlet at 0x7fccc01e47b0: <bound method MasterRunner.client_listener of <locust.runners.MasterRunner object at 0x7fccc01c6a90>>>
Traceback (most recent call last):
  File "src/gevent/greenlet.py", line 854, in gevent._gevent_cgreenlet.Greenlet.run
  File "/home/alexche/.local/lib/python3.8/site-packages/locust/runners.py", line 627, in client_listener
    client_id, msg = self.server.recv_from_client()
  File "/home/alexche/.local/lib/python3.8/site-packages/locust/rpc/zmqrpc.py", line 45, in recv_from_client
    msg = Message.unserialize(data[1])
  File "/home/alexche/.local/lib/python3.8/site-packages/locust/rpc/protocol.py", line 18, in unserialize
    msg = cls(*msgpack.loads(data, raw=False, strict_map_key=False))
  File "msgpack/_unpacker.pyx", line 161, in msgpack._unpacker.unpackb
TypeError: unpackb() got an unexpected keyword argument 'strict_map_key'

when locust4j client connects to master

master starts using: locust -f /src/main/resources/locust-master.py --run-time=20m --headless -u 1 -r 1 --master

slave start with:

val locust = Locust.getInstance()
    locust.setMasterHost("127.0.0.1");
    locust.setMasterPort(5557)
    locust.setMaxRPS(2)
    locust.run(RdScenario())

with scenario:

class RdScenario(private val profile: EnvironmentProfile) : AbstractTask() {
    override fun getWeight() = 1

    override fun getName() = "Some name"

    override fun execute() {
    }
}

locust version 1.4.1 locust4j version 1.0.12

myzhan commented 3 years ago

Can't reproduce, which version of msgpack in Python are you using? Try to update msgpack to 1.0.0.

ocherniavskyi-lohika-tix commented 3 years ago

pip list showing python 3.8 msgpack 1.0.0 msgpack-python 0.5.6

myzhan commented 3 years ago

@ocherniavskyi-lohika-tix can you remove msgpack-python 0.5.6 and try again?

ocherniavskyi-lohika-tix commented 3 years ago

@myzhan sorry, new venv solve the problem.