DotNetty icon indicating copy to clipboard operation
DotNetty copied to clipboard

DotNetty.Transport.Channels.ClosedChannelException Errors Thrown and not caught in Try Next

Open ghost opened this issue 5 years ago • 2 comments

I have an IoT application that receives Cloud to Device message from an Azure IoT Hub. With no C2D messages, the application will throw a series of exceptions:

Exception thrown: 'System.OperationCanceledException' in System.Private.CoreLib.dll Exception thrown: 'System.OperationCanceledException' in System.Private.CoreLib.dll Exception thrown: 'System.OperationCanceledException' in System.Private.CoreLib.dll Exception thrown: 'System.OperationCanceledException' in System.Private.CoreLib.dll Exception thrown: 'Microsoft.Azure.Devices.Client.Exceptions.IotHubCommunicationException' in Microsoft.Azure.Devices.Client.dll Exception thrown: 'Microsoft.Azure.Devices.Client.Exceptions.IotHubCommunicationException' in System.Private.CoreLib.dll Exception thrown: 'DotNetty.Transport.Channels.ClosedChannelException' in System.Private.CoreLib.dll Exception thrown: 'DotNetty.Transport.Channels.ClosedChannelException' in Microsoft.Azure.Devices.Client.dll Exception thrown: 'DotNetty.Transport.Channels.ClosedChannelException' in System.Private.CoreLib.dll

These errors are not precipitated by a C2D message as there aren't any. These errors are not caught by any error trapping so there is no stack trace or anything else that would give any better information. These errors also do not throw an unhandled exception.

It is difficult to know for sure what is the inner most exception. Since DotNetty seems to be the lowest level, I have stated here.

These exceptions happen without regard to the CPU or device that they are running on.

Azure Device Client v1.21.3 Microsoft.NetCore.UniversalWindowsPlatform 6.2.9

Any thoughts or suggestions would be greatly appreciated.

Thank you in advance.

ghost avatar Dec 23 '19 23:12 ghost

I have an IoT application that receives Cloud to Device message from an Azure IoT Hub. With no C2D messages, the application will throw a series of exceptions:

Exception thrown: 'System.OperationCanceledException' in System.Private.CoreLib.dll Exception thrown: 'System.OperationCanceledException' in System.Private.CoreLib.dll Exception thrown: 'System.OperationCanceledException' in System.Private.CoreLib.dll Exception thrown: 'System.OperationCanceledException' in System.Private.CoreLib.dll Exception thrown: 'Microsoft.Azure.Devices.Client.Exceptions.IotHubCommunicationException' in Microsoft.Azure.Devices.Client.dll Exception thrown: 'Microsoft.Azure.Devices.Client.Exceptions.IotHubCommunicationException' in System.Private.CoreLib.dll Exception thrown: 'DotNetty.Transport.Channels.ClosedChannelException' in System.Private.CoreLib.dll Exception thrown: 'DotNetty.Transport.Channels.ClosedChannelException' in Microsoft.Azure.Devices.Client.dll Exception thrown: 'DotNetty.Transport.Channels.ClosedChannelException' in System.Private.CoreLib.dll

These errors are not precipitated by a C2D message as there aren't any. These errors are not caught by any error trapping so there is no stack trace or anything else that would give any better information. These errors also do not throw an unhandled exception.

It is difficult to know for sure what is the inner most exception. Since DotNetty seems to be the lowest level, I have stated here.

These exceptions happen without regard to the CPU or device that they are running on.

Azure Device Client v1.21.3 Microsoft.NetCore.UniversalWindowsPlatform 6.2.9

Any thoughts or suggestions would be greatly appreciated.

Thank you in advance.

I don't think it's about DotNetty, because the exception comes from inside the System.Private.CoreLib.dll.

LeonU avatar Jan 14 '20 04:01 LeonU

I met same exception too. For me, the reason was DotNetty*.dll versions confliction.

xhydongda avatar Jul 30 '21 06:07 xhydongda