-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
Milestone
Description
I am running Azure Kubernetes container on VM ScaleSet with Public IP address for .net core 2.2. Each container will create 20k TCP connections between itself and Azure IoT hub. I am getting the following transient error message when trying to open connection to IoT Hub. We will definitely retry on this exception. However, this happens a lot and it's very annoying. I saw we have a similar issue opened long time ago but it has been closed. Here is the link for existing issue.
https://github.com/dotnet/corefx/issues/17434
Microsoft.Azure.IoT.Simulation.Common.Exceptions.WrapperSimulationException: Error connecting device car.000143949
---> System.Net.Internals.SocketExceptionFactory+ExtendedSocketException: Resource temporarily unavailable
at System.Net.Dns.InternalGetHostByName(String hostName)
at System.Net.Dns.ResolveCallback(Object context)
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Dns.HostResolutionEndHelper(IAsyncResult asyncResult)
at System.Net.Dns.EndGetHostAddresses(IAsyncResult asyncResult)
at System.Net.Dns.<>c.<GetHostAddressesAsync>b__25_1(IAsyncResult asyncResult)
at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Azure.Devices.Client.Transport.Mqtt.MqttTransportHandler.OpenAsyncInternal(CancellationToken cancellationToken)
at Microsoft.Azure.Devices.Client.Transport.Mqtt.MqttTransportHandler.OpenAsync(CancellationToken cancellationToken)
at Microsoft.Azure.Devices.Client.Transport.ProtocolRoutingDelegatingHandler.OpenAsync(CancellationToken cancellationToken)
at Microsoft.Azure.Devices.Client.Transport.ErrorDelegatingHandler.<>c__DisplayClass22_0.<<ExecuteWithErrorHandlingAsync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Azure.Devices.Client.Transport.ErrorDelegatingHandler.ExecuteWithErrorHandlingAsync[T](Func`1 asyncOperation)
at Microsoft.Azure.Devices.Client.Transport.RetryDelegatingHandler.<>c__DisplayClass32_0.<<OpenAsyncInternal>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Azure.Devices.Client.Transport.RetryDelegatingHandler.EnsureOpenedAsync(CancellationToken cancellationToken)
at Microsoft.Azure.IoT.Simulation.DeviceClients.IoTHubSimulatedDeviceClient.ConnectAsync(CancellationToken cancellationToken) in /src/DeviceClients/IoTHub/IoTHubSimulatedDevice.cs:line 105
--- End of inner exception stack trace ---
at Microsoft.Azure.IoT.Simulation.DeviceClients.IoTHubSimulatedDeviceClient.ConnectAsync(CancellationToken cancellationToken) in /src/DeviceClients/IoTHub/IoTHubSimulatedDevice.cs:line 137
at Microsoft.Azure.IoT.Simulation.Runner.DeviceConnection.DeviceConnectionActor.ConnectAsync(CancellationToken cancellationToken) in /src/Runner/DeviceConnection/DeviceConnectionActor.cs:line 123