This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

MQTT Sample code is not connecting

The sample code at ncs/nrf/samples/nrf9160/mqtt_simple is not connecting. I dod not make any changes to the ode. I am using NB-IoT. LTE is connected. The link monitor, LTE is in green. The error code is ERROR: mqtt_connect -60

Kindly advice to resolve this

Parents Reply
  • we tried again with ipv6 the mqtt now gets connected with test.mosquitto.org but gives following error

    LTE Link Connected!
    attempting to connect: IPv6 Address found 2001:41d0:a:fed0::1
    hello
    [mqtt_evt_handler:170] 
    MQTT client connected!
    Subscribing to: my/subscribe/topic len 18
    ERROR: mqtt_live -11
    [mqtt_evt_handler:176] 
    MQTT client disconnected 0
    attempting to connect: IPv6 Address found 2001:41d0:a:fed0::1

    but if we try cloud mqtt it get stuck with error 

    ERROR: getaddrinfo failed -11mqtt_connect -47

Children
Related