gatling stress testing on AWS, threads staying in active

806 views Asked by At

I have set up two AMI(redhat) instances, one with an ActiveMQ 5.11 broker, the other with some stress testing tools (gatling w/ Mqtt, mqtt-stres, etc..). I stopped iptables service (firewall) on both instances. AWS security groups allow port 1883 for mqtt messaging.

Running mqtt-stress.py succeeds, it makes the round trip, and I get a message back from the broker. When I spin up a Gatling simulation, all the threads move to the 'Active' state and never make it to 'Done'. I even setup a broker on the same machine as Gatlin and pointed the Simulation to 'localhost', same result. Nothing appears in the simulation.log. tcpdump on the original server was showing that no incoming connections were being made. Here is the simulation:

import io.gatling.core.Predef._
import org.fusesource.mqtt.client.QoS
import scala.concurrent.duration._

import com.github.mnogu.gatling.mqtt.Predef._

class BasicMqttSimulation extends Simulation {
  val mqttConf = mqtt
    // MQTT broker
    //.host("tcp://127.0.0.1:1883")
    .host("tcp://175.10.130.10:1883")

  val scn = scenario("MQTT Test")
    .exec(mqtt("request")
      // topic: "foo"
      // payload: "Hello"
      // QoS: AT_LEAST_ONCE
      // retain: false
      .publish("foo", "Hello", QoS.AT_LEAST_ONCE, retain = false))

  setUp(
    scn
      .inject(constantUsersPerSec(10) during(10 seconds)))
    .protocols(mqttConf)
}

Any tips on how to trouble shoot this further?

1

There are 1 answers

0
Jimmy3Sticks On BEST ANSWER

Rebuilt the instances and tested step by step,

sudo setenforce 0 # did not survive a reboot

Need to add rules for SElinux.