Why is it that IoT Edge devices cannot connect to the IOT HUB after a month with the connection string, but can connect again after updating the string

cooldesign01 0 Reputation points
2023-05-23T01:54:07.18+00:00

IoT Edge devices cannot connect to the IOT HUB after one month of operation, but they can connect again after updating the string.The error is as follows.

2023-04-14 17:04:33.395 [azure-iot-sdk-ConnectionReconnectionTask:b3a6cdca-7daf-46c5-b307-8d1a5803edd5] ERROR [c.m.a.s.i.d.t.IotHubTransport]: Reconnection was abandoned due to encountering a non-retryable exception 
com.microsoft.azure.sdk.iot.device.exceptions.ProtocolException: Unable to establish MQTT connection
	at com.microsoft.azure.sdk.iot.device.transport.mqtt.exceptions.PahoExceptionTranslator.convertToMqttException(PahoExceptionTranslator.java:46)
	at com.microsoft.azure.sdk.iot.device.transport.mqtt.Mqtt.connect(Mqtt.java:131)
	at com.microsoft.azure.sdk.iot.device.transport.mqtt.MqttMessaging.start(MqttMessaging.java:61)
	at com.microsoft.azure.sdk.iot.device.transport.mqtt.MqttIotHubConnection.open(MqttIotHubConnection.java:283)
	at com.microsoft.azure.sdk.iot.device.transport.IotHubTransport.openConnection(IotHubTransport.java:1114)
	at com.microsoft.azure.sdk.iot.device.transport.IotHubTransport.singleReconnectAttempt(IotHubTransport.java:1328)
	at com.microsoft.azure.sdk.iot.device.transport.IotHubTransport.reconnect(IotHubTransport.java:1254)
	at com.microsoft.azure.sdk.iot.device.transport.IotHubTransport.handleDisconnection(IotHubTransport.java:1150)
	at com.microsoft.azure.sdk.iot.device.transport.IotHubTransport.onConnectionLost(IotHubTransport.java:336)
	at com.microsoft.azure.sdk.iot.device.transport.ReconnectionNotifier$1.run(ReconnectionNotifier.java:22)
	at java.lang.Thread.run(Thread.java:748)
Caused by: org.eclipse.paho.client.mqttv3.MqttException: MqttException
	at org.eclipse.paho.client.mqttv3.internal.ExceptionHelper.createMqttException(ExceptionHelper.java:38)
	at org.eclipse.paho.client.mqttv3.internal.ClientComms$ConnectBG.run(ClientComms.java:736)
	... 1 common frames omitted
Caused by: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:994)
	at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1395)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1379)
	at org.eclipse.paho.client.mqttv3.internal.SSLNetworkModule.start(SSLNetworkModule.java:149)
	at org.eclipse.paho.client.mqttv3.internal.ClientComms$ConnectBG.run(ClientComms.java:722)
	... 1 common frames omitted
Caused by: java.io.EOFException: SSL peer shut down incorrectly
	at sun.security.ssl.InputRecord.read(InputRecord.java:505)
	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:975)
	... 6 common frames omitted
java.lang.IllegalStateException: Cannot add a message when the transport is closed.
	at com.microsoft.azure.sdk.iot.device.transport.IotHubTransport.addMessage(IotHubTransport.java:518)
	at com.microsoft.azure.sdk.iot.device.DeviceIO.sendEventAsync(DeviceIO.java:345)
	at com.microsoft.azure.sdk.iot.device.InternalClient.sendEventAsync(InternalClient.java:216)
	at com.microsoft.azure.sdk.iot.device.ModuleClient.sendEventAsync(ModuleClient.java:408)
	at com.microsoft.azure.sdk.iot.device.ModuleClient.sendEventAsync(ModuleClient.java:398)
	at jp.cooldesign.ems.biz.service.EdgeAzureService.sendMessageToHub(EdgeAzureService.java:152)
	at jp.cooldesign.ems.biz.task.AzureSendTask.run(AzureSendTask.java:39)
Azure IoT Edge
Azure IoT Edge
An Azure service that is used to deploy cloud workloads to run on internet of things (IoT) edge devices via standard containers.
426 questions
Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
791 questions
{count} votes