开发者社区> 问答> 正文

连接MQTT时遇到mbedtls_net_connect 250: getaddrinfo fail- errno: 0

hjman 2019-07-17 21:23:59 114
  1. branch(version):2.1.0
  2. Desktop OS(windows linux or macOS):windows
  3. 硬件平台:esp8266
  4. 用aliosthing 提供的linkapp编译出esp8266固件,开机连上WIFI后,再连MQTT服务器时出现getaddrinfo fail的问题,fail时用该站点是PING得通的。
  5. 问题LOG:
    [010560] -----------------------------------------

[010560] MQTT init success!
[010560] Loading the CA root certificate ...
[010590] ok (0 skipped)
[010590] Connecting to /a1hLygNX09G.iot-as-mqtt.cn-shanghai.aliyuncs.com/1883...
mbedtls_net_connect 250: getaddrinfo fail- errno: 0
[010690] failed ! net_connect returned -0x0052
[010690] ssl_disconnect
[010690] IOTX_CONN_CLOUD_FAIL
[010690] handle is NULL
[010690] TCP or TLS Connection failed
[010690] iotx_mc_connect failed
[010790] handle is NULL
[010790] mqtt disconnect!
[010890] mqtt release!

分享到
取消 提交回答
全部回答(0)

集结各类场景实战经验,助你开发运维畅行无忧

推荐文章
相似问题
推荐课程