Git Product home page Git Product logo

vmq_mzbench's Introduction

VerneMQ: A Distributed MQTT Broker

Build and Smoketest Status Documentation Maintenance GitHub Release Date GitHub last commit Twitter: VerneMQ VerneMQ on Fosstodon

Google group : VerneMQ Users

Old Docker Repo New Docker Repo
Docker Pulls from Old Repo Docker Pulls from New Repo

New: VerneMQ can now use Github Discussions! To join the discussion on features and roadmap, and be part of the VerneMQ Community Team on Github, send us your Github username for an invite! (on Twitter, Slack etc.)

Make sure to visit the new VerneMQ Forum hosted on Erlang Forums. We're happy to discuss any of your questions and ideas around VerneMQ on the Forum too!


VerneMQ is known to be deployed and used in: ๐Ÿ‡บ๐Ÿ‡ธ ๐Ÿ‡จ๐Ÿ‡ฆ ๐Ÿ‡ง๐Ÿ‡ท ๐Ÿ‡ฒ๐Ÿ‡ฝ ๐Ÿ‡ฉ๐Ÿ‡ช ๐Ÿ‡ซ๐Ÿ‡ท ๐Ÿ‡จ๐Ÿ‡ญ ๐Ÿ‡ฉ๐Ÿ‡ฐ ๐Ÿ‡ณ๐Ÿ‡ฑ ๐Ÿ‡ง๐Ÿ‡ช ๐Ÿ‡ฎ๐Ÿ‡น ๐Ÿ‡ช๐Ÿ‡ธ ๐Ÿ‡ท๐Ÿ‡ด ๐Ÿ‡ต๐Ÿ‡น ๐Ÿ‡ท๐Ÿ‡บ ๐Ÿ‡ฑ๐Ÿ‡น ๐Ÿ‡จ๐Ÿ‡ฟ ๐Ÿ‡ธ๐Ÿ‡ฐ ๐Ÿ‡ฆ๐Ÿ‡น ๐Ÿ‡ต๐Ÿ‡ฑ ๐Ÿ‡ณ๐Ÿ‡ด ๐Ÿ‡ธ๐Ÿ‡ช ๐Ÿ‡ฎ๐Ÿ‡ณ ๐Ÿ‡ฏ๐Ÿ‡ต ๐Ÿ‡ฎ๐Ÿ‡ฉ ๐Ÿ‡ป๐Ÿ‡ณ ๐Ÿ‡ฐ๐Ÿ‡ท ๐Ÿ‡ฟ๐Ÿ‡ฆ ๐Ÿ‡ฐ๐Ÿ‡ช ๐Ÿ‡ท๐Ÿ‡ธ ๐Ÿ‡ญ๐Ÿ‡ท ๐Ÿ‡ฌ๐Ÿ‡ท ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ‡บ๐Ÿ‡ฆ ๐Ÿ‡ฆ๐Ÿ‡บ ๐Ÿ‡ณ๐Ÿ‡ฟ ๐Ÿ‡จ๐Ÿ‡ณ ๐Ÿ‡ช๐Ÿ‡ฌ ๐Ÿ‡ซ๐Ÿ‡ฎ ๐Ÿ‡ญ๐Ÿ‡บ ๐Ÿ‡ฎ๐Ÿ‡ฑ ๐Ÿ‡ธ๐Ÿ‡ฌ ๐Ÿ‡ฑ๐Ÿ‡ง ๐Ÿ‡ต๐Ÿ‡ญ ๐Ÿ‡ต๐Ÿ‡ฐ ๐Ÿ‡ฒ๐Ÿ‡พ ๐Ÿ‡น๐Ÿ‡ท ๐Ÿ‡น๐Ÿ‡ผ ๐Ÿ‡ฎ๐Ÿ‡ท โ˜๏ธ


VerneMQ Logo

VerneMQ is a high-performance, distributed MQTT message broker. It scales horizontally and vertically on commodity hardware to support a high number of concurrent publishers and consumers while maintaining low latency and fault tolerance. VerneMQ is the reliable message hub for your IoT platform or smart products.

VerneMQ is an Apache2 licensed distributed MQTT broker, developed in Erlang.

MQTT used to stand for MQ Telemetry Transport, but it no longer is an acronym. It is an extremely simple and lightweight publish/subscribe messaging protocol, that was invented at IBM and Arcom (now Eurotech) to connect restricted devices in low bandwidth, high-latency or unreliable networks.

VerneMQ implements the MQTT 3.1, 3.1.1 and 5.0 specifications. Currently the following features are implemented and delivered as part of VerneMQ:

  • QoS 0, QoS 1, QoS 2
  • Basic Authentication and Authorization
  • Bridge Support
  • $SYS Tree for monitoring and reporting
  • TLS (SSL) Encryption
  • Websockets Support
  • Cluster Support
  • Logging (Console, Files, Syslog)
  • Reporting to Graphite
  • Extensible Plugin architecture
  • Multiple Sessions per ClientId
  • Session Balancing
  • Shared subscriptions
  • Message load regulation
  • Message load shedding (for system protection)
  • Offline Message Storage (based on LevelDB)
  • Queue can handle messages FIFO or LIFO style.
  • MongoDB auth & integration
  • Redis auth & integration
  • MySQL auth & integration
  • PostgreSQL auth & integration
  • CockroachDB auth & integration
  • Memcached integration
  • HTTP Webhooks
  • PROXY Protocol v2
  • Administration HTTP API
  • Real-time MQTT session tracing
  • Full multitenancy
  • Cluster status web page

The following features are also applies to MQTT 5.0 clients:

  • Enhanced authentication schemes (AUTH)
  • Message expiration
  • Last Will and Testament delay
  • Shared subscriptions
  • Request/response flow
  • Topic aliases
  • Flow control
  • Subscription flags (Retain as Published, No Local, Retain Handling)
  • Subscriber identifiers
  • All property types are supported: user properties, reason strings, content types etc.

Commercial Support. Binary Packages. Documentation

Below you'll find a basic introduction to building and starting VerneMQ. For more information about the binary package installation, configuration, and administration of VerneMQ, please visit our documentation at VerneMQ Documentation or checkout the product page VerneMQ if you require more information on the available commercial support options.

Community Release Schedule

Next major release: not yet scheduled.

Minor releases: At the end of March, July and November (every 4th month).

Bugfix releases: Usually a bugfix release is released between minor releases or if there's an urgent bugfix pending.

Custom release cycles and releases are available for commercial users.

Quick Start

This section assumes that you have a copy of the VerneMQ source tree. To get started, you need to first build VerneMQ.

Building VerneMQ

Note: VerneMQ requires Erlang/OTP 24-25 and libsnappy-dev installed in your system. You'll also need a C compiler for Eleveldb. (on Debian, you install build-essential, as an example).

Assuming you have a working Erlang installation, building VerneMQ should be as simple as:

$ cd $VERNEMQ
$ make rel

Starting VerneMQ

Once you've successfully built VerneMQ, you can start the server with the following commands:

$ cd $VERNEMQ/_build/default/rel/vernemq
$ bin/vernemq start

If VerneMQ is running it is possible to check the status on http://localhost:8888/status and it should look something like:

Note that the $VERNEMQ/_build/default/rel/vernemq directory is a complete, self-contained instance of VerneMQ and Erlang. It is strongly suggested that you move this directory outside the source tree if you plan to run a production instance.

Important links

Thank you to all our contributors!

contributors

vmq_mzbench's People

Contributors

akefirad avatar blokovi avatar cmnstmntmn avatar eckucukoglu avatar gdhgdhgdh avatar ioolkos avatar larshesel avatar mainro avatar p3we avatar parsifal-47 avatar rodneyosodo avatar urjitbhatia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

vmq_mzbench's Issues

mqtt.message.consumed.total is very low compared to published messages

Hi @ioolkos ,
Please consider this as a clarification rather than an issue. I really wonder whether this is a bug in our vernemq broker or i need to make any changes in my scenario , which is given below.

mqtt.message.consumed.total is 2278 whereas i published 30000 messages in mqtt.message.published.total

`make_install(git = "https://github.com/erlio/vmq_mzbench.git",
branch = "master")

defaults("pool_size" = 100)

pool(size = 1,
worker_type = mqtt_worker,
worker_start = linear(100 rps)):

        connect([t(host, "dev.broker.nucleus.cantiz.com"),
                t(port,1883),
                t(client,"MQTT-Dev"),
                t(clean_session,true),
                t(keepalive_interval,60),
                t(proto_version,4), t(reconnect_timeout,4)
                ])

        wait(1 sec)
        subscribe("nucleus-event-topic-dev/#", 1)

pool(size = numvar("pool_size"),
worker_type = mqtt_worker,
worker_start = linear(100 rps)):

        connect([t(host, "dev.broker.nucleus.cantiz.com"),
                t(port,1883),
                t(client,fixed_client_id("pool1", worker_id())),
                t(clean_session,true),
                t(keepalive_interval,60),
                t(proto_version,4), t(reconnect_timeout,4)
                ])

        set_signal(connect1, 1)
        wait_signal(connect1, 100)
        wait(4 sec)
        loop(time = 5 min, rate = 1 rps):
            publish_to_self("nucleus-event-topic-dev/", random_string(200), 1)
        disconnect()`

Also i am confused about term mqtt.publisher.qos1.puback.in.total which is 29837
Didnt get detail about above value from https://satori-com.github.io/mzbench/dashboard/ as well

image

Syntax error on fan_out.bdl scenario

Hi,

I want to point there is a syntax error on fan_out.bdl scenario:
line 18 woker_start = poisson(1000 rps)):
should be
worker_start=poisson(1000 rps)):

There is a missing r, that makes that all clients connect at same time.

Not able to start MZBENCH server

While starting the MZBENCH server I'm getting error on missing of erl_terms,docopt and requires libraries..But these libraries are already installed.
Im working on Mac OS and my pip version is PIP 9.0.1

screen shot 2018-03-14 at 7 30 38 pm

How to run vmq_mzbench ?

I have installed mzbench and vmq_mzbench , I start mzbench first ,then I just copy vmq_mzbench/sample.scenario to mzbench/examples/mqtt.erl , Then I excute command ' ./bin/mzbench run examples/mqtt.erl ' , but nothing happened , I got the log: 06:16:24.919 [info] [ API ] <0.253.0> Node repo: {git_install_spec,
"https://github.com/machinezone/mzbench.git",
"c5705ba5b73cec07522faa77a2f45d8d50ae7171",
"node",[]}
06:16:24.920 [info] [ API ] <0.253.0> Stage 'pipeline - init': started
06:16:24.921 [info] [ API ] <0.257.0> Starting benchmark at 1461305784 #{benchmark_name => "mqtt.erl",
cloud => undefined,
deallocate_after_bench => true,
director_host => undefined,
emulate_bench_crash => false,
env => [{<<"mzb_script_name">>,
<<"mqtt.erl">>}],
exclusive_node_usage => true,
id => 0,
initial_user => "root",
log_compression => deflate,
log_file => "log.txt",
metric_update_interval_ms => 10000,
metrics_compression => none,
metrics_file => "metrics_~s.txt",
node_install_spec => {git_install_spec,"https://github.com/machinezone/mzbench.git",
"c5705ba5b73cec07522faa77a2f45d8d50ae7171",
"node",
[]},
node_log_port => 4801,
node_management_port => 4802,
nodes_arg => 1,
provision_nodes => true,
purpose => "bench-0-1461305784",
req_host => <<"localhost:4800">>,
script => #{body => <<"%% Here's a stupid, quick example to give you an idea.\n%% Paste this to the scenario field in MZBench web frontend and\n%% run it.\n\n[\n{make_install, [{rsync, "/root/vernemq/vmq_mzbench"},\n{exclude, "deps"}]},\n\n{pool, [{size, {numvar, "publisher-number", 10000}},\n {worker_type, mqtt_worker},\n {worker_start, {linear, {{numvar, "publisher-rps", 20}, rps}}}\n], \n[\n {connect, [{t, host, "172.16.38.164"},\n {t, port, 1883},\n {t, client, {random_client_id, 18}},\n {t, clean_session, false},\n {t, keepalive_interval, 60}]},\n{wait, {5, sec}},\n\n{loop, [\n {time, {30, sec}},\n {rate, {2, rps}}\n],\n[\n{publish, "testtopic", <<"hello from vmq_mzbench">>, 0}\n]}]},\n\n{pool, [{size, 1},\n{worker_type, mqtt_worker}], [\n{connect, [{t, host, "172.16.38.164"},\n\t{t, port, 1883},\n\t{t, client, "sub2"},\n\t{t, clean_session, true},\n\t{t, keepalive_interval, 60}\n]},\n{wait, {1, sec}},\n{subscribe, "testtopic", 0}\n]}\n].\n">>,
filename => "E365C8742D2375E3CB10AE7B78DD4362F1D6499.erl",
name => "mqtt.erl"},
vm_args => [],
worker_hosts => []}
06:16:24.925 [info] [ API ] <0.253.0> Stage 'pipeline - init': finished
06:16:24.925 [info] [ API ] <0.253.0> Stage 'pipeline - checking_script': started
06:16:24.967 [info] [ API ] <0.253.0> Stage 'pipeline - checking_script': finished
06:16:24.967 [info] [ API ] <0.253.0> Stage 'pipeline - allocating_hosts': started
06:16:24.968 [info] [ API ] <0.261.0> Allocating 2 hosts in undefined cloud...
06:16:24.968 [info] [ API ] <0.261.0> Allocated hosts: [undefined] @ ["localhost"]
06:16:24.969 [info] [ API ] <0.253.0> Stage 'pipeline - allocating_hosts': finished
06:16:24.969 [info] [ API ] <0.253.0> Stage 'pipeline - provisioning': started
06:16:24.978 [info] [ API ] <0.262.0> Provisioning nodes: ["localhost"]
With config: #{benchmark_name => "mqtt.erl",
cloud => undefined,
deallocate_after_bench => true,
director_host => "localhost",
emulate_bench_crash => false,
env => [{<<"mzb_script_name">>,<<"mqtt.erl">>}],
exclusive_node_usage => true,
id => 0,
initial_user => "root",
log_compression => deflate,
log_file => "log.txt",
metric_update_interval_ms => 10000,
metrics_compression => none,
metrics_file => "metrics_~s.txt",
node_install_spec => {git_install_spec,"https://github.com/machinezone/mzbench.git",
"c5705ba5b73cec07522faa77a2f45d8d50ae7171",
"node",[]},
node_log_port => 4801,
node_management_port => 4802,
nodes_arg => 1,
provision_nodes => true,
purpose => "bench-0-1461305784",
req_host => <<"localhost:4800">>,
script => #{body => <<"%% Here's a stupid, quick example to give you an idea.\n%% Paste this to the scenario field in MZBench web frontend and\n%% run it.\n\n[\n{make_install, [{rsync, "/root/vernemq/vmq_mzbench"},\n{exclude, "deps"}]},\n\n{pool, [{size, {numvar, "publisher-number", 10000}},\n {worker_type, mqtt_worker},\n {worker_start, {linear, {{numvar, "publisher-rps", 20}, rps}}}\n], \n[\n {connect, [{t, host, "172.16.38.164"},\n {t, port, 1883},\n {t, client, {random_client_id, 18}},\n {t, clean_session, false},\n {t, keepalive_interval, 60}]},\n{wait, {5, sec}},\n\n{loop, [\n {time, {30, sec}},\n {rate, {2, rps}}\n],\n[\n{publish, "testtopic", <<"hello from vmq_mzbench">>, 0}\n]}]},\n\n{pool, [{size, 1},\n{worker_type, mqtt_worker}], [\n{connect, [{t, host, "172.16.38.164"},\n\t{t, port, 1883},\n\t{t, client, "sub2"},\n\t{t, clean_session, true},\n\t{t, keepalive_interval, 60}\n]},\n{wait, {1, sec}},\n{subscribe, "testtopic", 0}\n]}\n].\n">>,
filename => "E365C8742D2375E3CB10AE7B78DD4362F1D6499.erl",
name => "mqtt.erl"},
user_name => undefined,
vm_args => [],
worker_hosts => []}
06:16:24.979 [info] [ API ] <0.262.0> [ MKDIR ] /tmp/mz/bench-0-1461305784
06:16:24.980 [info] [ API ] <0.262.0> There's only one host, no need to make ntp check
06:16:24.980 [info] [ API ] <0.262.0> NTP check result: ok
06:16:24.988 [info] [ API ] <0.263.0> [ EXEC ] bash -c "export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin'; source /etc/profile;ps -ef | grep beam | grep -v grep | grep -v mzbench_api && ~/.local/share/mzbench/bin/mzbench stop; true " (<0.263.0>)
06:16:25.262 [info] [ API ] <0.263.0> [ EXEC ] OK in 273.912 ms (<0.263.0>)
06:16:25.266 [info] [ API ] <0.265.0> [ EXEC ] bash -c "export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin'; source /etc/profile;uname -sr " (<0.265.0>)
06:16:25.520 [info] [ API ] <0.265.0> [ EXEC ] OK in 253.692 ms (<0.265.0>)
06:16:25.521 [info] [ API ] <0.266.0> [ EXEC ] bash -c "export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin'; source /etc/profile;erl -noshell -eval 'io:fwrite("~s", [erlang:system_info(version)]).' -s erlang halt " (<0.266.0>)
06:16:26.391 [info] [ API ] <0.266.0> [ EXEC ] OK in 870.795 ms (<0.266.0>)
06:16:26.395 [info] [ API ] <0.262.0> Missing tarballs: [{"linux-3.10.0-229.el7.x86_64_erts-7.3",
"/root/.local/cache/mzbench_api/packages/node-c5705ba5b73cec07522faa77a2f45d8d50ae7171-linux-3.10.0-229.el7.x86_64_erts-7.3.tgz"}]
06:16:26.395 [info] [ API ] <0.267.0> Building package node on localhost
06:16:26.396 [info] [ API ] <0.268.0> [ EXEC ] bash -c "export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin'; source /etc/profile;mkdir -p /tmp/bench_mzbench_api_cs_ytch-web2_1461_305786_395878 && cd /tmp/bench_mzbench_api_cs_ytch-web2_1461_305786_395878 && git clone https://github.com/machinezone/mzbench.git deployment_code && cd deployment_code && git checkout c5705ba5b73cec07522faa77a2f45d8d50ae7171 && cd ./node && make generate_tgz && mv .tgz /tmp/bench_mzbench_api_cs_ytch-web2_1461_305786_395511.tgz " (<0.268.0>)
06:24:29.905 [info] [ API ] <0.268.0> [ EXEC ] OK in 483509.609 ms (<0.268.0>)
06:24:29.907 [info] [ API ] <0.267.0> Downloading package node from localhost
06:24:29.907 [info] [ API ] <0.267.0> [ COPY ] /root/.local/cache/mzbench_api/packages/node-c5705ba5b73cec07522faa77a2f45d8d50ae7171-linux-3.10.0-229.el7.x86_64_erts-7.3.tgz <- /tmp/bench_mzbench_api_cs_ytch-web2_1461_305786_395511.tgz
06:24:29.937 [info] [ API ] <0.445.0> [ EXEC ] bash -c "export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin'; source /etc/profile;mkdir -p /tmp/bench_mzbench_api_cs_ytch-web2_1461_305786_395576 && cd /tmp/bench_mzbench_api_cs_ytch-web2_1461_305786_395576 && tar xzf /tmp/bench_mzbench_api_cs_ytch-web2_1461_305786_395511.tgz " (<0.445.0>)
06:24:30.455 [info] [ API ] <0.445.0> [ EXEC ] OK in 517.022 ms (<0.445.0>)
06:24:30.455 [info] [ API ] <0.446.0> [ EXEC ] bash -c "export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin'; source /etc/profile;mkdir -p ~/.local/share && rsync -aW /tmp/bench_mzbench_api_cs_ytch-web2_1461_305786_395576/ ~/.local/share " (<0.446.0>)
06:24:31.559 [info] [ API ] <0.446.0> [ EXEC ] OK in 1103.804 ms (<0.446.0>)
06:24:31.560 [info] [ API ] <0.447.0> [ EXEC ] bash -c "export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin'; source /etc/profile;rm -rf /tmp/bench_mzbench_api_cs_ytch-web2_1461_305786_395511.tgz; rm -rf /tmp/bench_mzbench_api_cs_ytch-web2_1461_305786_395576; true " (<0.447.0>)
06:24:31.876 [info] [ API ] <0.447.0> [ EXEC ] OK in 316.419 ms (<0.447.0>)
06:24:31.883 [info] [ API ] <0.449.0> [ EXEC ] bash -c "export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin'; source /etc/profile;uname -sr " (<0.449.0>)
06:24:32.136 [info] [ API ] <0.449.0> [ EXEC ] OK in 252.766 ms (<0.449.0>)
06:24:32.136 [info] [ API ] <0.450.0> [ EXEC ] bash -c "export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin'; source /etc/profile;erl -noshell -eval 'io:fwrite("~s", [erlang:system_info(version)]).' -s erlang halt " (<0.450.0>)
06:24:33.006 [info] [ API ] <0.450.0> [ EXEC ] OK in 869.997 ms (<0.450.0>)
06:24:33.007 [info] [ API ] <0.262.0> Missing tarballs: [{"linux-3.10.0-229.el7.x86_64_erts-7.3",
"/root/.local/cache/mzbench_api/packages/vmq_mzbench-1461.306271.883036-linux-3.10.0-229.el7.x86_64_erts-7.3.tgz"}]
06:24:33.008 [info] [ API ] <0.452.0> Building package vmq_mzbench on localhost
06:24:33.008 [info] [ API ] <0.453.0> [ EXEC ] bash -c "export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin'; source /etc/profile;mkdir -p /tmp/bench_mzbench_api_cs_ytch-web2_1461_306273_8274 && cd /tmp/bench_mzbench_api_cs_ytch-web2_1461_306273_8274 && rsync -aW /root/vernemq/vmq_mzbench deployment_code && cd deployment_code/ && make generate_tgz && mv *.tgz /tmp/bench_mzbench_api_cs_ytch-web2_1461_306273_7947.tgz " (<0.453.0>)
06:24:33.412 [error] [ API ] <0.453.0> [ EXEC ] Command execution failed in 403.987 ms
Cmd: bash -c "export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin'; source /etc/profile;mkdir -p /tmp/bench_mzbench_api_cs_ytch-web2_1461_306273_8274 && cd /tmp/bench_mzbench_api_cs_ytch-web2_1461_306273_8274 && rsync -aW /root/vernemq/vmq_mzbench deployment_code && cd deployment_code/ && make generate_tgz && mv *.tgz /tmp/bench_mzbench_api_cs_ytch-web2_1461_306273_7947.tgz "
Exit code: 2
Output: make: *
* No rule to make target `generate_tgz'. Stop.

06:24:33.413 [info] [ API ] <0.454.0> [ EXEC ] bash -c "export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin'; source /etc/profile;rm -rf /tmp/bench_mzbench_api_cs_ytch-web2_1461_306273_7947.tgz; rm -rf /tmp/bench_mzbench_api_cs_ytch-web2_1461_306273_8011; true " (<0.454.0>)
06:24:33.670 [info] [ API ] <0.454.0> [ EXEC ] OK in 257.413 ms (<0.454.0>)
06:24:33.671 [error] [ API ] <0.253.0> Stage 'pipeline - provisioning': failed
Command returned 2:
bash -c "export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin'; source /etc/profile;mkdir -p /tmp/bench_mzbench_api_cs_ytch-web2_1461_306273_8274 && cd /tmp/bench_mzbench_api_cs_ytch-web2_1461_306273_8274 && rsync -aW /root/vernemq/vmq_mzbench deployment_code && cd deployment_code/ && make generate_tgz && mv .tgz /tmp/bench_mzbench_api_cs_ytch-web2_1461_306273_7947.tgz "
Command output: make: *
* No rule to make target `generate_tgz'. Stop.

06:24:33.672 [info] [ API ] <0.253.0> Bench final: failed
06:24:33.672 [info] [ API ] <0.253.0> Stage 'finalize - saving_bench_results': started
06:24:33.673 [info] [ API ] <0.253.0> Stage 'finalize - saving_bench_results': finished
06:24:33.673 [info] [ API ] <0.253.0> Stage 'finalize - sending_email_report': started
06:24:33.688 [info] [ API ] <0.253.0> Stage 'finalize - sending_email_report': finished
06:24:33.688 [info] [ API ] <0.253.0> Stage 'finalize - stopping_collectors': started
06:24:33.688 [info] [ API ] <0.253.0> Stage 'finalize - stopping_collectors': finished
06:24:33.688 [info] [ API ] <0.253.0> Stage 'finalize - cleaning_nodes': started
06:24:33.689 [info] [ API ] <0.459.0> [ EXEC ] bash -c "export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin'; source /etc/profile;cd /tmp/mz/bench-0-1461305784; ~/.local/share/mzbench/bin/mzbench stop; true " (<0.459.0>)
06:24:35.269 [info] [ API ] <0.459.0> [ EXEC ] OK in 1579.866 ms (<0.459.0>)
06:24:35.269 [info] [ API ] <0.460.0> [ EXEC ] bash -c "export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin'; source /etc/profile;rm -rf /tmp/mz/bench-0-1461305784 " (<0.460.0>)
06:24:35.524 [info] [ API ] <0.460.0> [ EXEC ] OK in 255.056 ms (<0.460.0>)
06:24:35.525 [info] [ API ] <0.253.0> Stage 'finalize - cleaning_nodes': finished
06:24:35.525 [info] [ API ] <0.253.0> Stage 'finalize - deallocating_hosts': started
06:24:35.525 [info] [ API ] <0.461.0> Deallocator has started
06:24:35.525 [info] [ API ] <0.253.0> Stage 'finalize - deallocating_hosts': finished

how should I do to run the vmq_mzbench๏ผŸ

Resolution for mqtt.message.pub_to_sub.latency.*

Hello,

After working with mzbench + vmq_mzbench for a while, I noticed that the resolution for mqtt.message.pub_to_sub.latency.50, mqtt.message.pub_to_sub.latency.90, mqtt.message.pub_to_sub.latency.99, mqtt.message.pub_to_sub.latency.999 and mqtt.message.pub_to_sub.latency.mean is reduced due to the fact of using an exponential notation to save the data (e.g. 1.23e4). Is that something that we can configure? otherwise I think it would be a good improvement to save those values with as much resolution as possible.

Thanks in advance for your attention/help!

why I got this error with Mzbench loadtest VerneMQ on my mac

I run Mzbench with docker

06:22:26.399 [error] [ API ] <0.1566.0> [ REMOTE EXEC ] Command execution failed:
Cmd: bash -c -l "export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'; mkdir -p /tmp/bench_mzbench_api_38e317a3ee43_1508_221346_107204 && cd /tmp/bench_mzbench_api_38e317a3ee43_1508_221346_107204 && rsync -aW /Users/wangdong28/code/github/vmq_mzbench/ deployment_code && cd deployment_code/ && make generate_tgz && mv *.tgz /tmp/bench_mzbench_api_38e317a3ee43_1508_221346_107086.tgz "
Exit code: 23
Output: rsync: change_dir "/Users/wangdong28/code/github/vmq_mzbench" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1052) [sender=3.0.9]

06:22:26.565 [error] [ API ] <0.1553.0> Stage 'pipeline - provisioning': failed
Command returned 23:
bash -c -l "export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'; mkdir -p /tmp/bench_mzbench_api_38e317a3ee43_1508_221346_107204 && cd /tmp/bench_mzbench_api_38e317a3ee43_1508_221346_107204 && rsync -aW /Users/wangdong28/code/github/vmq_mzbench/ deployment_code && cd deployment_code/ && make generate_tgz && mv *.tgz /tmp/bench_mzbench_api_38e317a3ee43_1508_221346_107086.tgz "
Command output: rsync: change_dir "/Users/wangdong28/code/github/vmq_mzbench" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1052) [sender=3.0.9]

here is my scenario
#!benchDL

the simplest example

make_install(rsync = "/Users/wangdong28/code/github/vmq_mzbench/", exclude = "deps")

pool(size = 1,
worker_type = mqtt_worker):

        connect([t(host, "10.4.235.162"),
                t(port,1883),
                t(client,"subscriber1"),
                t(clean_session,true),
                t(keepalive_interval,60),
                t(proto_version,4), t(reconnect_timeout,4)
                ])
            
        wait(1 sec)
        subscribe("prefix/clients/#", 0)

pool(size = 1000,
worker_type = mqtt_worker,
worker_start = poisson(1000 rps)):

        connect([t(host, "10.4.235.162"),
                t(port,1883),
                t(client,fixed_client_id("pool1", worker_id())),
                t(clean_session,true),
                t(keepalive_interval,60),
                t(proto_version,4), t(reconnect_timeout,4)
                ])
                
        set_signal(connect1, 1)
        wait_signal(connect1, 1000)
        wait(4 sec)
        loop(time = 5 min, rate = 1 rps):
            publish_to_self("prefix/clients/", random_binary(150), 0)
        disconnect()

VerneMQ server generates a lot of errors and no results when testing fan_in.bdl

VMQ server is running locally on my Mac Book Pro, El-Capitan,
compiled from source.

I'm getting both system errors and user errors from the default BDL test fan_in.bdl:
System:

2:59:45.965 [error] [[email protected]] <0.266.0> [ "pool2" ] Received DOWN from worker <0.1938.0> with reason {{badmatch,{error,einval}},[{gen_emqtt,active_once,2,[{file,"src/gen_emqtt.erl"},{line,604}]},{gen_emqtt,connecting,2,[{file,"src/gen_emqtt.erl"},{line,180}]},{gen_fsm,handle_msg,8,[{file,"gen_fsm.erl"},{line,483}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}]}
--
22:59:45.967 [error] [[email protected]] <0.266.0> [ "pool2" ] Received DOWN from worker <0.1931.0> with reason {{badmatch,{error,einval}},[{gen_emqtt,active_once,2,[{file,"src/gen_emqtt.erl"},{line,604}]},{gen_emqtt,connecting,2,[{file,"src/gen_emqtt.erl"},{line,180}]},{gen_fsm,handle_msg,8,[{file,"gen_fsm.erl"},{line,483}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}]}
22:59:45.967 [error] [[email protected]] <0.266.0> [ "pool2" ] Received DOWN from worker <0.1939.0> with reason {{badmatch,{error,einval}},[{gen_emqtt,active_once,2,[{file,"src/gen_emqtt.erl"},{line,604}]},{gen_emqtt,connecting,2,[{file,"src/gen_emqtt.erl"},{line,180}]},{gen_fsm,handle_msg,8,[{file,"gen_fsm.erl"},{line,483}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}]}
22:59:45.967 [error] [[email protected]] <0.266.0> [ "pool2" ] Received DOWN from worker <0.1937.0> with reason {{badmatch,{error,einval}},[{gen_emqtt,active_once,2,[{file,"src/gen_emqtt.erl"},{line,604}]},{gen_emqtt,connecting,2,[{file,"src/gen_emqtt.erl"},{line,180}]},{gen_fsm,handle_msg,8,[{file,"gen_fsm.erl"},{line,483}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}]}

User Errors:

22:59:45.937 [error] [Undefined] <0.1932.0> gen_fsm <0.1932.0> in state connecting terminated with reason: no match of right hand value {error,einval} in gen_emqtt:active_once/2 line 604
--
22:59:45.937 [error] [Undefined] <0.1941.0> gen_fsm <0.1941.0> in state connecting terminated with reason: no match of right hand value {error,einval} in gen_emqtt:active_once/2 line 604
22:59:45.937 [error] [Undefined] <0.1942.0> gen_fsm <0.1942.0> in state connecting terminated with reason: no match of right hand value {error,einval} in gen_emqtt:active_once/2 line 604
22:59:45.937 [error] [Undefined] <0.1940.0> gen_fsm <0.1940.0> in state connecting terminated with reason: no match of right hand value {error,einval} in gen_emqtt:active_once/2 line 604
22:59:45.963 [error] [Undefined] <0.1941.0> CRASH REPORT Process <0.1941.0> with 1 neighbours exited with reason: no match of right hand value {error,einval} in gen_emqtt:active_once/2 line 604 in gen_fsm:terminate/7 line 602
22:59:45.963 [error] [Undefined] <0.1932.0> CRASH REPORT Process <0.1932.0> with 1 neighbours exited with reason: no match of right hand value {error,einval} in gen_emqtt:active_once/2 line 604 in gen_fsm:terminate/7 line 602
22:59:45.964 [error] [Undefined] <0.1942.0> CRASH REPORT Process <0.1942.0> with 1 neighbours exited with reason: no match of right hand value {error,einval} in gen_emqtt:active_once/2 line 604 in gen_fsm:terminate/7 line 602
22:59:45.965 [error] [Undefined] <0.1940.0> CRASH REPORT Process <0.1940.0> with 1 neighbours exited with reason: no match of right hand value {error,einval} in gen_emqtt:active_once/2 line 604 in gen_fsm:terminate/7 line 602
22:59:50.048 [error] [Undefined] <0.1963.0> gen_fsm <0.1963.0> in state connecting terminated with reason: no match of right hand value {error,einval} in gen_emqtt:active_once/2 line 604
22:59:50.048 [error] [Undefined] <0.1963.0> CRASH REPORT Process <0.1963.0> with 1 neighbours exited with reason: no match of right han

Subscriber never receiving message Fan out

Hi, I'm currently benchmarking mqtt for both rabbitmq, vernemq and activemq.

I think mzbench is the most valuable tool to do this, but I struggle pretty hard. My subsciribers never receive the produced messages. I tried a lot of custom scenario, but even the official scenarios from this repo doesn't work.

Here is the scenario.

#!benchDL
#######
# Broadcast Scenario:
# 500 subscribers reading from the same topic "fixed/broadcast/topic"
# 1 publisher sending 1 msg/s to topic "fixed/broadcast/topic"
# Overall Msg rate: 500 msg/s
# Message Size: 150 random bytes
# Runtime: 5 min
#######

make_install(git = "https://github.com/erlio/vmq_mzbench.git",
             branch = "master")
             
defaults("pool_size" = 500)

pool(size = numvar("pool_size"),
     worker_type = mqtt_worker,
     woker_start = poisson(1000 rps)):

            connect(host = "some-ip",
                    port = 1883,
                    client = fixed_client_id("subscriber_pool1", worker_id()),
                    clean_session = true,
                    keepalive_interval = 60,
                    proto_version = 4,
                    reconnect_timeout = 4
                    )

            set_signal(subscribe1, 1)
            wait_signal(subscribe1, numvar("pool_size"))
            wait(10 sec)
            subscribe("fixed/broadcast/topic", 0)


pool(size = 1,
     worker_type = mqtt_worker):

            connect(host = "some-ip",
                    port = 1883,
                    client = fixed_client_id("publisher_pool1", worker_id()),
                    clean_session = true,
                    keepalive_interval = 60,
                    proto_version = 4,
                    reconnect_timeout = 4
                    )

            set_signal(connect1, 1)
            wait_signal(connect1, 1)
            wait(4 sec)
            loop(time = 5 min, rate = 1 rps):
                publish("fixed/broadcast/topic", random_binary(150), 0)
            disconnect()

Thanks in advance for answering, this is a pretty urgent benchmark :)

Have a nice day

MQTT Pub to Sub Latency not shown when pool is large

Hi (again)

I'm now getting sensible results, but have a query... e.g. these should be broadly similar:

mzbench run --nodes=4 --env poolsize=250 --env rate=40 mqtt-ramp.bdl

mzbench run --nodes=4 --env poolsize=500 --env rate=20 mqtt-ramp.bdl

mzbench run --nodes=4 --env poolsize=1000 --env rate=10 mqtt-ramp.bdl

All three scenarios execute successfully, and I see the expected throughput in the graphs. There is one small fly in the ointment. In the final run where poolsize = 1000, the MQTT Pub to Sub Latency graph is empty.

This is completely repeatable. If I drop back to 500 / 20, the graph is drawn again. The pub/sub latency is very interesting for us so I'd really like to know if it can appear more reliably.

Oddly I found that the 1000/10 run was the least stressful on VerneMQ of all of the three runs!

image

From left to right, the graphs are 250/40, 1000/10, 500/20. Similarly the amount of network traffic was much less on the 1000/10 run - is this MZBench 'scaling back' its reporting and causing less stress on VerneMQ (or simply a pleasant side-effect of the pub/sub latency graph not being drawn) ?

We are using two VerneMQ nodes in a cluster. (Yea, two is a bad number for quorum...)

Not able to run scenarios on mzbench tool

Hi I was trying to load test vernemq broker, by following instruction on

I got mzbench installed successfully. Then, i was trying to execute the same scenario of 2 pools as mentioned in the above link, but I am getting below exceptions, can you please help me what exactly am I missing here ?

11:22:20.402 [error] [ API ] <0.746.0> [ REMOTE EXEC ] Command execution failed: Cmd: bash -c -l "export PATH='/sbin:/bin:/usr/sbin:/usr/bin'; mkdir -p /tmp/bench_mzbench_api_test7_1574_940138_35584 && cd /tmp/bench_mzbench_api_test7_1574_940138_35584 && git clone https://github.com/erlio/vmq_mzbench.git deployment_code && cd deployment_code && git checkout master && cd ./. && make generate_tgz && mv *.tgz /tmp/bench_mzbench_api_test7_1574_940138_35558.tgz " Exit code: 2 Output: Cloning into 'deployment_code'... Already on 'master' /tmp/bench_mzbench_api_test7_1574_940138_35584/deployment_code/rebar get-deps /usr/bin/env: escript: No such file or directory make: *** [get-deps] Error 127

11:22:20.544 [error] [ API ] <0.732.0> Stage 'pipeline - provisioning': failed Command returned 2: bash -c -l "export PATH='/sbin:/bin:/usr/sbin:/usr/bin'; mkdir -p /tmp/bench_mzbench_api_test7_1574_940138_35584 && cd /tmp/bench_mzbench_api_test7_1574_940138_35584 && git clone https://github.com/erlio/vmq_mzbench.git deployment_code && cd deployment_code && git checkout master && cd ./. && make generate_tgz && mv *.tgz /tmp/bench_mzbench_api_test7_1574_940138_35558.tgz " Command output: Cloning into 'deployment_code'... Already on 'master' /tmp/bench_mzbench_api_test7_1574_940138_35584/deployment_code/rebar get-deps /usr/bin/env: escript: No such file or directory make: *** [get-deps] Error 127

vmq_mzbench workers crashed with message "no function clause matching gen_emqtt:handle_frame(waiting_for_connack....)"

Hello,

I am making load test with vmq_mzbench for vernemq.
here is my default script:


defaults("poolsize" = 200)

# wait time for consumers in seconds
defaults("wait_time" = 15)
# publisher loop duration in minutes
defaults("loop_time" = 10)
# publisher loop rate in rpm
defaults("loop_rate" = 1250)

# Nb rps = (nb pool * poolsize * loop_rate) / 60

pool(size = numvar("poolsize"),
     worker_type = mqtt_worker,
     worker_start = poisson(25 rps)):
        connect([t(host, var("broker")),
                 t(port, var("port")),
                 t(username, var("username")),
                 t(password, var("password")),
                 t(client, fixed_client_id("loadtests-mqttbroker-id0", worker_id())),
                 t(clean_session, true),
                 t(keepalive_interval, 60),
                 t(proto_version, 4),
                 t(reconnect_timeout, 45)
                ])
        wait(var("wait_time") sec)
        # wait for consumer to be setup
        subscribe(var("topic"), 0)
        set_signal(connect1, 1)
        wait_signal(connect1, numvar("poolsize"))
        wait(var("wait_time") sec)
        loop(time = var("loop_time") min, rate = var("loop_rate") rpm):
            publish(var("topic"), random_binary(150), 0)
        wait(30 sec)
        disconnect()

I always get test failed, with these user's error messages:


09:39:01.805 [error] [Undefined] <0.450.0> gen_fsm <0.450.0> in state waiting_for_connack terminated with reason: no function clause matching gen_emqtt:handle_frame(waiting_for_connack, {mqtt_publish,undefined,[<<"test">>,<<"user1">>,<<"loadtest">>,<<>>],0,0,0,<<131,104,2,104,3,98,...>>}, {state,"MY_BROKER_IP",1883,#Port<0.3442>,1536,"user1","passwd1",["loadtest...",...],...}) line 354
--
09:39:01.858 [error] [Undefined] <0.450.0> CRASH REPORT Process <0.450.0> with 1 neighbours exited with reason: no function clause matching gen_emqtt:handle_frame(waiting_for_connack, {mqtt_publish,undefined,[<<"test">>,<<"user1">>,<<"loadtest">>,<<>>],0,0,0,<<131,104,2,104,3,98,...>>}, {state,"MY_BROKER_IP",1883,#Port<0.3442>,1536,"user1","passwd1",["loadtest...",...],...}) line 354 in gen_fsm:terminate/7 line 559
09:45:45.926 [error] [Undefined] <0.594.0> gen_fsm <0.594.0> in state waiting_for_connack terminated with reason: no function clause matching gen_emqtt:handle_frame(waiting_for_connack, {mqtt_publish,undefined,[<<"test">>,<<"user1">>,<<"loadtest">>,<<>>],0,0,0,<<131,104,2,104,3,98,...>>}, {state,"MY_BROKER_IP",1883,#Port<0.3560>,9934,"user1","passwd1",["loadtest...",...],...}) line 354
09:45:46.186 [error] [Undefined] <0.594.0> CRASH REPORT Process <0.594.0> with 1 neighbours exited with reason: no function clause matching gen_emqtt:handle_frame(waiting_for_connack, {mqtt_publish,undefined,[<<"test">>,<<"user1">>,<<"loadtest">>,<<>>],0,0,0,<<131,104,2,104,3,98,...>>}, {state,"MY_BROKER_IP",1883,#Port<0.3560>,9934,"user1","passwd1",["loadtest...",...],...}) line 354 in gen_fsm:terminate/7 line 559

and system's error:


09:39:01.932 [error] [[email protected]] <0.260.0> [ "pool1" ] Received DOWN from worker <0.449.0> with reason {function_clause,[{gen_emqtt,handle_frame,[waiting_for_connack,{mqtt_publish,undefined,[<<"test">>,<<"user1">>,<<"loadtest">>,<<>>],0,0,0,<<131,104,2,104,3,98,0,0,5,240,98,0,14,63,138,98,0,1,178,180,109,0,0,0,150,150,142,80,46,3,180,71,143,62,115,204,0,112,38,201,44,42,232,81,59,184,228,129,245,248,16,176,201,105,243,234,135,125,117,127,242,158,185,22,72,5,254,63,54,73,173,14,201,8,146,62,26,35,104,157,179,245,220,85,234,62,12,19,62,127,153,245,128,231,194,182,72,109,21,8,125,128,77,154,113,157,158,226,240,189,199,19,10,141,223,8,157,92,213,86,209,203,113,133,206,22,240,116,209,183,136,105,223,97,213,178,188,206,122,75,148,211,204,35,71,175,209,121,61,126,138,47,28,142,151,8,211,48,29,250,37,81,212,57,239,195,47,171,29,203,102,41,246,32,2>>},{state,"MY_BROKER_IP",1883,#Port<0.3442>,1536,"user1","passwd1",["loadtests-mqttbroker-id0","-","92"],true,undefined,undefined,0,<<>>,120000,120000,10000,4,mqtt_worker,[],{gen_tcp,[]},<<48,196,1,0,19,115,97,104,47,117,115,101,114,49,47,108,111,97,100,116,101,115,116,47,131,104,2,104,3,98,0,0,5,240,98,0,14,63,138,98,0,1,178,180,109,0,0,0,150,150,142,80,46,3,180,71,143,62,115,204,0,112,38,201,44,42,232,81,59,184,228,129,245,248,16,176,201,105,243,234,135,125,117,127,242,158,185,22,72,5,254,63,54,73,173,14,201,8,146,62,26,35,104,157,179,245,220,85,234,62,12,19,62,127,153,245,128,231,194,182,72,109,21,8,125,128,77,154,113,157,158,226,240,189,199,19,10,141,223,8,157,92,213,86,209,203,113,133,206,22,240,116,209,183,136,105,223,97,213,178,188,206,122,75,148,211,204,35,71,175,209,121,61,126,138,47,28,142,151,8,211,48,29,250,37,81,212,57,239,195,47,171,29,203,102,41,246>>,{dict,1,16,16,8,80,48,{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},{{[],[],[],[],[],[],[],[[ping\|#Ref<0.0.2.1196>]],[],[],[],[],[],[],[],[]}}},{#Fun<mqtt_worker.0.79002790>,#{462 => {1520,933769,713778},704 => {1520,933781,445266},1328 => {1520,933811,406289},417 => {1520,933767,547214},513 => {1520,933772,243194},263 => {1520,933760,160420},525 => {1520,933772,776658},1013 => {1520,933796,210504},475 => {1520,933770,331178},500 => {1520,933771,637006},105 => {1520,933752,575313},878 => {1520,933789,838858},1513 => {1520,933820,246053},313 => {1520,933762,562990},1514 => {1520,933820,246084},1070 => {1520,933799,15400},296 => {1520,933761,739559},947 => {1520,933793,260199},1116 => {1520,933801,238887},484 => {1520,933770,810559},888 => {1520,933790,498547},960 => {1520,933793,829091},48 => {1520,933749,835414},1218 => {1520,933806,134605},1103 => {1520,933800,637548},1239 => {1520,933807,90098},635 => {1520,933778,15749},230 => {1520,933758,575495},1379 => {1520,933813,782525},529 => {1520,933772,992584},1063 => {1520,933798,649165},626 => {1520,933777,601043},1086 => {1520,933799,783268},387 => {1520,933766,110584},941 => {1520,933792,835323},1018 => {1520,933796,493269},1128 => {1520,933801,831772},1419 => {1520,933815,767074},921 => {1520,933791,817861},763 => {1520,933784,140774},343 => {1520,933763,995219},429 => {1520,933768,127414},1023 => {1520,933796,778688},831 => {1520,933787,416541},270 => {1520,933760,493074},344 => {1520,933764,44076},62 => {1520,933750,513113},1060 => {1520,933798,502715},685 => {1520,933780,606635},205 => {1520,933757,371401},646 => {1520,933778,571876},962 => {1520,933793,829145},1322 => {1520,933811,107867},727 => {1520,933782,480014},333 => {1520,933763,516282},647 => {1520,933778,571971},11 => {1520,933748,59132},1092 => {1520,933800,117570},1450 => {1520,933817,234733},913 => {1520,933791,535029},1151 => {1520,933802,885404},1143 => {1520,933802,506423},762 => {1520,933784,140751},232 => {1520,933758,667851},39 => {1520,933749,418297},164 => {1520,933755,417822},851 => {1520,933788,413865},236 => {1520,933758,860452},1152 => {1520,933802,985117},1188 => {1520,933804,694881},934 => {1520,933792,400846},560 => {1520,933774,532243},1442 => {1520,933816,813227},973 => {1520,933794,289600},1224 => {1520,933806,430612},994 => {1520,933795,329413},1516 => {1520,...},...}}}],...},...]}
--
09:45:46.386 [error] [[email protected]] <0.260.0> [ "pool1" ] Received DOWN from worker <0.593.0> with reason {function_clause,[{gen_emqtt,handle_frame,[waiting_for_connack,{mqtt_publish,undefined,[<<"test">>,<<"user1">>,<<"loadtest">>,<<>>],0,0,0,<<131,104,2,104,3,98,0,0,5,240,98,0,14,65,26,98,0,3,185,66,109,0,0,0,150,237,44,211,113,167,81,41,87,158,161,236,12,109,215,120,151,127,12,111,34,203,31,198,124,202,182,64,67,161,42,235,176,116,217,106,254,35,55,74,80,24,58,196,169,184,158,127,191,231,44,24,106,9,90,80,60,22,73,119,11,235,181,27,194,121,166,109,118,94,70,29,210,74,151,185,143,230,175,52,217,120,10,167,110,167,139,76,179,235,246,121,178,240,159,26,89,65,128,169,225,32,104,198,166,228,127,247,15,109,5,247,160,229,72,29,211,251,47,232,5,232,230,143,17,46,42,136,131,135,6,225,81,23,253,246,234,164,199,169,218,95,31,87,231,35,97,177,32,2,0>>},{state,"MY_BROKER_IP",1883,#Port<0.3560>,9934,"user1","passwd1",["loadtests-mqttbroker-id0","-","164"],true,undefined,undefined,0,<<>>,120000,120000,10000,4,mqtt_worker,[],{gen_tcp,[]},<<48,196,1,0,19,115,97,104,47,117,115,101,114,49,47,108,111,97,100,116,101,115,116,47,131,104,2,104,3,98,0,0,5,240,98,0,14,65,26,98,0,3,185,66,109,0,0,0,150,237,44,211,113,167,81,41,87,158,161,236,12,109,215,120,151,127,12,111,34,203,31,198,124,202,182,64,67,161,42,235,176,116,217,106,254,35,55,74,80,24,58,196,169,184,158,127,191,231,44,24,106,9,90,80,60,22,73,119,11,235,181,27,194,121,166,109,118,94,70,29,210,74,151,185,143,230,175,52,217,120,10,167,110,167,139,76,179,235,246,121,178,240,159,26,89,65,128,169,225,32,104,198,166,228,127,247,15,109,5,247,160,229,72,29,211,251,47,232,5,232,230,143,17,46,42,136,131,135,6,225,81,23,253,246,234,164,199,169,218,95,31,87,231,35,97,177>>,{dict,1,16,16,8,80,48,{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},{{[],[],[],[],[],[],[],[[ping\|#Ref<0.0.2.20274>]],[],[],[],[],[],[],[],[]}}},{#Fun<mqtt_worker.0.79002790>,#{462 => {1520,933769,721547},704 => {1520,933781,430722},7994 => {1520,934131,253985},6850 => {1520,934076,342494},6836 => {1520,934075,671349},9765 => {1520,934216,526438},6653 => {1520,934066,900710},5961 => {1520,934033,669249},1328 => {1520,933811,427135},4351 => {1520,933956,389314},8373 => {1520,934149,450972},6749 => {1520,934071,495801},9406 => {1520,934200,877569},8441 => {1520,934152,714763},6570 => {1520,934062,926603},6074 => {1520,934039,180128},3590 => {1520,933919,904959},7636 => {1520,934114,77014},5934 => {1520,934032,377388},4631 => {1520,933969,829180},1935 => {1520,933840,423327},8406 => {1520,934151,47947},9860 => {1520,934221,13864},3742 => {1520,933927,263743},9221 => {1520,934190,153975},4969 => {1520,933986,57338},9846 => {1520,934220,412860},3216 => {1520,933902,38075},2992 => {1520,933891,375465},4395 => {1520,933958,522406},6546 => {1520,934061,750736},7109 => {1520,934088,773858},7738 => {1520,934118,965855},1792 => {1520,933833,600075},2339 => {1520,933859,818643},4380 => {1520,933957,782321},9697 => {1520,934213,150668},3212 => {1520,933901,879286},3091 => {1520,933896,109126},3521 => {1520,933916,631816},9091 => {1520,934183,915299},6330 => {1520,934051,483602},6415 => {1520,934055,466880},3079 => {1520,933895,512492},3184 => {1520,933900,564267},8243 => {1520,934143,225820},5075 => {1520,933991,144693},417 => {1520,933767,559471},3052 => {1520,933894,143176},513 => {1520,933772,355341},2633 => {1520,933873,930093},263 => {1520,933760,167778},8854 => {1520,934172,535699},6459 => {1520,934057,600514},525 => {1520,933772,872504},3951 => {1520,933937,206710},5572 => {1520,934015,3714},2380 => {1520,933861,781800},2528 => {1520,933868,894591},9362 => {1520,934200,529302},3883 => {1520,933933,981010},1013 => {1520,933796,331735},4193 => {1520,933948,811755},475 => {1520,933770,348084},3424 => {1520,933911,998413},500 => {1520,933771,743933},5673 => {1520,934019,851944},105 => {1520,933752,582189},4498 => {1520,933963,445677},8832 => {1520,934171,480867},8468 => {1520,934154,8853},8527 => {1520,934156,839254},9704 => {1520,934213,421542},3510 => {1520,933916,110283},8596 => {1520,934160,154072},8158 => {...},...}}}],...},...]}
09:46:17.798 [error] [ API ] <0.9188.0> Benchmark result: FAILED 2 of 200 workers failed
09:46:17.931 [error] [ API ] <0.9147.0> Stage 'pipeline - running': failed Benchmark has failed on running with reason: {benchmark_failed,{workers_failed,2}}  Stacktrace: [{mzb_pipeline,error,2,                            [{file,"/mzbench/server/_build/default/deps/mzbench_api/src/mzb_pipeline.erl"},                             {line,90}]},              {mzb_pipeline,'-handle_cast/2-fun-0-',6,                            [{file,"/mzbench/server/_build/default/deps/mzbench_api/src/mzb_pipeline.erl"},                             {line,172}]}]
09:46:21.321 [error] [ API ] <0.9808.0> [ REMOTE EXEC ] Command execution failed: Cmd: bash -c -l "export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'; kill -9 "stdin: is not a tty\n10715"; true " Exit code: 1 Output: stdin: is not a tty is: line 0: kill: stdin:: arguments must be process or job IDs
09:46:21.323 [error] [ API ] <0.9147.0> Stage 'finalize - cleaning_nodes': failed Command returned 1:  bash -c -l "export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'; kill -9 "stdin: is not a tty\n10715"; true " Command output: stdin: is not a tty is: line 0: kill: stdin:: arguments must be process or job IDs

Could you tell me if my bdl script is good?
and if you know, how to solved this crash error?

mzbench not connecting to the host specify in the scenario

Hi,

I have cloned the repository https://github.com/machinezone/mzbench.git in order to stress test my VerneMQ broker.
I use the following scenario that uses this repository mqtt_worker

#!benchDL


#######
# Scenario:
# A single subscriber reading from "prefix/clients/#" topic filter
# 1k publisher publishing to exclusive topic "prefix/clients/{client_id}"
# Overall msg rate: 1k msg/s
# Message size: 150 random bytes
# Running time: 5 min
#######

make_install(git = "https://github.com/erlio/vmq_mzbench.git",
             branch = "master")

pool(size = 1,
     worker_type = mqtt_worker):
        connect([t(host, "dev-csp.dc.dojo-labs.com"),
                t(port,1883),
                t(client,"subscriber1"),
                t(clean_session,false),
                t(keepalive_interval,60),
                t(proto_version,4), t(reconnect_timeout,4)
                ])

        wait(60 sec)
        subscribe("prefix/clients/#", 0)

when i run the scenario above I noticed that its not connecting to the host i'm specifying, can you please tell me if im doing something wrong here ?

Thanks in advanced! :)

Shlomy.

how to test auth for a lot of users

its possible to use many user accounts on test auth to run?
I have a tsv file like below:

client001    user001      pw001
client002    user002      pw002
...
client100    user100      pw100

I can print a random one row by:

include_resource(tsv_resource, "resource_data.tsv", tsv)

pool(size = 3,
    worker_type = dummy_worker):
    print(choose(resource(tsv_resource)))

but how to put all accounts into test scenario?

make_install(git = "https://github.com/erlio/vmq_mzbench.git",
             branch = "master")

pool(size = 100,
     worker_type = mqtt_worker,
     worker_start = poisson(10 rps)):

            connect([t(host, "test-mqtt"),
                    t(port,1883),
                    t(client,"client001-100"),
                    t(username, "user001-100"),
                    t(password, "pw001-100"),
                    t(clean_session,true),
                    t(keepalive_interval,60),
                    t(proto_version,4), t(reconnect_timeout,4)
                    ])

            set_signal(connect1, 1)
            wait_signal(connect1, 100)
            wait(4 sec)
            loop(time = 10 sec, rate = 1 rps):
                publish("test/broadcast", "THIS IS A TEST", 0)
            disconnect()

just in "client001-100", I cannot find a way to extract the value from the list.
there is no operator [] like resource(tsv_resource)[1][1]

Dependencies cannot be installed

Hi,

In trying to build vmq_mzbench, I hit the following snag immediately:

jswails@localhost ~/src/verne/vmq_mzbench (master) $ ./rebar compile
==> vmq_mzbench (compile)
Dependency not available: lager-.* ({git,"git://github.com/basho/lager.git",
                                     {tag,"2.2.0"}})
Dependency not available: vmq_commons-.* ({git,
                                           "git://github.com/ioolkos/vmq_commons.git",
                                           {branch,"master"}})
ERROR: compile failed while processing /home/jswails/src/verne/vmq_mzbench: rebar_abort

I'm not sure why rebar didn't go out and check out those repos automatically... Any ideas what I can do?

Thanks!

gen_server mzb_time terminated with reason: {timeout,{gen_server,call,[mzb_interconnect,get_director]}}

Hello,

I'm trying to do some benchmarking with multiple servers running mzbench + vmq_mzbench. However, whenever I reach over 35k publishers (distributed in 14 nodes) I start getting some errors related to timeouts as shown next:

12:42:29.004 [error] <0.196.0> gen_server mzb_time terminated with reason: {timeout,{gen_server,call,[mzb_interconnect,get_director]}} in gen_server:call/2 line 204
12:42:31.532 [error] <0.196.0> CRASH REPORT Process mzb_time with 0 neighbours exited with reason: {timeout,{gen_server,call,[mzb_interconnect,get_director]}} in gen_server:terminate/7 line 826
12:42:31.540 [error] <0.132.0> Supervisor mzb_sup had child time_service started with mzb_time:start_link() at <0.196.0> exit with reason {timeout,{gen_server,call,[mzb_interconnect,get_director]}} in context child_terminated

Anyone has any idea of what could be causing this?

This is the scenario I''m trying to run:

#!benchDL

make_install(git = "https://github.com/erlio/vmq_mzbench.git",
             branch = "master")

defaults("topic" = "topic1", 
            "subtopic" = "topic1",
            "sub_host" = "192.168.144.11", 
            "pub_host" = "192.168.144.11",
            "pubs"     = 1000, 
            "subname"  = "subscriber1",
            "poolname" = "pool1")


pool(size = 1,
     worker_type = mqtt_worker):

            connect([t(host, var("sub_host")),
                    t(port,1883),
                    t(client,var("subname")),
                    t(clean_session,true),
                    t(keepalive_interval,60),
                    t(proto_version,4), t(reconnect_timeout,4)
                    ])

            wait(1 sec)
            subscribe(var("subtopic"), 0)


pool(size = numvar("pubs"),
     worker_type = mqtt_worker,
     worker_start = linear(40 rps)):

            connect([t(host, var("pub_host")),
                    t(port,1883),
                    t(client,fixed_client_id(var("poolname"), worker_id())),
                    t(clean_session,true),
                    t(keepalive_interval,60),
                    t(proto_version,4), t(reconnect_timeout,4)
                    ])

            wait(15 sec)
            set_signal("connect1",1)
            wait_signal("connect1", numvar("pubs"))
            loop(time = 10 min, rate = 1 rps):
                publish(var("topic"), random_binary(150), 0)
            disconnect()

This is scenario is executed independently by each node (14 nodes in total), each node has its own topic,, they all publish/subscribe to the same server and the error occurs in at least one node after reaching 35k publishers, meaning 2.5k publishers per node.

Thanks in advance for your help,
Best,

Carlos

Typo in example scenario 1_to_1.bdl

Worker_start has a type in the 1_to_1.bdl example scenario:

pool(size = 1000,
     worker_type = mqtt_worker,
     **woker_start** = poisson(100 rps)):

Unable to use mqtt_worker

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

Connections limit to 28k CCUs

I'm trying to connect 30k mqtt CCUs but the connections limit to 28228.
its with vernemq. The system limits are all set to higher values and my JMeter scripts can work across 1 million but the vmq tests limit to 28225 CCUs.

Is this the correct way to update the listener.max_connections limits?

make_install(git = "https://github.com/erlio/vmq_mzbench.git",branch = "master") pre_hook(): exec(all, "sudo chmod a+rwx /etc/vernemq/vernemq.conf") exec(all, "sudo sed -i '/listener.max_connections = 400000/c\\listener.max_connections = 450000'/etc/vernemq/vernemq.conf") exec(all, "sudo service vernemq restart")

Not getting any data from mqtt.message.consumed.total

Scenario Used : We are able to successfully publish data to an MQTT topic , But the consumer shows zero. Even if we subscribe to the same topic using tool like MQTTBox , we are not getting the data we published using vmq_mzbench

#!benchDL
#######

Scenario:

pool(size = 1,
worker_type = mqtt_worker):

        connect([t(host, "http://dev.broker.nucleus.cantiz.com"),
                t(port,1883),
                t(client,"MQTT-Dev"),
                t(clean_session,true),
                t(keepalive_interval,30),
                t(proto_version,4), t(reconnect_timeout,4)
                ])

        wait(1 sec)
        subscribe("nucleus-event-topic-dev", 1)

pool(size = 1000,
worker_type = mqtt_worker,
worker_start = poisson(1000 rps)):

        connect([t(host, "http://dev.broker.nucleus.cantiz.com"),
                t(port,1883),
                t(client,fixed_client_id("pool1", worker_id())),
                t(clean_session,true),
                t(keepalive_interval,30),
                t(proto_version,4), t(reconnect_timeout,4)
                ])

        set_signal(connect, 1)
        wait_signal(connect, 1000)
        wait(4 sec)
        loop(time = 1 min, rate = 1 rps):
            publish_to_self("nucleus-event-topic-dev", random_binary(150), 1)
        disconnect() 

result
result

Plugin doesn't compile

So i tried including your plugin in my load test and i got following Syntax error compiling

12:29:17.499 [error] [ API ] <0.298.0> Stage 'pipeline - provisioning': failed
Command returned 2:
 bash -c -l "export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'; mkdir -p /tmp/bench_mzbench_api_e9fa23c3e463_1521_30547_430255 && cd /tmp/bench_mzbench_api_e9fa23c3e463_1521_30547_430255 && git clone https://github.com/erlio/vmq_mzbench.git deployment_code && cd deployment_code && git checkout master && cd ./. && make generate_tgz && mv *.tgz /tmp/bench_mzbench_api_e9fa23c3e463_1521_30547_430138.tgz "
Command output: Cloning into 'deployment_code'...
Already on 'master'
/tmp/bench_mzbench_api_e9fa23c3e463_1521_30547_430255/deployment_code/rebar get-deps
==> deployment_code (get-deps)
Pulling lager from {git,"git://github.com/basho/lager.git",{tag,"2.2.3"}}
Cloning into 'lager'...
Pulling vmq_commons from {git,"git://github.com/erlio/vmq_commons.git",
                              "7b6171b"}
Cloning into 'vmq_commons'...
==> lager (get-deps)
Pulling goldrush from {git,"git://github.com/DeadZen/goldrush.git",
                           {tag,"0.1.8"}}
Cloning into 'goldrush'...
==> goldrush (get-deps)
==> vmq_commons (get-deps)
/tmp/bench_mzbench_api_e9fa23c3e463_1521_30547_430255/deployment_code/rebar compile
==> goldrush (compile)
Compiled src/gr_counter_sup.erl
Compiled src/gr_manager_sup.erl
Compiled src/gr_manager.erl
Compiled src/gr_app.erl
Compiled src/glc_ops.erl
Compiled src/gr_context.erl
Compiled src/gr_counter.erl
Compiled src/gre.erl
Compiled src/gr_param_sup.erl
Compiled src/gr_sup.erl
Compiled src/glc.erl
Compiled src/glc_lib.erl
Compiled src/gr_param.erl
Compiled src/glc_code.erl
==> lager (compile)
Compiled src/lager_util.erl
Compiled src/lager_transform.erl
Compiled src/lager_crash_log.erl
Compiled src/lager.erl
Compiled src/lager_sup.erl
Compiled src/lager_common_test_backend.erl
Compiled src/lager_handler_watcher.erl
Compiled src/lager_format.erl
Compiled src/lager_config.erl
Compiled src/lager_console_backend.erl
Compiled src/lager_backend_throttle.erl
Compiled src/lager_stdlib.erl
Compiled src/lager_msg.erl
Compiled src/lager_handler_watcher_sup.erl
Compiled src/lager_app.erl
Compiled src/lager_trunc_io.erl
Compiled src/lager_default_formatter.erl
Compiled src/lager_file_backend.erl
Compiled src/error_logger_lager_h.erl
==> vmq_commons (compile)
Compiled src/auth_on_register_hook.erl
Compiled src/gen_emqtt.erl
Compiled src/on_unsubscribe_hook.erl
Compiled src/msg_store_plugin.erl
Compiled src/on_client_wakeup_hook.erl
Compiled src/on_subscribe_hook.erl
Compiled src/on_publish_hook.erl
Compiled src/on_offline_message_hook.erl
Compiled src/on_register_hook.erl
Compiled src/auth_on_subscribe_hook.erl
Compiled src/on_deliver_hook.erl
Compiled src/on_config_change_hook.erl
Compiled src/on_client_offline_hook.erl
Compiled src/auth_on_publish_hook.erl
Compiled src/on_client_gone_hook.erl
Compiled src/vmq_topic.erl
Compiled src/vmq_parser.erl
==> deployment_code (compile)
src/mqtt_worker.erl:54: syntax error before: '{'
src/mqtt_worker.erl:4: function metrics/0 undefined
ERROR: compile failed while processing /tmp/bench_mzbench_api_e9fa23c3e463_1521_30547_430255/deployment_code: rebar_abort
make: *** [compile] Error 1

Dynamic deadlock detected for 1_to_1 scenario

When I try to run 1_to_1 scenario, I receive dynamic deadlock detected error:

09:51:58.603 [error] [ API ] <0.4582.0> Benchmark result: FAILED
Dynamic deadlock detected

09:51:58.618 [error] [ API ] <0.4548.0> Stage 'pipeline - running': failed
Benchmark has failed on running with reason:
{benchmark_failed,{asserts_failed,1}}

Stacktrace: [{mzb_pipeline,error,2,
                           [{file,"/home/test/mzbench/server/_build/default/deps/mzbench_api/src/mzb_pipeline.erl"},
                            {line,90}]},
             {mzb_pipeline,'-handle_cast/2-fun-0-',6,
                           [{file,"/home/test/mzbench/server/_build/default/deps/mzbench_api/src/mzb_pipeline.erl"},
                            {line,172}]}]

Could not compile on OSX

Hi

I tried to use this on OSX with Erlang 21.2 from BREW, and compiler reports the following error.

Thanks.

Latency units

Hi, after running a few tests I'm now getting some interesting graphs. One little question comes to mind - what is the unit of latency? Is it milliseconds, microseconds, or something else?

I can't find the unit specified anywhere...

Dynamic deadlock error with linear worker_start method

When we try to run the example scenario's (e.g. fan_in) and attempt to set the worker start to a linear method (instead of the poisson) I receive the following error:

09:51:58.603 [error] [ API ] <0.4582.0> Benchmark result: FAILED
Dynamic deadlock detected

09:51:58.618 [error] [ API ] <0.4548.0> Stage 'pipeline - running': failed
Benchmark has failed on running with reason:
{benchmark_failed,{asserts_failed,1}}

Stacktrace: [{mzb_pipeline,error,2,
                           [{file,"/home/test/mzbench/server/_build/default/deps/mzbench_api/src/mzb_pipeline.erl"},
                            {line,90}]},
             {mzb_pipeline,'-handle_cast/2-fun-0-',6,
                           [{file,"/home/test/mzbench/server/_build/default/deps/mzbench_api/src/mzb_pipeline.erl"},
                            {line,172}]}]

When we use the poisson method, the script does execute but it hammers the server when startup up.
Do you have an idea why above problem occurs and how we can fix it?

Thanks in advance.

problem with loading client cert

Hi I was trying to start the example use_client_cert but I had a problem with loading client cert
but I'm getting the following error

17:30:19.399 [error] [[email protected]] <0.263.0> Worker <0.268.0> on '[email protected]' has crashed: {badmatch,[{'PrivateKeyInfo',<<48,130,9,67,2,1,0,48,13,6,9,42,134,72,134,247,13,1,1,1,5,0,4,130,9,45,48,130,9,41,2,1,0,2,130,2,1,0,199,133,155,216,115,224,53,14,51,144,191,22,232,162,105,72,0,66,233,81,71,174,185,252,14,144,198,48,170,130,145,253,46,207,241,194,91,96,14,12,78,131,149,169,251,253,144,195,33,226,107,81,119,128,67,194,102,128,79,7,28,188,114,196,233,112,228,31,91,1,146,152,24,19,209,55,3,27,35,170,148,36,97,34,58,254,243,85,85,79,254,203,240,212,189,51,67,216,108,224,123,101,108,185,170,140,179,173,136,246,218,215,127,140,196,193,82,246,183,197,181,36,45,146,21,129,229,108,206,148,140,174,247,173,21,153,203,239,231,35,246,223,187,225,53,167,230,142,182,38,118,95,233,166,106,140,110,66,42,94,151,28,97,42,135,101,244,57,213,139,145,127,75,36,205,74,198,82,173,145,196,116,179,32,118,0,40,199,83,177,42,59,36,67,90,105,240,123,9,193,92,19,87,175,61,171,197,173,176,46,136,45,252,91,127,142,140,77,54,23,226,111,1,203,131,13,203,91,23,56,87,188,251,65,38,219,63,140,85,109,5,60,232,86,51,17,175,21,3,189,212,193,110,229,191,144,238,244,37,170,198,251,183,168,93,31,154,169,135,6,74,123,164,222,119,131,12,29,232,235,253,250,18,92,148,170,151,251,175,249,131,163,131,85,227,165,61,49,227,164,8,248,95,27,180,159,6,255,79,198,9,193,246,184,233,170,135,170,84,20,125,22,179,210,219,172,37,48,...>>,...}]} Stacktrace: [{mqtt_worker,load_client_key,3,[{file,"src/mqtt_worker.erl"},{line,296}]},{mzb_erl_worker,apply,4,[{file,"/tmp/bench_mzbench_api_mirko-Inspiron-3576_1566_715078_803996/deployment_code/node/_build/default/deps/mzbench/src/mzb_erl_worker.erl"},{line,70}]},{mzbl_interpreter,eval,4,[{file,"/tmp/bench_mzbench_api_mirko-Inspiron-3576_1566_715078_803996/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_interpreter.erl"},{line,22}]},{mzbl_interpreter,'-eval_/4-fun-0-',4,[{file,"/tmp/bench_mzbench_api_mirko-Inspiron-3576_1566_715078_803996/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_interpreter.erl"},{line,38}]},{lists,foldl,3,[{file,"lists.erl"},{line,1263}]},{mzbl_interpreter,eval,4,[{file,"/tmp/bench_mzbench_api_mirko-Inspiron-3576_1566_715078_803996/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_interpreter.erl"},{line,22}]},{mzbl_interpreter,eval_std_function,6,[{file,"/tmp/bench_mzbench_api_mirko-Inspiron-3576_1566_715078_803996/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_interpreter.erl"},{line,61}]},{mzbl_interpreter,eval,4,[{file,"/tmp/bench_mzbench_api_mirko-Inspiron-3576_1566_715078_803996/deployment_code/node/_build/default/deps/mzbench_language/src/mzbl_interpreter.erl"},{line,22}]}] State of worker: {mqtt_worker,{state,undefined,undefined}}
--
ย 

I have ca.crt client.crt and client.key files that are valid for connecting and authenticating to my broker.
client.key looks like this

-----BEGIN PRIVATE KEY-----
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
cf+UMA93Pwq+8bzrCNm1nBT2Rs9O
-----END PRIVATE KEY-----

Do you have any idea how to make this work in my case, where I may go wrong?

Cannot Start Server

I'm trying to build and use mzbench + vmq_mzbench, but cannot get it running. What I did:

1. git clone https://github.com/satori-com/mzbench
2. cd mzbench
3. virtualenv -p python2 venv
4. source venv/bin/activate
5. pip install -r requirements.txt
6. ./bin/mzbench start_serve

and it fails with:

Executing make -C /home/rad/src/github/mzbench/bin/../server generate
make: Entering directory '/home/rad/src/github/mzbench/server'
/home/rad/src/github/mzbench/bin/rebar3 compile
===> Verifying dependencies...
===> Package <<"header_generator">> not found. Fetching registry updates and trying again...
===> Updating package registry...
===> Writing registry to /home/rad/.cache/rebar3/hex/default/registry
===> Generating package index...
===> [appsignal:1.6.2], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.6-beta.1], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.0], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.7.0-alpha.4], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.0-beta.1], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.3], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.7.0-alpha.3], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [prometheus_httpd:2.1.10], Bad dependency version for prometheus: ~> 3.5 or ~> 4.2.
===> [appsignal:1.7.0-alpha.2], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.7.0-alpha.1], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.1], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.5], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.6-beta.2], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.6], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.7], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.4], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.0-alpha.1], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> Writing index to /home/rad/.cache/rebar3/hex/default/packages.idx
===> Plugin header_generator not available. It will not be used.
===> Package <<"eqc_resolver">> not found. Fetching registry updates and trying again...
===> Updating package registry...
===> Writing registry to /home/rad/.cache/rebar3/hex/default/registry
===> Generating package index...
===> [appsignal:1.6.2], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.6-beta.1], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.0], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.7.0-alpha.4], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.0-beta.1], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.3], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.7.0-alpha.3], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [prometheus_httpd:2.1.10], Bad dependency version for prometheus: ~> 3.5 or ~> 4.2.
===> [appsignal:1.7.0-alpha.2], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.7.0-alpha.1], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.1], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.5], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.6-beta.2], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.6], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.7], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.4], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.0-alpha.1], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> Writing index to /home/rad/.cache/rebar3/hex/default/packages.idx
===> Plugin eqc_resolver not available. It will not be used.
===> Package <<"rebar_gdb_plugin">> not found. Fetching registry updates and trying again...
===> Updating package registry...
===> Writing registry to /home/rad/.cache/rebar3/hex/default/registry
===> Generating package index...
===> [appsignal:1.6.2], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.6-beta.1], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.0], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.7.0-alpha.4], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.0-beta.1], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.3], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.7.0-alpha.3], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [prometheus_httpd:2.1.10], Bad dependency version for prometheus: ~> 3.5 or ~> 4.2.
===> [appsignal:1.7.0-alpha.2], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.7.0-alpha.1], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.1], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.5], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.6-beta.2], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.6], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.7], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.4], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> [appsignal:1.6.0-alpha.1], Bad dependency version for httpoison: ~> 0.11 or ~> 1.0.
===> Writing index to /home/rad/.cache/rebar3/hex/default/packages.idx
===> Plugin rebar_gdb_plugin not available. It will not be used.
===> Compiling meck
===> Compiling _build/default/deps/meck/src/meck_code_gen.erl failed
_build/default/deps/meck/src/meck_code_gen.erl:182: erlang:get_stacktrace/0: deprecated; use the new try/catch syntax for retrieving the stack backtrace

Makefile:87: recipe for target '.make/compilation-up-to-date' failed
make: *** [.make/compilation-up-to-date] Error 1
make: Leaving directory '/home/rad/src/github/mzbench/server'

The environment is:

Ubuntu 18.04.2 LTS
Erlang/OTP 22
Erts 10.4.4
Rebar 3.11.1
Python 2.7.15+

Then I thought it might be because of the newer version of Erlang/OTP. Then I tried to do the same with Erlang/OTP version 20.3, but it failed with a different error ๐Ÿ˜ž
I also tried to get it running using the RPM package on a CentOS machine:

sudo yum install -y <rpm_file_downloaded_from_github_releases>
sudo pip install mzbench_api_client
mzbench start_server

But it seems start_server is not a valid command, since it fails with the help message.
Can you please help me with this? Thanks.

Receiving worker down crash errors : (Reason : no function clause matching rand:mk_alg(exsss) )

Receiving this error when using mqtt_worker

15:47:54.632 [error] [Undefined] <0.313.0> CRASH REPORT Process <0.313.0> with 1 neighbours exited with reason: no function clause matching rand:mk_alg(exsss) line 410 in gen_fsm:init_it/6 line 366
15:47:54.633 [error] [Undefined] <0.314.0> CRASH REPORT Process <0.314.0> with 1 neighbours exited with reason: no function clause matching rand:mk_alg(exsss) line 410 in gen_fsm:init_it/6 line 366
15:47:54.633 [error] [Undefined] <0.315.0> CRASH REPORT Process <0.315.0> with 1 neighbours exited with reason: no function clause matching rand:mk_alg(exsss) line 410 in gen_fsm:init_it/6 line 366
15:47:54.634 [error] [Undefined] <0.316.0> CRASH REPORT Process <0.316.0> with 1 neighbours exited with reason: no function clause matching rand:mk_alg(exsss) line 410 in gen_fsm:init_it/6 line 366

I tried erlang otp versions 18,20 and 21

MQTT live messaging scenario

Hi Team, I want to create scenario for following flow :

  1. first 5 min , create 10010 client nodes.
  2. make 10000 of these nodes to subscribe to 'n' topics
  3. make 10 publisher to publish to 'n' topics
  4. next 45 min , publishers will start sending messages , simultaneously subscribers will receive the messages on the topic
  5. last 5 min , to disconnect all the nodes

Can you please help me to reproduce the scenario using vmq_mzbench. I have the mzbench setup working fine, need to create the scenario file for the same.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.