-1

问题:我无法通过 MQTT Publisher Client 将上行链路度量发布到 TTN(The Things Network,MQTT Broker)。按着这些次序...

  1. 安装的 Eclipse Mosquitto 提供了一个 CLI 来订阅和发布消息。

  2. 启动蚊子服务。 start mosquitto service

  3. 发布上行测量的 MQTT 命令:

    mosquitto_pub -h eu.thethings.network -p 1883 -u applicationid-P ttn-account-v2.xXXXXXXXXXXXXXXXXXXXXXXXXX -t applicationid/devices/deviceid/up -m '{"port":1,"payload_raw":"AWcAuw=="}' -d
    
  4. 订阅上行测量的 MQTT 命令:

    mosquitto_sub -h eu.thethings.network -p 1883 -u applicationid -P ttn-account-v2.x2Q20I2hDo1XXXXXXXXXXXXXXXXX -t applicationid/devices/deviceid/up
    
4

1 回答 1

1

Double check that you can really reach to this 52.169.76.255 host and 1883 port using telnet tool or equivalent, for example I cannot connect to this server.

According to WHOIS information the IP address belongs to Microsoft corporation so my expectation is that you're trying to test an application which is deployed in Azure cloud infrastructure. I would recommend checking if port 1883 is open for incoming connections and if not you will need to configure the VM and open the port (you might also need to do the same in the OS firewall)

Once you will be able to establish the connection using telnet (or equivalent) JMeter should also be able to connect and send/receive the messages.

以防万一,请查看为 IoT 测试 MQTT 消息代理 - 指南

于 2019-11-19T10:41:01.367 回答