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

Getting ERROR: getaddrinfo failed -11 in MQTT connection

Hi Dev team,

I have been working with the MQTT example and building up my application. I establish a successful connection with the broker and everything runs fine for 5-6 days. Then I get the (ERROR: getaddrinfo failed -11 ) error and the MQTT connection does not happen. I looked into the code and found that this error is because the broker's address is not obtained. 

I looked into the errno and found that -11 refers to "No more processes". 

I could not understand why this error comes up suddenly and how could I solve this issue.

Its strange because it comes up after things have been running smoothly. 

Regards,

Adeel.

Parents Reply
  • Hi Oyvind,

    I am connecting to a firm's broker and not the open source brokers like HIVE MQ. The connection works perfectly for 6-7 days, probably more than that (there is no specific fixed period after which I get this error).

    The keepalive is set to: 60 seconds. I am normally connecting to the MQTT broker after every hour, sending the data and then disconnecting from the broker.

    I just wanted to know what this addrinfo failed -11 means, as I get it just when the MQTT wants to connect to the broker.

    Regards,

    Adeel.

Children
Related