vernemq / vmq_mzbench

An MQTT loadtest and usage scenario tool for VerneMQ and other MQTT systems.
Apache License 2.0
42 stars 44 forks source link

Unable to use mqtt_worker #34

Open akefirad opened 5 years ago

akefirad commented 5 years ago

I'm trying to use the simple scenario in mzbench docker container. After a lot of troubleshooting (mostly installing missing dependencies to build the source) I managed to install/build the worker. But when I try to run the sample scenario given in the blog, it fails with the following log:

15:52:57.833 [warning] [Undefined] <0.30.0> lager_error_logger_h dropped 10 messages in the last second that exceeded the limit of 50 messages/sec
--
15:52:57.833 [error] [Undefined] <0.36.0> Loading of /root/.local/share/mzbench_workers/mqtt_worker/ebin/mqtt_worker.beam failed: badfile
15:52:57.833 [error] [Undefined] emulator beam/beam_load.c(1277): Error loading module mqtt_worker:   mandatory chunk of type 'Atom' not found
15:52:57.835 [error] [Undefined] <0.36.0> Loading of /root/.local/share/mzbench_workers/mqtt_worker/ebin/mqtt_worker.beam failed: badfile
15:52:57.836 [error] [Undefined] emulator beam/beam_load.c(1277): Error loading module mqtt_worker:   mandatory chunk of type 'Atom' not found
15:52:57.837 [error] [Undefined] <0.241.0> gen_server <0.241.0> terminated with reason: no try clause matching {{error,{noproc,{gen_server,call,[mzb_metrics,get_metrics]}}}} in mzb_management_tcp_protocol:dispatch/2 line 33
15:52:57.840 [error] [Undefined] <0.241.0> CRASH REPORT Process <0.241.0> with 0 neighbours exited with reason: no try clause matching {{error,{noproc,{gen_server,call,[mzb_metrics,get_metrics]}}}} in mzb_management_tcp_protocol:dispatch/2 line 33 in gen_server:terminate/7 line 812
15:52:57.840 [error] [Undefined] <0.241.0> Ranch listener management_tcp_server terminated with reason: no try clause matching {{error,{noproc,{gen_server,call,[mzb_metrics,get_metrics]}}}} in mzb_management_tcp_protocol:dispatch/2 line 33
ioolkos commented 5 years ago

So you managed to compile, with OTP 20.3, I suppose. The badfile BEAM error is clearly an indication that the mqtt_worker files are compiled with a newer OTP version. Can you try deleting all mqtt_worker related .beam files?

akefirad commented 5 years ago

No I couldn't do it on Ubuntu 18.04. What I did was to try to test vmq_mzbench on the official docker image. But it kept failing due to a lot of missing dependencies (git, make, escript, etc) After installing everything (including OTP 20.3) it failed with the given error :disappointed: I also set up a virtual machine with Ubuntu 16.04 + OTP 20.3 (which you confirmed it's working) and managed to build mzbench from source. But when I tried to run the vmq_mzbench sample scenario it failed with "director_connection_down" (something similar to this issue, but it's still open) Do you have any idea how to solve it?