Closed bouff closed 2 years ago
Just to clarify a couple things:
Just to clarify a couple things:
- Are you seeing the client lose connection without it retrying to open the connection?
My apologies, I truncated the part of the logs that show retrying to open the connection. I'll provide a new, complete set of logs in a new separate comment.
- Do you re-open the client after getting the final DISCONNECTED callback?
We re-open the client under certain circumstances.
We don't when the change reason is IotHubConnectionStatusChangeReason.CLIENT_CLOSE
, since we expect this case to be reserved for graceful disconnects (as per javadoc). For this case, we take no action.
For IotHubConnectionStatusChangeReason.COMMUNICATION_ERROR
or IotHubConnectionStatusChangeReason.RETRY_EXPIRED
, we keep the same instance of DeviceClient
and re-open (we call closeNow()
followed by open()
).
For all other cases, we re-initialize (we call closeNow()
on the current instance and then create a new instance of DeviceClient
).
- Are you setting any custom retry policy on the client, or are you using the default?
We are using the default retry policy.
Here's a complete sequence of events - with logs at every step.
Steady state prior to network disconnect. RPC call working, Twin updates are received, and events are sent:
Feb 11 23:30:07 somehost some.app[200511]: 23:30:07.553 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CxnREDACTEDUUID1-azure-iot-sdk-IotHubSendTask] DEBUG c.m.a.s.i.d.t.IotHubTransport - Invoking the callback function for sent message, IoT Hub responded to message ( Message details: Correlation Id [2f70e45e-a265-440f-8d05-3c4722227a12] Message Id [59c61311-4277-4846-bfb3-0bd8df338bc0] ) with status OK_EMPTY
At 23:30:18, network disconnect begins. (Reconnection will take place approximately 2 minutes from this point in time).
Shortly after the disconnect, we start seeing messages expire:
Feb 11 23:31:09 somehost some.app[200511]: 23:31:09.520 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CxnREDACTEDUUID1-azure-iot-sdk-IotHubSendTask] DEBUG c.m.a.s.i.d.t.IotHubTransport - Invoking the callback function for sent message, IoT Hub responded to message ( Message details: Correlation Id [bd395d5e-b748-4baa-b6f0-255e45e91481] Message Id [9d13b96f-5ee0-4136-a21c-793b298d6a3e] ) with status MESSAGE_EXPIRED
Feb 11 23:31:40 somehost some.app[200511]: 23:31:40.546 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CxnREDACTEDUUID1-azure-iot-sdk-IotHubSendTask] DEBUG c.m.a.s.i.d.t.IotHubTransport - Invoking the callback function for sent message, IoT Hub responded to message ( Message details: Correlation Id [83da7c33-3bc6-49e9-ad23-f4fdc9fb6d95] Message Id [ff9e0dbf-6028-4e71-ac9e-de8bcaee439a] ) with status MESSAGE_EXPIRED
Feb 11 23:32:11 somehost some.app[200511]: 23:32:11.577 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CxnREDACTEDUUID1-azure-iot-sdk-IotHubSendTask] DEBUG c.m.a.s.i.d.t.IotHubTransport - Invoking the callback function for sent message, IoT Hub responded to message ( Message details: Correlation Id [516054d3-888b-4c9b-9eb2-d7556bd76b67] Message Id [2b35de5b-93a5-4cfd-a831-7629aac6bf2d] ) with status MESSAGE_EXPIRED
Feb 11 23:32:42 somehost some.app[200511]: 23:32:42.603 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CxnREDACTEDUUID1-azure-iot-sdk-IotHubSendTask] DEBUG c.m.a.s.i.d.t.IotHubTransport - Invoking the callback function for sent message, IoT Hub responded to message ( Message details: Correlation Id [276ef3e5-6f25-4812-9beb-fffe054d586d] Message Id [ad5fbcaf-3046-48c4-b778-c94464f944b8] ) with status MESSAGE_EXPIRED
Feb 11 23:33:13 somehost some.app[200511]: 23:33:13.629 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CxnREDACTEDUUID1-azure-iot-sdk-IotHubSendTask] DEBUG c.m.a.s.i.d.t.IotHubTransport - Invoking the callback function for sent message, IoT Hub responded to message ( Message details: Correlation Id [3d3ad72b-e497-4305-aa74-979fba4a2667] Message Id [c766b4b3-251c-42f1-8178-5ca5231c48dd] ) with status MESSAGE_EXPIRED
Feb 11 23:33:44 somehost some.app[200511]: 23:33:44.665 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CxnREDACTEDUUID1-azure-iot-sdk-IotHubSendTask] DEBUG c.m.a.s.i.d.t.IotHubTransport - Invoking the callback function for sent message, IoT Hub responded to message ( Message details: Correlation Id [e928c48c-e517-404b-9c12-7b9d7eca1901] Message Id [602f4840-d474-464f-adae-e494e252f54c] ) with status MESSAGE_EXPIRED
At 23:32:45, network connectivity is restored
Approximately 1 minute after reconnecting, the SDK closes the current connection. Later on, that original connection is reconnected. A second connection is established.
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.569 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] ERROR c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Amqp transport error occurred, calling onConnectionLocalClose
Feb 11 23:33:57 somehost some.app[200511]: com.microsoft.azure.sdk.iot.device.transport.amqps.exceptions.AmqpConnectionFramingErrorException: connection aborted
Feb 11 23:33:57 somehost some.app[200511]: at com.microsoft.azure.sdk.iot.device.transport.amqps.AmqpsExceptionTranslator.convertFromAmqpException(AmqpsExceptionTranslator.java:44)
Feb 11 23:33:57 somehost some.app[200511]: at com.microsoft.azure.sdk.iot.device.transport.amqps.AmqpsIotHubConnection.onTransportError(AmqpsIotHubConnection.java:581)
Feb 11 23:33:57 somehost some.app[200511]: at org.apache.qpid.proton.engine.BaseHandler.handle(BaseHandler.java:191)
Feb 11 23:33:57 somehost some.app[200511]: at org.apache.qpid.proton.engine.impl.EventImpl.dispatch(EventImpl.java:108)
Feb 11 23:33:57 somehost some.app[200511]: at org.apache.qpid.proton.reactor.impl.ReactorImpl.dispatch(ReactorImpl.java:324)
Feb 11 23:33:57 somehost some.app[200511]: at org.apache.qpid.proton.reactor.impl.ReactorImpl.process(ReactorImpl.java:291)
Feb 11 23:33:57 somehost some.app[200511]: at com.microsoft.azure.sdk.iot.device.transport.amqps.ReactorRunner.call(ReactorRunner.java:50)
Feb 11 23:33:57 somehost some.app[200511]: at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
Feb 11 23:33:57 somehost some.app[200511]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
Feb 11 23:33:57 somehost some.app[200511]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
Feb 11 23:33:57 somehost some.app[200511]: at java.base/java.lang.Thread.run(Thread.java:829)
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.570 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] DEBUG c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Amqp connection closed locally, shutting down all active sessions...
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.570 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - onSessionClosedAsExpected callback executed, notifying transport layer
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.570 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] DEBUG c.m.a.s.i.d.t.IotHubTransport - The device session in the multiplexed connection to the IoT Hub has been lost for device REDACTEDIOTID
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.570 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] DEBUG c.m.a.s.i.d.t.IotHubTransport - Updating device REDACTEDIOTID status to new status DISCONNECTED with reason CLIENT_CLOSE
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.570 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] DEBUG c.m.a.s.i.d.t.IotHubTransport - Invoking connection status callbacks with new status details
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.570 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] INFO o.o.d.AzureDeviceClientProvider - Connection status [DISCONNECTED]: CLIENT_CLOSE
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.571 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] INFO o.o.d.AzureDeviceClientProvider - Notified that client was disconnected. Will not reconnect.
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.571 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] DEBUG c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Shutting down cbs session...
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.571 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsCbsSessionHandler - Closing this CBS session
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.571 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Closing reactor since connection has closed
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.574 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] INFO c.m.a.s.i.d.t.IotHubTransport - Handling a disconnection event
Feb 11 23:33:57 somehost some.app[200511]: com.microsoft.azure.sdk.iot.device.exceptions.TransportException: org.apache.qpid.proton.engine.HandlerException: java.lang.NullPointerException
Feb 11 23:33:57 somehost some.app[200511]: at com.microsoft.azure.sdk.iot.device.transport.amqps.ReactorRunner.call(ReactorRunner.java:59)
Feb 11 23:33:57 somehost some.app[200511]: at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
Feb 11 23:33:57 somehost some.app[200511]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
Feb 11 23:33:57 somehost some.app[200511]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
Feb 11 23:33:57 somehost some.app[200511]: at java.base/java.lang.Thread.run(Thread.java:829)
Feb 11 23:33:57 somehost some.app[200511]: Caused by: org.apache.qpid.proton.engine.HandlerException: java.lang.NullPointerException
Feb 11 23:33:57 somehost some.app[200511]: at org.apache.qpid.proton.engine.impl.EventImpl.dispatch(EventImpl.java:112)
Feb 11 23:33:57 somehost some.app[200511]: at org.apache.qpid.proton.reactor.impl.ReactorImpl.dispatch(ReactorImpl.java:324)
Feb 11 23:33:57 somehost some.app[200511]: at org.apache.qpid.proton.reactor.impl.ReactorImpl.process(ReactorImpl.java:292)
Feb 11 23:33:57 somehost some.app[200511]: at com.microsoft.azure.sdk.iot.device.transport.amqps.ReactorRunner.call(ReactorRunner.java:50)
Feb 11 23:33:57 somehost some.app[200511]: ... 4 common frames omitted
Feb 11 23:33:57 somehost some.app[200511]: Caused by: java.lang.NullPointerException: null
Feb 11 23:33:57 somehost some.app[200511]: at org.apache.qpid.proton.reactor.impl.SelectorImpl.update(SelectorImpl.java:80)
Feb 11 23:33:57 somehost some.app[200511]: at org.apache.qpid.proton.reactor.impl.IOHandler.onUnhandled(IOHandler.java:378)
Feb 11 23:33:57 somehost some.app[200511]: at org.apache.qpid.proton.engine.BaseHandler.onSelectableWritable(BaseHandler.java:95)
Feb 11 23:33:57 somehost some.app[200511]: at org.apache.qpid.proton.engine.BaseHandler.handle(BaseHandler.java:227)
Feb 11 23:33:57 somehost some.app[200511]: at org.apache.qpid.proton.engine.impl.EventImpl.dispatch(EventImpl.java:108)
Feb 11 23:33:57 somehost some.app[200511]: ... 7 common frames omitted
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.574 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.IotHubTransport - Due to disconnection event, clearing active queues, and re-queueing them to waiting queues to be re-processed later upon reconnection
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.575 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CxnREDACTEDUUID1-azure-iot-sdk-IotHubSendTask] WARN c.m.azure.sdk.iot.device.Message - The message with correlation id 2903ac60-1601-4811-b8a5-cdbfd6dc333c expired
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.575 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CxnREDACTEDUUID1-azure-iot-sdk-IotHubSendTask] DEBUG c.m.a.s.i.d.t.IotHubTransport - Invoking the callback function for sent message, IoT Hub responded to message ( Message details: Correlation Id [2903ac60-1601-4811-b8a5-cdbfd6dc333c] Message Id [a4c483bc-e570-4368-b266-fea8b943cb15] ) with status MESSAGE_EXPIRED
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.575 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] DEBUG c.m.a.s.i.d.t.IotHubTransport - Mapping throwable to NO_NETWORK because it was a retryable exception
Feb 11 23:33:57 somehost some.app[200511]: com.microsoft.azure.sdk.iot.device.exceptions.TransportException: org.apache.qpid.proton.engine.HandlerException: java.lang.NullPointerException
Feb 11 23:33:57 somehost some.app[200511]: at com.microsoft.azure.sdk.iot.device.transport.amqps.ReactorRunner.call(ReactorRunner.java:59)
Feb 11 23:33:57 somehost some.app[200511]: at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
Feb 11 23:33:57 somehost some.app[200511]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
Feb 11 23:33:57 somehost some.app[200511]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
Feb 11 23:33:57 somehost some.app[200511]: at java.base/java.lang.Thread.run(Thread.java:829)
Feb 11 23:33:57 somehost some.app[200511]: Caused by: org.apache.qpid.proton.engine.HandlerException: java.lang.NullPointerException
Feb 11 23:33:57 somehost some.app[200511]: at org.apache.qpid.proton.engine.impl.EventImpl.dispatch(EventImpl.java:112)
Feb 11 23:33:57 somehost some.app[200511]: at org.apache.qpid.proton.reactor.impl.ReactorImpl.dispatch(ReactorImpl.java:324)
Feb 11 23:33:57 somehost some.app[200511]: at org.apache.qpid.proton.reactor.impl.ReactorImpl.process(ReactorImpl.java:292)
Feb 11 23:33:57 somehost some.app[200511]: at com.microsoft.azure.sdk.iot.device.transport.amqps.ReactorRunner.call(ReactorRunner.java:50)
Feb 11 23:33:57 somehost some.app[200511]: ... 4 common frames omitted
Feb 11 23:33:57 somehost some.app[200511]: Caused by: java.lang.NullPointerException: null
Feb 11 23:33:57 somehost some.app[200511]: at org.apache.qpid.proton.reactor.impl.SelectorImpl.update(SelectorImpl.java:80)
Feb 11 23:33:57 somehost some.app[200511]: at org.apache.qpid.proton.reactor.impl.IOHandler.onUnhandled(IOHandler.java:378)
Feb 11 23:33:57 somehost some.app[200511]: at org.apache.qpid.proton.engine.BaseHandler.onSelectableWritable(BaseHandler.java:95)
Feb 11 23:33:57 somehost some.app[200511]: at org.apache.qpid.proton.engine.BaseHandler.handle(BaseHandler.java:227)
Feb 11 23:33:57 somehost some.app[200511]: at org.apache.qpid.proton.engine.impl.EventImpl.dispatch(EventImpl.java:108)
Feb 11 23:33:57 somehost some.app[200511]: ... 7 common frames omitted
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.576 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] WARN c.m.a.s.i.d.t.IotHubTransport - Updating transport status to new status DISCONNECTED_RETRYING with reason NO_NETWORK
Feb 11 23:33:57 somehost some.app[200511]: com.microsoft.azure.sdk.iot.device.exceptions.TransportException: org.apache.qpid.proton.engine.HandlerException: java.lang.NullPointerException
Feb 11 23:33:57 somehost some.app[200511]: at com.microsoft.azure.sdk.iot.device.transport.amqps.ReactorRunner.call(ReactorRunner.java:59)
Feb 11 23:33:57 somehost some.app[200511]: at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
Feb 11 23:33:57 somehost some.app[200511]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
Feb 11 23:33:57 somehost some.app[200511]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
Feb 11 23:33:57 somehost some.app[200511]: at java.base/java.lang.Thread.run(Thread.java:829)
Feb 11 23:33:57 somehost some.app[200511]: Caused by: org.apache.qpid.proton.engine.HandlerException: java.lang.NullPointerException
Feb 11 23:33:57 somehost some.app[200511]: at org.apache.qpid.proton.engine.impl.EventImpl.dispatch(EventImpl.java:112)
Feb 11 23:33:57 somehost some.app[200511]: at org.apache.qpid.proton.reactor.impl.ReactorImpl.dispatch(ReactorImpl.java:324)
Feb 11 23:33:57 somehost some.app[200511]: at org.apache.qpid.proton.reactor.impl.ReactorImpl.process(ReactorImpl.java:292)
Feb 11 23:33:57 somehost some.app[200511]: at com.microsoft.azure.sdk.iot.device.transport.amqps.ReactorRunner.call(ReactorRunner.java:50)
Feb 11 23:33:57 somehost some.app[200511]: ... 4 common frames omitted
Feb 11 23:33:57 somehost some.app[200511]: Caused by: java.lang.NullPointerException: null
Feb 11 23:33:57 somehost some.app[200511]: at org.apache.qpid.proton.reactor.impl.SelectorImpl.update(SelectorImpl.java:80)
Feb 11 23:33:57 somehost some.app[200511]: at org.apache.qpid.proton.reactor.impl.IOHandler.onUnhandled(IOHandler.java:378)
Feb 11 23:33:57 somehost some.app[200511]: at org.apache.qpid.proton.engine.BaseHandler.onSelectableWritable(BaseHandler.java:95)
Feb 11 23:33:57 somehost some.app[200511]: at org.apache.qpid.proton.engine.BaseHandler.handle(BaseHandler.java:227)
Feb 11 23:33:57 somehost some.app[200511]: at org.apache.qpid.proton.engine.impl.EventImpl.dispatch(EventImpl.java:108)
Feb 11 23:33:57 somehost some.app[200511]: ... 7 common frames omitted
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.576 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.azure.sdk.iot.device.DeviceIO - DeviceIO notified of status DISCONNECTED_RETRYING with reason NO_NETWORK
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.577 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.azure.sdk.iot.device.DeviceIO - Shutting down sendTaskScheduler
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.578 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.azure.sdk.iot.device.DeviceIO - Shutting down receiveTaskScheduler
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.578 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] DEBUG c.m.a.s.i.d.t.IotHubTransport - Invoking connection status callbacks with new status details
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.578 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CxnREDACTEDUUID1-azure-iot-sdk-IotHubReceiveTask] TRACE c.m.a.s.i.d.t.IotHubReceiveTask - Interrupted while waiting for work. Thread is now ending.
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.578 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] INFO o.o.d.AzureDeviceClientProvider - Connection status [DISCONNECTED_RETRYING]: NO_NETWORK
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.579 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] DEBUG c.m.a.s.i.d.t.IotHubTransport - Starting reconnection logic
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.579 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.IotHubTransport - Attempting reconnect attempt 0
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.580 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] DEBUG c.m.a.s.i.d.transport.RetryDecision - NOTE: A new instance of RetryDecision has been created with retry enabled, the client will retry after 210 milliseconds
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.581 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.IotHubTransport - Sleeping between reconnect attempts
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.791 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.IotHubTransport - Attempting to close and re-open the iot hub transport connection...
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.792 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] DEBUG c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Shutting down amqp layer...
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.792 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - CloseAsync called for amqp connection
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.793 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Closing amqp connection
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.793 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Waiting for reactor to close...
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.793 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Shutdown of executor service has started
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.794 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Shutdown of executor service completed
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.794 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Amqp connection closed successfully
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.794 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] DEBUG c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Opening amqp layer...
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.795 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Initializing authentication link latch count to 1
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.795 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Initializing device session latch for device REDACTEDIOTID
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.795 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - OpenAsnyc called for amqp connection
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.795 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Creating new executor service
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.796 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Waiting for authentication links to open...
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.798 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Shutdown of executor service has started
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.798 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Shutdown of executor service completed
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.799 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] WARN c.m.a.s.i.d.t.IotHubTransport - Failed to close and re-open the iot hub transport connection, checking if another retry attempt should be made
Feb 11 23:33:57 somehost some.app[200511]: com.microsoft.azure.sdk.iot.device.exceptions.TransportException: Interrupted while waiting for links to open for AMQP connection
Feb 11 23:33:57 somehost some.app[200511]: at com.microsoft.azure.sdk.iot.device.transport.amqps.AmqpsIotHubConnection.open(AmqpsIotHubConnection.java:316)
Feb 11 23:33:57 somehost some.app[200511]: at com.microsoft.azure.sdk.iot.device.transport.IotHubTransport.openConnection(IotHubTransport.java:1161)
Feb 11 23:33:57 somehost some.app[200511]: at com.microsoft.azure.sdk.iot.device.transport.IotHubTransport.singleReconnectAttempt(IotHubTransport.java:1369)
Feb 11 23:33:57 somehost some.app[200511]: at com.microsoft.azure.sdk.iot.device.transport.IotHubTransport.reconnect(IotHubTransport.java:1309)
Feb 11 23:33:57 somehost some.app[200511]: at com.microsoft.azure.sdk.iot.device.transport.IotHubTransport.handleDisconnection(IotHubTransport.java:1190)
Feb 11 23:33:57 somehost some.app[200511]: at com.microsoft.azure.sdk.iot.device.transport.IotHubTransport.onConnectionLost(IotHubTransport.java:331)
Feb 11 23:33:57 somehost some.app[200511]: at com.microsoft.azure.sdk.iot.device.transport.amqps.ReactorRunner.call(ReactorRunner.java:69)
Feb 11 23:33:57 somehost some.app[200511]: at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
Feb 11 23:33:57 somehost some.app[200511]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
Feb 11 23:33:57 somehost some.app[200511]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
Feb 11 23:33:57 somehost some.app[200511]: at java.base/java.lang.Thread.run(Thread.java:829)
Feb 11 23:33:57 somehost some.app[200511]: Caused by: java.lang.InterruptedException: null
Feb 11 23:33:57 somehost some.app[200511]: at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1367)
Feb 11 23:33:57 somehost some.app[200511]: at java.base/java.util.concurrent.CountDownLatch.await(CountDownLatch.java:278)
Feb 11 23:33:57 somehost some.app[200511]: at com.microsoft.azure.sdk.iot.device.transport.amqps.AmqpsIotHubConnection.open(AmqpsIotHubConnection.java:259)
Feb 11 23:33:57 somehost some.app[200511]: ... 10 common frames omitted
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.800 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.IotHubTransport - Attempting reconnect attempt 1
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.801 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] DEBUG c.m.a.s.i.d.transport.RetryDecision - NOTE: A new instance of RetryDecision has been created with retry enabled, the client will retry after 430 milliseconds
Feb 11 23:33:57 somehost some.app[200511]: 23:33:57.801 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.IotHubTransport - Sleeping between reconnect attempts
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.231 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.IotHubTransport - Attempting to close and re-open the iot hub transport connection...
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.232 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] DEBUG c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Shutting down amqp layer...
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.232 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - CloseAsync called for amqp connection
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.232 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Closing amqp connection
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.232 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Waiting for reactor to close...
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.233 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Amqp connection closed successfully
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.233 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] DEBUG c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Opening amqp layer...
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.234 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Initializing authentication link latch count to 1
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.234 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Initializing device session latch for device REDACTEDIOTID
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.234 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - OpenAsnyc called for amqp connection
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.235 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Creating new executor service
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.236 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Waiting for authentication links to open...
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.239 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Amqp connection opened locally
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.240 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsSessionHandler - Opening device session for device REDACTEDIOTID
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.244 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] DEBUG c.m.a.s.i.d.t.a.AmqpsCbsSessionHandler - Opening Cbs session handler
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.245 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsSessionHandler - Device session opened locally for device REDACTEDIOTID
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.325 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsSenderLinkHandler - Opening cbs sender link with address $cbs and link correlation id 7815f8b8-bcda-4ce7-9084-76440bed443c
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.326 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsReceiverLinkHandler - Opening cbs receiver link with address $cbs and link correlation id d2cab06b-65e1-419d-afd8-2f844b56dc6e
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.327 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsSenderLinkHandler - cbs sender link with address $cbs and link correlation id 7815f8b8-bcda-4ce7-9084-76440bed443c opened locally
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.327 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsReceiverLinkHandler - cbs receiver link with address $cbs and link correlation id d2cab06b-65e1-419d-afd8-2f844b56dc6e opened locally
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.328 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.LoggingFlowController - Flowing 1024 credit(s) back to service on receiver link with address $cbs and correlation id d2cab06b-65e1-419d-afd8-2f844b56dc6e
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.493 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Amqp connection opened remotely
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.493 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsCbsSessionHandler - CBS session opened remotely
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.497 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsSessionHandler - Device session opened remotely for device REDACTEDIOTID
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.497 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] DEBUG c.m.a.s.i.d.t.a.AmqpsSenderLinkHandler - cbs sender link with address $cbs and link correlation id 7815f8b8-bcda-4ce7-9084-76440bed443c was successfully opened
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.497 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] WARN c.m.a.s.i.d.t.a.AmqpsSenderLinkHandler - No flow controller detected in cbs link with address $cbs and link correlation id 7815f8b8-bcda-4ce7-9084-76440bed443c. Adding a new flow controller.
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.498 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsSenderLinkHandler - Link flow received on cbs sender link with address $cbs and link correlation id 7815f8b8-bcda-4ce7-9084-76440bed443c. Current link credit is now 100.
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.498 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] DEBUG c.m.a.s.i.d.t.a.AmqpsReceiverLinkHandler - cbs receiver link with address $cbs and link correlation id d2cab06b-65e1-419d-afd8-2f844b56dc6e was successfully opened
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.499 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsCbsSessionHandler - CBS session opened successfully, notifying connection layer to start sending authentication messages
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.499 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Authentication session opened, counting down the authentication session opening latch
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.499 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] DEBUG c.m.a.s.i.d.t.a.AmqpsSasTokenRenewalHandler - Sending authentication message for device REDACTEDIOTID
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.499 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Waiting for device sessions to open...
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.518 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsSenderLinkHandler - Sending 390 bytes over the amqp cbs sender link with address $cbs and link correlation id 7815f8b8-bcda-4ce7-9084-76440bed443c with link credit
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.518 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsSenderLinkHandler - Message was sent over cbs sender link with address $cbs and link correlation id 7815f8b8-bcda-4ce7-9084-76440bed443c with delivery tag 1
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.519 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsSenderLinkHandler - Current link credit on cbs sender link with address $cbs and link correlation id 7815f8b8-bcda-4ce7-9084-76440bed443c is 99
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.519 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsSasTokenRenewalHandler - Scheduling proactive sas token renewal for device REDACTEDIOTID in 3060000 milliseconds
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.521 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsSenderLinkHandler - Link flow received on cbs sender link with address $cbs and link correlation id 7815f8b8-bcda-4ce7-9084-76440bed443c. Current link credit is now 99.
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.569 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsCbsReceiverLinkHandler - Received a message on the CBS receiver link
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.570 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsReceiverLinkHandler - read 83 bytes from cbs receiver link with address $cbs and link correlation id d2cab06b-65e1-419d-afd8-2f844b56dc6e
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.570 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] DEBUG c.m.a.s.i.d.t.a.AmqpsSasTokenRenewalHandler - CBS message authentication succeeded for device REDACTEDIOTID
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.571 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.LoggingFlowController - Flowing 1 credit(s) back to service on receiver link with address $cbs and correlation id d2cab06b-65e1-419d-afd8-2f844b56dc6e
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.572 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsSenderLinkHandler - Opening telemetry sender link with address /devices/REDACTEDIOTID/messages/events and link correlation id 41038f4f-a5d5-44ef-96db-df53385307bf
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.572 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsReceiverLinkHandler - Opening telemetry receiver link with address /devices/REDACTEDIOTID/messages/devicebound and link correlation id 41038f4f-a5d5-44ef-96db-df53385307bf
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.576 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsSenderLinkHandler - telemetry sender link with address /devices/REDACTEDIOTID/messages/events and link correlation id 41038f4f-a5d5-44ef-96db-df53385307bf opened locally
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.577 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsReceiverLinkHandler - telemetry receiver link with address /devices/REDACTEDIOTID/messages/devicebound and link correlation id 41038f4f-a5d5-44ef-96db-df53385307bf opened locally
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.578 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.LoggingFlowController - Flowing 1024 credit(s) back to service on receiver link with address /devices/REDACTEDIOTID/messages/devicebound and correlation id 41038f4f-a5d5-44ef-96db-df53385307bf
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.608 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] DEBUG c.m.a.s.i.d.t.a.AmqpsSenderLinkHandler - telemetry sender link with address /devices/REDACTEDIOTID/messages/events and link correlation id 41038f4f-a5d5-44ef-96db-df53385307bf was successfully opened
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.609 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] WARN c.m.a.s.i.d.t.a.AmqpsSenderLinkHandler - No flow controller detected in telemetry link with address /devices/REDACTEDIOTID/messages/events and link correlation id 41038f4f-a5d5-44ef-96db-df53385307bf. Adding a new flow controller.
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.609 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsSenderLinkHandler - Link flow received on telemetry sender link with address /devices/REDACTEDIOTID/messages/events and link correlation id 41038f4f-a5d5-44ef-96db-df53385307bf. Current link credit is now 1000.
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.672 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] DEBUG c.m.a.s.i.d.t.a.AmqpsReceiverLinkHandler - telemetry receiver link with address /devices/REDACTEDIOTID/messages/devicebound and link correlation id 41038f4f-a5d5-44ef-96db-df53385307bf was successfully opened
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.672 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsSessionHandler - Device session for device REDACTEDIOTID has finished opening its worker links. Notifying the connection layer.
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.673 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID2-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Device session for device REDACTEDIOTID opened, counting down the device sessions opening latch
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.673 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] DEBUG c.m.a.s.i.d.t.IotHubTransport - The connection to the IoT Hub has been established
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.674 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] INFO c.m.a.s.i.d.t.IotHubTransport - Updating transport status to new status CONNECTED with reason CONNECTION_OK
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.674 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.azure.sdk.iot.device.DeviceIO - DeviceIO notified of status CONNECTED with reason CONNECTION_OK
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.674 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] INFO c.m.azure.sdk.iot.device.DeviceIO - Starting worker threads
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.677 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] DEBUG c.m.a.s.i.d.t.IotHubTransport - Invoking connection status callbacks with new status details
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.678 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] INFO o.o.d.AzureDeviceClientProvider - Connection status [CONNECTED]: CONNECTION_OK
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.678 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] DEBUG c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Amqp connection opened successfully
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.678 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CnxREDACTEDUUID1-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.IotHubTransport - Successfully closed and re-opened the iot hub transport connection
Feb 11 23:33:58 somehost some.app[200511]: 23:33:58.679 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-Cnx3204a8dd-35f1-4c18-b964-20dcff148443-azure-iot-sdk-ReactorRunner-ConnectionOwner] TRACE c.m.a.s.i.d.t.IotHubTransport - OnConnectionLost was fired, but for an outdated connection. Ignoring...
This new second connection is able to successfully send events (but not for RPC and Twin).
Feb 11 23:34:16 somehost some.app[200511]: 23:34:16.258 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CxnREDACTEDUUID2-azure-iot-sdk-IotHubSendTask] DEBUG c.m.a.s.i.d.t.IotHubTransport - Invoking the callback function for sent message, IoT Hub responded to message ( Message details: Correlation Id [86d08ab0-3445-49c4-946c-0d3071fe1cb9] Message Id [01e7880b-a923-493c-8e1c-9eba337df284] ) with status OK_EMPTY
Feb 11 23:34:46 somehost some.app[200511]: 23:34:46.815 [REDACTEDIOTHUB-REDACTEDIOTID-RANDOMID-CxnREDACTEDUUID2-azure-iot-sdk-IotHubSendTask] DEBUG c.m.a.s.i.d.t.IotHubTransport - Invoking the callback function for sent message, IoT Hub responded to message ( Message details: Correlation Id [0c2a839e-760c-45f2-94b9-c655d4065bbf] Message Id [e79e95fa-0ee5-47c0-b6f7-4c17f7b1fca5] ) with status OK_EMPTY
The issue here is likely that you aren't re-subscribing to twin and methods after re-opening your client. A given deviceClient instance will hold onto your twin/method subscriptions up to the point when it is closed. Any subsequent open call should be followed by re-subscribing to twin/methods. A client will still hold onto your subscriptions after a successful automatic reconnect, though (DISCONNECTED_RETRYING -> CONNECTED)
DeviceClient client = new DeviceClient(/*omitted for brevity*/);
client.open();
client.subscribeToMethods(/*omitted for brevity*/);
// some time passes, maybe network drops followed by automatic reconnections, but methods will be received throughout
// This call will erase all subscriptions
client.close();
// after this open call, methods will not be received until you resubscribe
client.open();
Can you try re-subscribing to twin/methods after opening your client and see if you still see this behavior?
@bouff have you tried the above suggestion?
Apologies for the delay @timtay-microsoft and thanks for your response.
Our callback that handles re-subscribing was not invoked - we purposely exclude the case of DISCONNECTED with reason CLIENT_CLOSE (since we expect this to be for graceful shutdowns, not network disconnect).
Given AmqpConnectionFramingErrorException
, which is a retryable exception, we expected the SDK to reconnect (DISCONNECTED_RETRYING -> CONNECTED).
We were previously using version 1.29.1 of the SDK. In this version, temporary disconnect and reconnect works (note that it takes 20 minutes for reconnect to occur - different issue though).
Below are logs excerpts that show the behavior of the older client.
When the disconnect is detected, we see DISCONNECTED_RETRYING with NO_NETWORK. The exception is ProtonIOException
, which is retryable.
The SDK automatically reconnects as expected and the application behaves as expected.
Timeline of events:
Logs
Disconnect detected:
Feb 24 22:05:06 somehost some.app[18362]: 22:05:06.233 [azure-iot-sdk-ReactorRunner] ERROR c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Amqp transport error occurred, closing the amqps connection
Feb 24 22:05:06 somehost some.app[18362]: com.microsoft.azure.sdk.iot.device.transport.amqps.exceptions.ProtonIOException: Connection timed out
Feb 24 22:05:06 somehost some.app[18362]: at com.microsoft.azure.sdk.iot.device.transport.amqps.AmqpsExceptionTranslator.convertFromAmqpException(AmqpsExceptionTranslator.java:84)
Feb 24 22:05:06 somehost some.app[18362]: at com.microsoft.azure.sdk.iot.device.transport.amqps.AmqpsIotHubConnection.onTransportError(AmqpsIotHubConnection.java:487)
Feb 24 22:05:06 somehost some.app[18362]: at org.apache.qpid.proton.engine.BaseHandler.handle(BaseHandler.java:191)
Feb 24 22:05:06 somehost some.app[18362]: at org.apache.qpid.proton.engine.impl.EventImpl.dispatch(EventImpl.java:108)
Feb 24 22:05:06 somehost some.app[18362]: at org.apache.qpid.proton.reactor.impl.ReactorImpl.dispatch(ReactorImpl.java:324)
Feb 24 22:05:06 somehost some.app[18362]: at org.apache.qpid.proton.reactor.impl.ReactorImpl.process(ReactorImpl.java:291)
Feb 24 22:05:06 somehost some.app[18362]: at com.microsoft.azure.sdk.iot.device.transport.amqps.IotHubReactor.run(IotHubReactor.java:26)
Feb 24 22:05:06 somehost some.app[18362]: at com.microsoft.azure.sdk.iot.device.transport.amqps.AmqpsIotHubConnection$ReactorRunner.call(AmqpsIotHubConnection.java:1118)
Feb 24 22:05:06 somehost some.app[18362]: at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
Feb 24 22:05:06 somehost some.app[18362]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
Feb 24 22:05:06 somehost some.app[18362]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
Feb 24 22:05:06 somehost some.app[18362]: at java.base/java.lang.Thread.run(Thread.java:829)
Feb 24 22:05:06 somehost some.app[18362]: 22:05:06.238 [azure-iot-sdk-ReactorRunner] INFO c.m.a.s.i.d.t.IotHubTransport - Handling a disconnection event
Feb 24 22:05:06 somehost some.app[18362]: com.microsoft.azure.sdk.iot.device.exceptions.TransportException: org.apache.qpid.proton.engine.HandlerException: java.lang.NullPointerException
Feb 24 22:05:06 somehost some.app[18362]: at com.microsoft.azure.sdk.iot.device.transport.amqps.AmqpsIotHubConnection$ReactorRunner.call(AmqpsIotHubConnection.java:1122)
Feb 24 22:05:06 somehost some.app[18362]: at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
Feb 24 22:05:06 somehost some.app[18362]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
Feb 24 22:05:06 somehost some.app[18362]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
Feb 24 22:05:06 somehost some.app[18362]: at java.base/java.lang.Thread.run(Thread.java:829)
Feb 24 22:05:06 somehost some.app[18362]: Caused by: org.apache.qpid.proton.engine.HandlerException: java.lang.NullPointerException
Feb 24 22:05:06 somehost some.app[18362]: at org.apache.qpid.proton.engine.impl.EventImpl.dispatch(EventImpl.java:112)
Feb 24 22:05:06 somehost some.app[18362]: at org.apache.qpid.proton.reactor.impl.ReactorImpl.dispatch(ReactorImpl.java:324)
Feb 24 22:05:06 somehost some.app[18362]: at org.apache.qpid.proton.reactor.impl.ReactorImpl.process(ReactorImpl.java:292)
Feb 24 22:05:06 somehost some.app[18362]: at com.microsoft.azure.sdk.iot.device.transport.amqps.IotHubReactor.run(IotHubReactor.java:26)
Feb 24 22:05:06 somehost some.app[18362]: at com.microsoft.azure.sdk.iot.device.transport.amqps.AmqpsIotHubConnection$ReactorRunner.call(AmqpsIotHubConnection.java:1118)
Feb 24 22:05:06 somehost some.app[18362]: ... 4 common frames omitted
Feb 24 22:05:06 somehost some.app[18362]: Caused by: java.lang.NullPointerException: null
Feb 24 22:05:06 somehost some.app[18362]: at org.apache.qpid.proton.reactor.impl.SelectorImpl.update(SelectorImpl.java:80)
Feb 24 22:05:06 somehost some.app[18362]: at org.apache.qpid.proton.reactor.impl.IOHandler.onUnhandled(IOHandler.java:378)
Feb 24 22:05:06 somehost some.app[18362]: at org.apache.qpid.proton.engine.BaseHandler.onSelectableWritable(BaseHandler.java:95)
Feb 24 22:05:06 somehost some.app[18362]: at org.apache.qpid.proton.engine.BaseHandler.handle(BaseHandler.java:227)
Feb 24 22:05:06 somehost some.app[18362]: at org.apache.qpid.proton.engine.impl.EventImpl.dispatch(EventImpl.java:108)
Feb 24 22:05:06 somehost some.app[18362]: ... 8 common frames omitted
Feb 24 22:05:06 somehost some.app[18362]: 22:05:06.238 [azure-iot-sdk-ReactorRunner] TRACE c.m.a.s.i.d.t.IotHubTransport - Due to disconnection event, clearing active queues, and re-queueing them to waiting queues to be re-processed later upon reconnection
Feb 24 22:05:06 somehost some.app[18362]: 22:05:06.239 [azure-iot-sdk-IotHubSendTask] WARN c.m.azure.sdk.iot.device.Message - The message with correlation id e8e5e2e0-d08d-4f1b-a863-54fc3b401d9b expired
Feb 24 22:05:06 somehost some.app[18362]: 22:05:06.239 [azure-iot-sdk-IotHubSendTask] DEBUG c.m.a.s.i.d.t.IotHubTransport - Invoking the callback function for sent message, IoT Hub responded to message ( Message details: Correlation Id [e8e5e2e0-d08d-4f1b-a863-54fc3b401d9b] Message Id [f6db5689-462d-4721-ba9a-b32efe87bb13] ) with status MESSAGE_EXPIRED
Feb 24 22:05:06 somehost some.app[18362]: 22:05:06.240 [azure-iot-sdk-ReactorRunner] DEBUG c.m.a.s.i.d.t.IotHubTransport - Mapping throwable to NO_NETWORK because it was a retryable exception
Feb 24 22:05:06 somehost some.app[18362]: com.microsoft.azure.sdk.iot.device.exceptions.TransportException: org.apache.qpid.proton.engine.HandlerException: java.lang.NullPointerException
Feb 24 22:05:06 somehost some.app[18362]: at com.microsoft.azure.sdk.iot.device.transport.amqps.AmqpsIotHubConnection$ReactorRunner.call(AmqpsIotHubConnection.java:1122)
Feb 24 22:05:06 somehost some.app[18362]: at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
Feb 24 22:05:06 somehost some.app[18362]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
Feb 24 22:05:06 somehost some.app[18362]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
Feb 24 22:05:06 somehost some.app[18362]: at java.base/java.lang.Thread.run(Thread.java:829)
Feb 24 22:05:06 somehost some.app[18362]: Caused by: org.apache.qpid.proton.engine.HandlerException: java.lang.NullPointerException
Feb 24 22:05:06 somehost some.app[18362]: at org.apache.qpid.proton.engine.impl.EventImpl.dispatch(EventImpl.java:112)
Feb 24 22:05:06 somehost some.app[18362]: at org.apache.qpid.proton.reactor.impl.ReactorImpl.dispatch(ReactorImpl.java:324)
Feb 24 22:05:06 somehost some.app[18362]: at org.apache.qpid.proton.reactor.impl.ReactorImpl.process(ReactorImpl.java:292)
Feb 24 22:05:06 somehost some.app[18362]: at com.microsoft.azure.sdk.iot.device.transport.amqps.IotHubReactor.run(IotHubReactor.java:26)
Feb 24 22:05:06 somehost some.app[18362]: at com.microsoft.azure.sdk.iot.device.transport.amqps.AmqpsIotHubConnection$ReactorRunner.call(AmqpsIotHubConnection.java:1118)
Feb 24 22:05:06 somehost some.app[18362]: ... 4 common frames omitted
Feb 24 22:05:06 somehost some.app[18362]: Caused by: java.lang.NullPointerException: null
Feb 24 22:05:06 somehost some.app[18362]: at org.apache.qpid.proton.reactor.impl.SelectorImpl.update(SelectorImpl.java:80)
Feb 24 22:05:06 somehost some.app[18362]: at org.apache.qpid.proton.reactor.impl.IOHandler.onUnhandled(IOHandler.java:378)
Feb 24 22:05:06 somehost some.app[18362]: at org.apache.qpid.proton.engine.BaseHandler.onSelectableWritable(BaseHandler.java:95)
Feb 24 22:05:06 somehost some.app[18362]: at org.apache.qpid.proton.engine.BaseHandler.handle(BaseHandler.java:227)
Feb 24 22:05:06 somehost some.app[18362]: at org.apache.qpid.proton.engine.impl.EventImpl.dispatch(EventImpl.java:108)
Feb 24 22:05:06 somehost some.app[18362]: ... 8 common frames omitted
Feb 24 22:05:06 somehost some.app[18362]: 22:05:06.241 [azure-iot-sdk-ReactorRunner] WARN c.m.a.s.i.d.t.IotHubTransport - Updating transport status to new status DISCONNECTED_RETRYING with reason NO_NETWORK
Feb 24 22:05:06 somehost some.app[18362]: com.microsoft.azure.sdk.iot.device.exceptions.TransportException: org.apache.qpid.proton.engine.HandlerException: java.lang.NullPointerException
Feb 24 22:05:06 somehost some.app[18362]: at com.microsoft.azure.sdk.iot.device.transport.amqps.AmqpsIotHubConnection$ReactorRunner.call(AmqpsIotHubConnection.java:1122)
Feb 24 22:05:06 somehost some.app[18362]: at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
Feb 24 22:05:06 somehost some.app[18362]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
Feb 24 22:05:06 somehost some.app[18362]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
Feb 24 22:05:06 somehost some.app[18362]: at java.base/java.lang.Thread.run(Thread.java:829)
Feb 24 22:05:06 somehost some.app[18362]: Caused by: org.apache.qpid.proton.engine.HandlerException: java.lang.NullPointerException
Feb 24 22:05:06 somehost some.app[18362]: at org.apache.qpid.proton.engine.impl.EventImpl.dispatch(EventImpl.java:112)
Feb 24 22:05:06 somehost some.app[18362]: at org.apache.qpid.proton.reactor.impl.ReactorImpl.dispatch(ReactorImpl.java:324)
Feb 24 22:05:06 somehost some.app[18362]: at org.apache.qpid.proton.reactor.impl.ReactorImpl.process(ReactorImpl.java:292)
Feb 24 22:05:06 somehost some.app[18362]: at com.microsoft.azure.sdk.iot.device.transport.amqps.IotHubReactor.run(IotHubReactor.java:26)
Feb 24 22:05:06 somehost some.app[18362]: at com.microsoft.azure.sdk.iot.device.transport.amqps.AmqpsIotHubConnection$ReactorRunner.call(AmqpsIotHubConnection.java:1118)
Feb 24 22:05:06 somehost some.app[18362]: ... 4 common frames omitted
Feb 24 22:05:06 somehost some.app[18362]: Caused by: java.lang.NullPointerException: null
Feb 24 22:05:06 somehost some.app[18362]: at org.apache.qpid.proton.reactor.impl.SelectorImpl.update(SelectorImpl.java:80)
Feb 24 22:05:06 somehost some.app[18362]: at org.apache.qpid.proton.reactor.impl.IOHandler.onUnhandled(IOHandler.java:378)
Feb 24 22:05:06 somehost some.app[18362]: at org.apache.qpid.proton.engine.BaseHandler.onSelectableWritable(BaseHandler.java:95)
Feb 24 22:05:06 somehost some.app[18362]: at org.apache.qpid.proton.engine.BaseHandler.handle(BaseHandler.java:227)
Feb 24 22:05:06 somehost some.app[18362]: at org.apache.qpid.proton.engine.impl.EventImpl.dispatch(EventImpl.java:108)
Feb 24 22:05:06 somehost some.app[18362]: ... 8 common frames omitted
Feb 24 22:05:06 somehost some.app[18362]: 22:05:06.241 [azure-iot-sdk-ReactorRunner] DEBUG c.m.a.s.i.d.t.IotHubTransport - Invoking connection status callbacks with new status details
Feb 24 22:05:06 somehost some.app[18362]: 22:05:06.241 [azure-iot-sdk-ReactorRunner] INFO o.o.d.AzureDeviceClientProvider - Connection status [DISCONNECTED_RETRYING]: NO_NETWORK
Feb 24 22:05:06 somehost some.app[18362]: 22:05:06.244 [azure-iot-sdk-ReactorRunner] DEBUG c.m.a.s.i.d.t.IotHubTransport - Starting reconnection logic
Feb 24 22:05:06 somehost some.app[18362]: 22:05:06.245 [azure-iot-sdk-ReactorRunner] TRACE c.m.a.s.i.d.t.IotHubTransport - Attempting reconnect attempt 0
Feb 24 22:05:06 somehost some.app[18362]: 22:05:06.246 [azure-iot-sdk-ReactorRunner] DEBUG c.m.a.s.i.d.transport.RetryDecision - NOTE: A new instance of RetryDecision has been created with retry enabled, the client will retry after 189 milliseconds
Feb 24 22:05:06 somehost some.app[18362]: 22:05:06.247 [azure-iot-sdk-ReactorRunner] TRACE c.m.a.s.i.d.t.IotHubTransport - Sleeping between reconnect attempts
Feb 24 22:05:06 somehost some.app[18362]: 22:05:06.436 [azure-iot-sdk-ReactorRunner] TRACE c.m.a.s.i.d.t.IotHubTransport - Attempting to close and re-open the iot hub transport connection...
Feb 24 22:05:06 somehost some.app[18362]: 22:05:06.437 [azure-iot-sdk-ReactorRunner] DEBUG c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Shutting down amqp layer...
Feb 24 22:05:06 somehost some.app[18362]: 22:05:06.437 [azure-iot-sdk-ReactorRunner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - OpenAsync called for amqp connection
Feb 24 22:05:06 somehost some.app[18362]: 22:05:06.437 [azure-iot-sdk-ReactorRunner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Closing amqp connection
Feb 24 22:05:06 somehost some.app[18362]: 22:05:06.437 [azure-iot-sdk-ReactorRunner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Waiting for reactor to close...
Reconnection:
Feb 24 22:05:26 somehost some.app[18362]: 22:05:26.438 [azure-iot-sdk-ReactorRunner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Shutdown of executor service has started
Feb 24 22:05:26 somehost some.app[18362]: 22:05:26.438 [azure-iot-sdk-ReactorRunner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Shutdown of executor service completed
Feb 24 22:05:26 somehost some.app[18362]: 22:05:26.438 [azure-iot-sdk-ReactorRunner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Amqp connection closed successfully
Feb 24 22:05:26 somehost some.app[18362]: 22:05:26.438 [azure-iot-sdk-ReactorRunner] DEBUG c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Opening amqp layer...
Feb 24 22:05:26 somehost some.app[18362]: 22:05:26.439 [azure-iot-sdk-ReactorRunner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Initializing authentication link latch count to 1
Feb 24 22:05:26 somehost some.app[18362]: 22:05:26.439 [azure-iot-sdk-ReactorRunner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Initializing device session latch for device redacted-iot-id
Feb 24 22:05:26 somehost some.app[18362]: 22:05:26.439 [azure-iot-sdk-ReactorRunner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - OpenAsnyc called for amqp connection
Feb 24 22:05:26 somehost some.app[18362]: 22:05:26.439 [azure-iot-sdk-ReactorRunner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Creating new executor service
Feb 24 22:05:26 somehost some.app[18362]: 22:05:26.440 [azure-iot-sdk-ReactorRunner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Waiting for authentication links to open...
Feb 24 22:05:26 somehost some.app[18362]: 22:05:26.441 [azure-iot-sdk-ReactorRunner] DEBUG c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Shutting down amqp layer...
Feb 24 22:05:26 somehost some.app[18362]: 22:05:26.442 [azure-iot-sdk-ReactorRunner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - OpenAsync called for amqp connection
Feb 24 22:05:26 somehost some.app[18362]: 22:05:26.442 [azure-iot-sdk-ReactorRunner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Closing amqp connection
Feb 24 22:05:26 somehost some.app[18362]: 22:05:26.442 [azure-iot-sdk-ReactorRunner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Waiting for reactor to close...
Feb 24 22:05:26 somehost some.app[18362]: 22:05:26.445 [azure-iot-sdk-ReactorRunner] TRACE c.m.a.s.i.d.t.a.AmqpsIotHubConnection - Amqp connection opened locally
Feb 24 22:05:26 somehost some.app[18362]: 22:05:26.446 [azure-iot-sdk-ReactorRunner] TRACE c.m.a.s.i.d.t.a.AmqpsSessionHandler - Opening device session for device redacted-iot-id
...
Feb 24 22:05:26 somehost some.app[18362]: 22:05:26.798 [azure-iot-sdk-ReactorRunner] INFO o.o.d.AzureDeviceClientProvider - Connection status [CONNECTED]: CONNECTION_OK
Are you using these device clients within the context of a multiplexing client, or are they all operating on their own connection in these logs?
Hi @timtay-microsoft,
We're not using the multiplexing client.
I was able to repro this same issue on multiplexed device clients but have been having a hard time repro'ing it for single device client instances. For the multiplexed device clients, #1496 fixed this bug. Can you try building from this repo's source from main and seeing if you can still repro this for non-multiplexed device clients?
Sure thing! 👍
I'll give it a try tomorrow.
FYI, we've released the 2.0.0 clients now which include #1496 in case it makes it easier for you to try out.
@bouff Have you been able to repro this error after upgrading to 2.0.0?
Apologies for the delay @timtay-microsoft, I'll dedicate time for this next week.
No rush! Just let me know if you need any more help on this issue
I'll go ahead and close this issue for now. If you are still having this issue after upgrading to the latest release, then go ahead and open a new issue on this page.
Is this fix released in 1.34.2 ?
Context
Description of the issue
In version 1.34.1 of the SDK, we performed a test where we temporarily disconnect network connectivity (pulled the ethernet cable). We leave the application running for 2 minutes in this state and then restore network connectivity (ethernet cable reconnected). We expect that Twin, RPC, and events would resume normal function after network connecitivity is restored. Instead, we observed that Twin and RPC do not function. Events work do though (queued messages are being sent). In the logs, we found that exception
AmqpConnectionFramingErrorException
is thrown. Looking at the code, it is a retryable exception. So we'd expect connection status ofIotHubConnectionStatus.DISCONNECTED_RETRYING
. But instead, we encounterIotHubConnectionStatus.DISCONNECTED
.Code sample exhibiting the issue
Existing samples in this repo should exhibit the issue.
Console log of the issue
Disconnect occurs at 3:41:09. Exception
AmqpConnectionFramingErrorException
is thrown. Our application's connection listener is triggered with statusIotHubConnectionStatus.DISCONNECTED
and reasonIotHubConnectionStatusChangeReason.CLIENT_CLOSE
. We don't attempt to re-instantiate aDeviceClient
instance, since we expect this to be used for graceful disconnect.Two minutes later, network connectivity is restored:
And here are events sent (Twin and RPC don't function):
Thanks for your time!