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,

    No, unfortunately it does not work after that. It works again when I manually reset it. 

    I am using 1nce Sim card : https://1nce.com/en/

    Yes, the sim has data, and the application works again after I reset it.

    I read a bit about this error and I think its related to the DNS address not being resolved automatically. 

    https://devzone.nordicsemi.com/f/nordic-q-a/60825/nrf9160-getaddrinfo-return-error--11

    But I wonder how can it happen suddenly after the application has been running smoothly for 6-7 days or more.

    For a work around to make it work smoothly now, I have just added a soft reset (sys_reboot(0)) when I get this error, but I am curious to know the reason of this error. The more stranger thing is that I have about 5 thingys running now and 3 of them had this issue at the same time and the other 2 did not have this issue !!

    So I was looking for the root cause of it that I could resolve.

    Regards,

    Adeel.

Children
Related