<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Device intermittent failures to connect to nRF Cloud MQTT broker (err: -111)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/126757/device-intermittent-failures-to-connect-to-nrf-cloud-mqtt-broker-err--111</link><description>Hi, 
 Intermittently, after a reset/restart some of our devices are unable to connect to the nRF Cloud MQTT broker: 
 [00:00:09.235,626] &amp;lt;inf&amp;gt; app_cloud_connection: Network connectivity gained! [00:00:10.236,114] &amp;lt;inf&amp;gt; app_cloud_connection: Network is</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 27 Mar 2026 12:52:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/126757/device-intermittent-failures-to-connect-to-nrf-cloud-mqtt-broker-err--111" /><item><title>RE: Device intermittent failures to connect to nRF Cloud MQTT broker (err: -111)</title><link>https://devzone.nordicsemi.com/thread/564185?ContentTypeID=1</link><pubDate>Fri, 27 Mar 2026 12:52:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:44ead7f1-959e-4812-ab24-714b99625b8c</guid><dc:creator>teba99</dc:creator><description>&lt;p&gt;Hi Pascal,&lt;/p&gt;
&lt;p&gt;Let&amp;#39;s close it for now. Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device intermittent failures to connect to nRF Cloud MQTT broker (err: -111)</title><link>https://devzone.nordicsemi.com/thread/564158?ContentTypeID=1</link><pubDate>Fri, 27 Mar 2026 09:22:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de625cc3-909e-41b5-977f-9f82d595833a</guid><dc:creator>Pascal Hdz</dc:creator><description>&lt;p&gt;Hello Terrence,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you need further assistance with this&amp;nbsp;ticket or could we close it?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Pascal.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device intermittent failures to connect to nRF Cloud MQTT broker (err: -111)</title><link>https://devzone.nordicsemi.com/thread/561472?ContentTypeID=1</link><pubDate>Wed, 18 Feb 2026 12:26:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe623cef-7ebd-476f-8d36-8fdcf2cc22a0</guid><dc:creator>Pascal Hdz</dc:creator><description>&lt;p&gt;Hello Terrence,&lt;/p&gt;
&lt;div data-ogsc="black"&gt;&lt;span data-ogsc="" data-olk-copy-source="MessageBody"&gt;The use of the conn_mgr feature is asynchronous, so it depends on the events. The following example demonstrates its use:&lt;/span&gt;&lt;/div&gt;
&lt;div data-ogsc="black"&gt;&lt;span data-ogsc="" data-olk-copy-source="MessageBody"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div data-ogsc="black"&gt;&lt;/div&gt;
&lt;div data-ogsc="black"&gt;&lt;span data-ogsc=""&gt;&lt;a id="OWAdf01a218-1470-7d5e-6012-9a8c253013ae" title="https://docs.zephyrproject.org/latest/connectivity/networking/conn_mgr/main.html#usage" href="https://docs.zephyrproject.org/latest/connectivity/networking/conn_mgr/main.html#usage" rel="noopener noreferrer" target="_blank" data-auth="NotApplicable" data-linkindex="0" data-ogsc=""&gt;https://docs.zephyrproject.org/latest/connectivity/networking/conn_mgr/main.html#usage&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div data-ogsc="black"&gt;&lt;span data-ogsc=""&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div data-ogsc="black"&gt;&lt;/div&gt;
&lt;div data-ogsc="black"&gt;
&lt;div data-ogsc="black"&gt;Your connection handler should be able to catch the disconnection event (&lt;span data-olk-copy-source="MessageBody"&gt;NET_EVENT_L4_DISCONNECTED)&lt;/span&gt;, and your application/business logic should be able to execute conn_mgr_all_if_connect(true) when it&amp;#39;s time to re-establish the connection. Using conn_mgr_all_if_disconnect(true) achieves the same result as using the lte_lc_power_off() wrapper, so for the sake of clarity,&amp;nbsp;you should&amp;nbsp;not combining them neither call them sequentially.&lt;/div&gt;
&lt;div data-ogsc="black"&gt;&lt;/div&gt;
&lt;div data-ogsc="black"&gt;Regards,&lt;br /&gt;Pascal.&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device intermittent failures to connect to nRF Cloud MQTT broker (err: -111)</title><link>https://devzone.nordicsemi.com/thread/561446?ContentTypeID=1</link><pubDate>Wed, 18 Feb 2026 09:01:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:041081f5-9745-43fb-ae02-f5404f06d6d0</guid><dc:creator>teba99</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks, Pascal. To close the loop on this:&lt;/p&gt;
&lt;p&gt;We still see the err: -111 occasionally (with and without SWD) and have not yet been able to reproduce it reliably or find the root cause. Sometimes it recovers by itself, but not always. We have found that the sequence of&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;conn_mgr_all_if_disconnect&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;true&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;lte_lc_offline&lt;/span&gt;&lt;span&gt;()&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;lte_lc_normal&lt;/span&gt;&lt;span&gt;()&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;conn_mgr_all_if_connect&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;true&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;usually restores the cloud connection in these circumstances (without a reboot).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We will also try MFW 2.0.4.&lt;/p&gt;
&lt;p&gt;Best,&lt;/p&gt;
&lt;p&gt;Terrence&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device intermittent failures to connect to nRF Cloud MQTT broker (err: -111)</title><link>https://devzone.nordicsemi.com/thread/561291?ContentTypeID=1</link><pubDate>Mon, 16 Feb 2026 18:49:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bea5f0c4-f996-47c1-8993-96de30072370</guid><dc:creator>Pascal Hdz</dc:creator><description>&lt;p&gt;Communication has continued through email.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Summary:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;They are using NCS&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;v2.9.0-7787b2649840 which had a bug on how the&amp;nbsp;port value was presented in the serial log, 45858 (0xB322) is 8883 (0x22B3)&amp;nbsp;with bytes swapped due the use of hton. This was fixed in this PR in v3.3.0-preview1:&lt;/span&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;a title="https://github.com/nrfconnect/sdk-nrf/commit/129b757e1f479e09928f1647f056fcb5a04948ec" href="https://github.com/nrfconnect/sdk-nrf/commit/129b757e1f479e09928f1647f056fcb5a04948ec" rel="noopener noreferrer" target="_blank"&gt;https://github.com/nrfconnect/sdk-nrf/commit/129b757e1f479e09928f1647f056fcb5a04948ec&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;I have requested to share a serial log with&amp;nbsp;&lt;span&gt;CONFIG_NRF_CLOUD_LOG_LEVEL_DBG enabled when the error happens.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;In a separate board, upgrade MFW to 2.0.4 and try to reproduce the error, share also the log with&amp;nbsp;CONFIG_NRF_CLOUD_LOG_LEVEL_DBG enabled.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;The error happens after executing a firmware upgrade of the application through SWD, I recommended to&amp;nbsp;&lt;span&gt;disable both the transmit and receive RF circuits and deactivate LTE and GNSS before executing the reset. This can be achieved by executing&amp;nbsp;lte_lc_power_off() and wait 10 seconds before the reset.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Pascal.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device intermittent failures to connect to nRF Cloud MQTT broker (err: -111)</title><link>https://devzone.nordicsemi.com/thread/560564?ContentTypeID=1</link><pubDate>Fri, 06 Feb 2026 15:42:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a6c377b-e063-4d2d-a98b-5a3d7857571c</guid><dc:creator>teba99</dc:creator><description>&lt;p&gt;Hi Pascal,&lt;/p&gt;
&lt;p&gt;I checked, we don&amp;#39;t change the port anywhere. But I think the message about port 45858 may be misleading ...&amp;nbsp;maybe it is an&amp;nbsp;ephemeral local port on the device side?&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:line-through;"&gt;In any case, I realized the problem is similar to one I reported a couple of months ago. I thought this was a different error, but it seems to be the same:&amp;nbsp;&lt;/span&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/122093/nrf9151-stuck-in-disconnected-unable-to-reconnect-to-lte-m"&gt;nRF9151 stuck in disconnected, unable to reconnect to LTE-M&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:line-through;"&gt;We&amp;#39;ll investigate this as a combination of SIM/network behavior and trying to reset the TCP connection/modem stack.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:line-through;"&gt;Apologies. I think this post can be closed as a duplicate.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Update: &lt;br /&gt;&lt;br /&gt;After some more debugging, I believe the issue here is different. The one I reported a few months ago is triggered specifically by SIM issues (e.g. deactivation), and&amp;nbsp;as a&amp;nbsp;follow-on&amp;nbsp;effect may result in&lt;span&gt;&amp;nbsp;err: -111.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In contrast, what I am reporting here is not triggered by SIM issues, but unprompted and seemingly random. &amp;quot;Could not connect to nRF Cloud MQTT Broker mqtt.nrfcloud.com, port: 45858. err: -111&amp;quot;&amp;nbsp;seems to happen at any time, on any device we are using, independent of the SIM or cellular network.&amp;nbsp; In our device population it is currently happening multiple times a day across devices.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Any advice or insight you have is appreciated.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device intermittent failures to connect to nRF Cloud MQTT broker (err: -111)</title><link>https://devzone.nordicsemi.com/thread/560556?ContentTypeID=1</link><pubDate>Fri, 06 Feb 2026 14:42:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8114b84f-959a-4768-bf62-8c188b71ea4b</guid><dc:creator>Pascal Hdz</dc:creator><description>&lt;p&gt;There might be something else in your application or configuration that might be changing this value.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Pascal.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device intermittent failures to connect to nRF Cloud MQTT broker (err: -111)</title><link>https://devzone.nordicsemi.com/thread/560524?ContentTypeID=1</link><pubDate>Fri, 06 Feb 2026 09:24:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca6975dc-0c4f-4ab9-be0d-5d109d7d30ed</guid><dc:creator>teba99</dc:creator><description>&lt;p&gt;Hi Pascal,&lt;/p&gt;
&lt;p&gt;We were wondering the same, we are not making any changes to the port or&amp;nbsp;&lt;span&gt;CONFIG_NRF_CLOUD_PORT&lt;/span&gt;.&lt;span&gt;&amp;nbsp;In zephyr/autoconf.h I see&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;#define&lt;/span&gt;&lt;span&gt; CONFIG_NRF_CLOUD_PORT &lt;/span&gt;&lt;span&gt;8883&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;Thanks&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device intermittent failures to connect to nRF Cloud MQTT broker (err: -111)</title><link>https://devzone.nordicsemi.com/thread/560521?ContentTypeID=1</link><pubDate>Fri, 06 Feb 2026 09:09:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a954862f-3edc-46d1-bcd0-f6b51a4ce49f</guid><dc:creator>Pascal Hdz</dc:creator><description>&lt;p&gt;Hello Terrence,&lt;/p&gt;
&lt;p&gt;Why is the port pointing to 45858? It should be 8883. Please verify if the configuration variable&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_NRF_CLOUD_PORT&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;has been changed in your project.&lt;/p&gt;
&lt;p&gt;Pascal.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device intermittent failures to connect to nRF Cloud MQTT broker (err: -111)</title><link>https://devzone.nordicsemi.com/thread/560251?ContentTypeID=1</link><pubDate>Tue, 03 Feb 2026 15:47:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:197b3a86-4629-4a74-a290-22e018c5b2de</guid><dc:creator>teba99</dc:creator><description>&lt;p&gt;Following up on this: I now have a log that shows the device tries to connect for 10+ minutes and keeps getting err: -111. But suddenly -- without any changes on our side -- the error is gone and the device is able to connect:&lt;/p&gt;
&lt;p&gt;[00:01:10.335,998] &amp;lt;inf&amp;gt; poc_app: Connecting over LTE..&lt;br /&gt;[00:01:17.039,184] &amp;lt;inf&amp;gt; poc_app: LTE connection established. Connecting to nRF Cloud..&lt;br /&gt;[00:02:11.483,795] &amp;lt;err&amp;gt; nrf_cloud_transport: Could not connect to nRF Cloud MQTT Broker mqtt.nrfcloud.com, port: 45858. err: -111&lt;br /&gt;[00:03:17.039,306] &amp;lt;wrn&amp;gt; cloud_connection: Could not connect to nRF Cloud, readiness timeout&lt;br /&gt;[00:03:17.039,337] &amp;lt;wrn&amp;gt; poc_app: Failed to establish connection to nRF Cloud&lt;br /&gt;[00:03:22.039,428] &amp;lt;inf&amp;gt; poc_app: Connecting over LTE..&lt;br /&gt;[00:03:22.048,675] &amp;lt;inf&amp;gt; poc_app: LTE connection established. Connecting to nRF Cloud..&lt;br /&gt;[00:04:16.512,054] &amp;lt;err&amp;gt; nrf_cloud_transport: Could not connect to nRF Cloud MQTT Broker mqtt.nrfcloud.com, port: 45858. err: -111&lt;br /&gt;[00:05:22.048,767] &amp;lt;wrn&amp;gt; cloud_connection: Could not connect to nRF Cloud, readiness timeout&lt;br /&gt;[00:05:22.048,797] &amp;lt;wrn&amp;gt; poc_app: Failed to establish connection to nRF Cloud&lt;br /&gt;[00:05:27.048,858] &amp;lt;inf&amp;gt; poc_app: Connecting over LTE..&lt;br /&gt;[00:05:27.058,135] &amp;lt;inf&amp;gt; poc_app: LTE connection established. Connecting to nRF Cloud..&lt;br /&gt;[00:06:21.523,834] &amp;lt;err&amp;gt; nrf_cloud_transport: Could not connect to nRF Cloud MQTT Broker mqtt.nrfcloud.com, port: 45858. err: -111&lt;br /&gt;[00:07:27.058,227] &amp;lt;wrn&amp;gt; cloud_connection: Could not connect to nRF Cloud, readiness timeout&lt;br /&gt;[00:07:27.058,258] &amp;lt;wrn&amp;gt; poc_app: Failed to establish connection to nRF Cloud&lt;br /&gt;[00:07:32.058,349] &amp;lt;inf&amp;gt; poc_app: Connecting over LTE..&lt;br /&gt;[00:07:32.067,596] &amp;lt;inf&amp;gt; poc_app: LTE connection established. Connecting to nRF Cloud..&lt;br /&gt;[00:08:26.502,868] &amp;lt;err&amp;gt; nrf_cloud_transport: Could not connect to nRF Cloud MQTT Broker mqtt.nrfcloud.com, port: 45858. err: -111&lt;br /&gt;[00:09:32.067,687] &amp;lt;wrn&amp;gt; cloud_connection: Could not connect to nRF Cloud, readiness timeout&lt;br /&gt;[00:09:32.067,718] &amp;lt;wrn&amp;gt; poc_app: Failed to establish connection to nRF Cloud&lt;br /&gt;[00:09:37.067,810] &amp;lt;inf&amp;gt; poc_app: Connecting over LTE..&lt;br /&gt;[00:09:37.077,087] &amp;lt;inf&amp;gt; poc_app: LTE connection established. Connecting to nRF Cloud..&lt;br /&gt;[00:10:31.627,929] &amp;lt;err&amp;gt; nrf_cloud_transport: Could not connect to nRF Cloud MQTT Broker mqtt.nrfcloud.com, port: 45858. err: -111&lt;br /&gt;[00:11:37.077,178] &amp;lt;wrn&amp;gt; cloud_connection: Could not connect to nRF Cloud, readiness timeout&lt;br /&gt;[00:11:37.077,209] &amp;lt;wrn&amp;gt; poc_app: Failed to establish connection to nRF Cloud&lt;br /&gt;[00:11:42.077,301] &amp;lt;inf&amp;gt; poc_app: Connecting over LTE..&lt;br /&gt;[00:11:42.086,578] &amp;lt;inf&amp;gt; poc_app: LTE connection established. Connecting to nRF Cloud.&lt;br /&gt;[00:12:16.288,696] &amp;lt;inf&amp;gt; cloud_connection: Connection to nRF Cloud established and ready&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>