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
  • Are all 5 connected to the same mobile operator network?
    When the issue occurs, can you try to ping or do a HTTP GET of e.g. google.com?

    I've heard that some mobile operators force devices of the network after a certain time, to get rid of ghosts. So it would be good to check if you are actually still connected to the network. It would be good to try a lte_lc_offline() followed by a new lte_lc_connect(), when the issue occurs.

Children
  • Hi,

    I have noticed that this happens due to the SIM provider. I logged into my sim data log and saw the events that take place. I normally see that the issue occurs when it says : PDP Context deleted.

    Normally it does this every day but again gets activated. But sometimes, the PDP context is deleted but not activated and I think that leads to this error. I am not sure if this could be resolved in code as this looks like the Sim provider issue in connecting to the cell tower.

    Regards,

    Adeel.

Related