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

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

Closed a-wf closed 6 years ago

a-wf commented 6 years ago

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] [mzb_director14_0@127.0.0.1] <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] [mzb_director14_0@127.0.0.1] <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?

ioolkos commented 6 years ago

Hi @akdj thanks for opening the issue. I can review your BDL script, but I need you to show me a runnable complete version of it. (replacing your Broker IP with "127.0.0.1" to not publicly announce your IP).

a-wf commented 6 years ago

Hi @ioolkos

Thank you for your response! here is my full BDL script: In fact my broker IP is my load balancer(HAproxy)'s IP

#!benchDL

make_install(rsync = "/worker/vmq_mzbench/",
             exclude = "deps")

defaults("username" = "user1")
defaults("password" = "passwd1")

defaults("broker" = "127.0.0.1")
defaults("port" = 1883)

defaults("topic" = "test/user1/loadtest/")

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()
ioolkos commented 6 years ago

@akdj you have to get numvars as numvars:

#!benchDL

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

defaults("username" = "user1")
defaults("password" = "passwd1")

defaults("broker" = "127.0.0.1")
defaults("port" = 1883)

defaults("topic" = "test/user1/loadtest/")

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, numvar("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 = numvar("loop_time") min, rate = numvar("loop_rate") rpm):
            publish(var("topic"), random_binary(150), 0)
        wait(30 sec)
        disconnect()
a-wf commented 6 years ago

thanks @ioolkos

I changed it, and retried. But I still have the same error messages: user:

12:00:27.210 [error] [Undefined] <0.632.0> gen_fsm <0.632.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,"127.0.0.1",1883,#Port<0.3507>,6268,"user1","passwd1",["loadtest...",...],...}) line 354

12:00:27.823 [error] [Undefined] <0.632.0> CRASH REPORT Process <0.632.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,"127.0.0.1",1883,#Port<0.3507>,6268,"user1","passwd1",["loadtest...",...],...}) line 354 in gen_fsm:terminate/7 line 559

12:03:28.856 [error] [Undefined] <0.426.0> gen_fsm <0.426.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,"127.0.0.1",1883,#Port<0.3627>,10067,"user1","passwd1",["loadtes...",...],...}) line 354

12:03:28.890 [error] [Undefined] <0.426.0> CRASH REPORT Process <0.426.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,"127.0.0.1",1883,#Port<0.3627>,10067,"user1","passwd1",["loadtes...",...],...}) line 354 in gen_fsm:terminate/7 line 559

system:

Raw logScroll to end

12:00:28.235 [error] [mzb_director16_0@127.0.0.1] <0.260.0> [ "pool1" ] Received DOWN from worker <0.631.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,96,252,98,0,4,23,172,109,0,0,0,150,91,248,233,66,113,226,9,195,213,219,236,230,56,122,83,70,33,112,124,186,81,94,241,240,153,84,180,214,22,190,242,70,155,28,221,240,83,31,208,17,10,67,115,234,204,249,176,208,60,248,17,226,67,174,65,15,108,196,113,245,87,127,118,181,47,93,106,45,181,94,116,91,113,18,225,26,142,216,20,67,208,170,240,54,181,51,187,195,54,194,21,145,159,40,192,57,5,190,222,216,30,223,136,95,10,36,9,72,83,145,114,250,79,110,76,102,174,243,239,16,190,139,240,84,83,154,167,105,178,110,94,242,227,189,226,68,68,149,165,253,207,198,220,55,120,94,32,2,0,0>>},{state,"127.0.0.1",1883,#Port<0.3507>,6268,"user1","passwd1",["loadtests-mqttbroker-id0","-","183"],true,undefined,undefined,0,<<>>,45000,60000,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,96,252,98,0,4,23,172,109,0,0,0,150,91,248,233,66,113,226,9,195,213,219,236,230,56,122,83,70,33,112,124,186,81,94,241,240,153,84,180,214,22,190,242,70,155,28,221,240,83,31,208,17,10,67,115,234,204,249,176,208,60,248,17,226,67,174,65,15,108,196,113,245,87,127,118,181,47,93,106,45,181,94,116,91,113,18,225,26,142,216,20,67,208,170,240,54,181,51,187,195,54,194,21,145,159,40,192,57,5,190,222,216,30,223,136,95,10,36,9,72,83,145,114,250,79,110,76,102,174,243,239,16,190,139,240,84,83,154,167,105,178,110,94,242,227,189,226,68,68,149,165,253,207,198,220,55,120,94>>,{dict,1,16,16,8,80,48,{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},{{[],[],[],[],[],[],[],[[ping|#Ref<0.0.1.16683>]],[],[],[],[],[],[],[],[]}}},{#Fun<mqtt_worker.0.79002790>,#{462 => {1520,942101,982539},704 => {1520,942113,597196},5961 => {1520,942366,68532},1328 => {1520,942143,553137},4351 => {1520,942288,867302},6074 => {1520,942371,574790},3590 => {1520,942252,200437},5934 => {1520,942364,847254},4631 => {1520,942302,426103},1935 => {1520,942172,698344},3742 => {1520,942259,609753},4969 => {1520,942318,595079},3216 => {1520,942234,199446},2992 => {1520,942223,558682},4395 => {1520,942291,24464},1792 => {1520,942165,819071},2339 => {1520,942192,81111},4380 => {1520,942290,213154},3212 => {1520,942234,90250},3091 => {1520,942228,308347},3521 => {1520,942248,955128},3079 => {1520,942227,725682},3184 => {1520,942232,751563},5075 => {1520,942323,606150},417 => {1520,942099,820135},3052 => {1520,942226,354613},513 => {1520,942104,432225},2633 => {1520,942206,188030},263 => {1520,942092,426222},525 => {1520,942105,7165},3951 => {1520,942269,767137},5572 => {1520,942347,396139},2380 => {1520,942194,42732},2528 => {1520,942201,146981},3883 => {1520,942266,514326},1013 => {1520,942128,427243},4193 => {1520,942281,300813},475 => {1520,942102,606635},3424 => {1520,942244,394978},500 => {1520,942103,802673},5673 => {1520,942352,275520},105 => {1520,942084,843150},4498 => {1520,942295,913692},3510 => {1520,942248,455217},5569 => {1520,942347,396090},5637 => {1520,942350,461783},3908 => {1520,942267,615460},878 => {1520,942121,946751},2468 => {1520,942198,271816},4606 => {1520,942301,2632},1513 => {1520,942152,429124},313 => {1520,942094,840574},2497 => {1520,942199,658693},2637 => {1520,942206,379051},3301 => {1520,942238,256630},1514 => {1520,942152,473697},3405 => {1520,942243,399601},3219 => {1520,942234,414471},5757 => {1520,942356,341841},4561 => {1520,942298,935858},1892 => {1520,942170,622661},3200 => {1520,942233,423342},3838 => {1520,942264,209740},1851 => {1520,942168,653950},2754 => {1520,942212,33640},1070 => {1520,942131,162561},2007 => {1520,942176,139948},5684 => {1520,942352,809401},3236 => {1520,942235,178768},1784 => {1520,942165,434971},5493 => {1520,942343,692198},296 => {1520,942094,34340},3800 => {1520,942262,504984},6105 => {1520,942372,991976},947 => {1520,942125,264393},3917 => {1520,942268,...},...}}}],...},...]}

12:03:28.945 [error] [mzb_director16_0@127.0.0.1] <0.260.0> [ "pool1" ] Received DOWN from worker <0.425.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,97,184,98,0,3,117,10,109,0,0,0,150,149,34,42,205,204,7,113,29,116,209,233,26,177,42,102,115,67,13,72,126,183,186,55,156,244,32,244,196,96,120,213,207,100,198,167,154,184,1,199,77,152,25,172,234,41,170,43,219,224,82,123,166,95,46,77,193,66,232,95,84,208,50,234,169,251,89,208,49,37,18,112,173,209,254,149,225,27,52,225,123,151,120,22,171,107,50,147,66,1,11,43,199,58,96,214,32,170,146,26,238,87,134,241,30,82,158,192,78,160,44,157,89,56,41,116,132,243,175,241,91,66,214,101,170,252,68,221,10,56,123,153,184,128,244,222,118,71,136,97,251,134,190,123,198,64,234,32,2,0,0>>},{state,"127.0.0.1",1883,#Port<0.3627>,10067,"user1","passwd1",["loadtests-mqttbroker-id0","-","80"],true,undefined,undefined,0,<<>>,45000,60000,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,97,184,98,0,3,117,10,109,0,0,0,150,149,34,42,205,204,7,113,29,116,209,233,26,177,42,102,115,67,13,72,126,183,186,55,156,244,32,244,196,96,120,213,207,100,198,167,154,184,1,199,77,152,25,172,234,41,170,43,219,224,82,123,166,95,46,77,193,66,232,95,84,208,50,234,169,251,89,208,49,37,18,112,173,209,254,149,225,27,52,225,123,151,120,22,171,107,50,147,66,1,11,43,199,58,96,214,32,170,146,26,238,87,134,241,30,82,158,192,78,160,44,157,89,56,41,116,132,243,175,241,91,66,214,101,170,252,68,221,10,56,123,153,184,128,244,222,118,71,136,97,251,134,190,123,198,64,234>>,{dict,1,16,16,8,80,48,{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},{{[],[],[],[],[],[],[],[[ping|#Ref<0.0.2.14420>]],[],[],[],[],[],[],[],[]}}},{#Fun<mqtt_worker.0.79002790>,#{462 => {1520,942101,956633},704 => {1520,942113,570512},7994 => {1520,942463,858228},6850 => {1520,942408,989992},6836 => {1520,942408,308244},9765 => {1520,942548,817651},6653 => {1520,942399,546924},5961 => {1520,942366,249057},1328 => {1520,942143,523409},4351 => {1520,942288,891724},8373 => {1520,942481,993425},6749 => {1520,942404,163171},9406 => {1520,942538,183956},8441 => {1520,942485,263561},6570 => {1520,942395,514631},6074 => {1520,942371,739816},3590 => {1520,942252,140778},7636 => {1520,942446,668665},5934 => {1520,942365,40088},4631 => {1520,942302,324540},1935 => {1520,942172,674835},8406 => {1520,942483,578224},9860 => {1520,942553,379085},3742 => {1520,942259,659751},9221 => {1520,942522,697152},4969 => {1520,942318,685657},9846 => {1520,942552,700548},3216 => {1520,942234,342081},2992 => {1520,942223,515047},4395 => {1520,942291,51294},6546 => {1520,942394,376340},7109 => {1520,942421,359672},7738 => {1520,942451,591555},1792 => {1520,942165,797703},2339 => {1520,942192,54738},4380 => {1520,942290,345783},9697 => {1520,942545,544640},3212 => {1520,942234,98755},3091 => {1520,942228,212973},3521 => {1520,942248,925658},9091 => {1520,942516,458144},6330 => {1520,942383,991435},6415 => {1520,942388,22716},3079 => {1520,942227,630712},3184 => {1520,942232,810609},10024 => {1520,942561,271812},8243 => {1520,942475,752820},5075 => {1520,942323,888801},417 => {1520,942099,793803},3052 => {1520,942226,508555},513 => {1520,942104,417971},2633 => {1520,942206,161624},263 => {1520,942092,402318},8854 => {1520,942505,82268},6459 => {1520,942390,137703},525 => {1520,942104,978434},3951 => {1520,942269,806157},5572 => {1520,942347,629286},2380 => {1520,942194,17538},2528 => {1520,942201,122073},9362 => {1520,942538,177908},3883 => {1520,942266,443636},1013 => {1520,942128,401671},4193 => {1520,942281,212155},475 => {1520,942102,576783},3424 => {1520,942244,248090},500 => {1520,942103,780009},5673 => {1520,942352,520073},105 => {1520,942084,817880},4498 => {1520,942295,965698},8832 => {1520,942504,26568},8468 => {1520,942486,552593},8527 => {1520,942489,385659},9704 => {1520,942545,883011},3510 => {1520,942248,378666},8596 => {1520,...},...}}}],...},...]}

12:05:05.297 [error] [mzb_director16_0@127.0.0.1] <0.260.0> [ "pool1" ] Received DOWN from worker <0.513.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,97,9,98,0,4,59,200,109,0,0,0,150,93,158,59,126,85,182,34,181,21,192,92,139,108,105,203,134,39,114,220,224,137,139,127,40,191,135,12,110,132,163,114,42,10,100,63,84,71,117,126,72,112,185,73,142,24,115,31,51,103,12,3,167,18,181,118,166,6,120,57,155,170,140,103,67,5,68,193,210,103,105,56,14,208,178,175,210,244,250,28,1,235,223,15,74,30,125,205,187,133,26,165,155,81,63,27,207,80,37,229,20,226,148,92,244,84,220,26,182,180,122,7,12,230,210,13,181,195,194,31,116,197,146,246,251,53,28,170,171,169,85,36,48,246,179,159,220,96,31,32,2,0,0,32,2,0,0,32,2,0,0>>},{state,"127.0.0.1",1883,#Port<0.3699>,6451,"user1","passwd1",["loadtests-mqttbroker-id0","-","124"],true,undefined,undefined,0,<<>>,45000,60000,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,97,9,98,0,4,59,200,109,0,0,0,150,93,158,59,126,85,182,34,181,21,192,92,139,108,105,203,134,39,114,220,224,137,139,127,40,191,135,12,110,132,163,114,42,10,100,63,84,71,117,126,72,112,185,73,142,24,115,31,51,103,12,3,167,18,181,118,166,6,120,57,155,170,140,103,67,5,68,193,210,103,105,56,14,208,178,175,210,244,250,28,1,235,223,15,74,30,125,205,187,133,26,165,155,81,63,27,207,80,37,229,20,226,148,92,244,84,220,26,182,180,122,7,12,230,210,13,181,195,194,31,116,197,146,246,251,53,28,170,171,169,85,36,48,246,179,159,220,96,31,32,2,0,0,32,2,0,0>>,{dict,1,16,16,8,80,48,{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},{{[],[],[],[],[],[],[],[[ping|#Ref<0.0.1.16645>]],[],[],[],[],[],[],[],[]}}},{#Fun<mqtt_worker.0.79002790>,#{462 => {1520,942101,945436},704 => {1520,942113,554809},5961 => {1520,942365,947238},1328 => {1520,942143,513997},4351 => {1520,942288,624393},6074 => {1520,942371,387964},3590 => {1520,942252,157462},5934 => {1520,942364,721347},4631 => {1520,942302,210870},1935 => {1520,942172,644515},3742 => {1520,942259,397856},4969 => {1520,942318,469563},3216 => {1520,942234,244311},2992 => {1520,942223,550355},4395 => {1520,942290,877796},1792 => {1520,942165,781111},2339 => {1520,942192,37587},4380 => {1520,942290,160289},3212 => {1520,942233,991521},3091 => {1520,942228,241001},3521 => {1520,942248,940417},6330 => {1520,942383,626718},6415 => {1520,942387,813813},3079 => {1520,942227,657293},3184 => {1520,942232,713815},5075 => {1520,942323,540822},417 => {1520,942099,780624},3052 => {1520,942226,254856},513 => {1520,942104,418075},2633 => {1520,942206,147009},263 => {1520,942092,385837},525 => {1520,942104,963018},3951 => {1520,942269,547860},5572 => {1520,942347,356334},2380 => {1520,942194,2746},2528 => {1520,942201,108985},3883 => {1520,942266,260389},1013 => {1520,942128,386846},4193 => {1520,942281,104443},475 => {1520,942102,563414},3424 => {1520,942244,88588},500 => {1520,942103,762606},5673 => {1520,942352,124179},105 => {1520,942084,802956},4498 => {1520,942295,796972},3510 => {1520,942248,308227},5569 => {1520,942347,137163},5637 => {1520,942350,424729},3908 => {1520,942267,458418},878 => {1520,942121,907353},2468 => {1520,942198,237351},4606 => {1520,942301,58986},1513 => {1520,942152,390658},313 => {1520,942094,795573},2497 => {1520,942199,619367},2637 => {1520,942206,338795},3301 => {1520,942238,305514},1514 => {1520,942152,437772},3405 => {1520,942243,349390},3219 => {1520,942234,364551},6350 => {1520,942384,647730},5757 => {1520,942356,200530},4561 => {1520,942298,725093},1892 => {1520,942170,586056},3200 => {1520,942233,470976},3838 => {1520,942263,959536},1851 => {1520,942168,615041},2754 => {1520,942212,99201},1070 => {1520,942131,125664},2007 => {1520,942176,103821},5684 => {1520,942352,748979},6314 => {1520,942382,885190},6426 => {1520,942388,238540},3236 => {1520,942235,130914},1784 => {1520,942165,393875},5493 => {1520,942343,488330},296 => {1520,942093,...},...}}}],...},...]}

12:05:09.934 [error] [ API ] <0.10399.0> Benchmark result: FAILED
3 of 200 workers failed

12:05:10.069 [error] [ API ] <0.10358.0> Stage 'pipeline - running': failed
Benchmark has failed on running with reason:
{benchmark_failed,{workers_failed,3}}

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}]}]

12:05:40.194 [error] [ API ] <0.10909.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\n11606"; true "
Exit code: 1
Output: stdin: is not a tty
is: line 0: kill: stdin:: arguments must be process or job IDs

12:05:40.195 [error] [ API ] <0.10358.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\n11606"; true "
Command output: stdin: is not a tty
is: line 0: kill: stdin:: arguments must be process or job IDs
ioolkos commented 6 years ago

Your script is working for me. The only difference is that i set allow_anonymous to 'on' as I don't have your username and passwords configured. Can you connect to the broker with a MQTT client? do the provided credentials work? Do you see any kind of timeouts from the Loadbalancer? EDIT: and can you run the test by connecting directly to the broker IP?

a-wf commented 6 years ago

I can connect with the provided credentials I tried before without the loadbalancer, and there is no error message. However, I have a mqtt broker cluster (3 brokers) for having high availability. That why I am using the loadbalancer.

I will try again, and check the logs of loadbalancer.

Thank you @ioolkos , I will come back later :)

a-wf commented 6 years ago

@ioolkos Hi, I increased the max connection value in my Haproxy config, and mzbench's error messages disappear.
Thank you for your help ps: I have another question, will open a new issue