【问题标题】:gatling stress testing on AWS, threads staying in activeAWS 上的加特林压力测试,线程保持活动状态
【发布时间】:2015-06-13 00:44:54
【问题描述】:

我设置了两个 AMI(redhat) 实例,一个带有 ActiveMQ 5.11 代理,另一个带有一些压力测试工具(gatling w/ Mqtt、mqtt-stres 等)。我在两个实例上都停止了 iptables 服务(防火墙)。 AWS 安全组允许端口 1883 用于 mqtt 消息传递。

运行 mqtt-stress.py 成功,它进行了往返,我从代理收到了一条消息。当我启动 Gatling 模拟时,所有线程都进入“活动”状态,并且永远不会进入“完成”状态。我什至在与 Gatlin 相同的机器上设置了一个代理,并将模拟指向“localhost”,结果相同。 Simulation.log 中没有任何内容。原始服务器上的 tcpdump 显示没有传入连接。这是模拟:

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

关于如何进一步解决此问题的任何提示?

【问题讨论】:

标签: amazon-web-services activemq redhat mqtt gatling


【解决方案1】:

重建实例并逐步测试,

sudo setenforce 0 # 重启后无法幸存

需要为SElinux添加规则。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-03-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多