I am trying to use the Azure iot edge blob storage where the iot edge server might come up and not have internet access and I need the blob storage to still be accessible. The problem I am having is that the blob storage module will not start without internet access. Is there a configuration I need to change or is blob storage not supported? Here is the logs of the module starting:
Starting Azure Blob Storage on IoT Edge, version 1.4.1.0.
Unhandled exception. System.AggregateException: One or more errors occurred. (One or more errors occurred. (Transient network error occurred, please retry.))
---> System.AggregateException: One or more errors occurred. (Transient network error occurred, please retry.)
---> Microsoft.Azure.Devices.Client.Exceptions.IotHubCommunicationException: Transient network error occurred, please retry.
---> System.Net.Sockets.SocketException (104): Connection reset by peer
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)
--- End of inner exception stack trace ---
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.Devices.Client.Transport.RetryDelegatingHandler.<>c__DisplayClass23_0.<<EnableTwinPatchAsync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Azure.Devices.Client.Transport.RetryDelegatingHandler.EnableTwinPatchAsync(CancellationToken cancellationToken)
at Microsoft.Azure.Devices.Client.InternalClient.SetDesiredPropertyUpdateCallbackAsync(DesiredPropertyUpdateCallback callback, Object userContext, CancellationToken cancellationToken)
at Microsoft.Azure.Devices.Client.InternalClient.SetDesiredPropertyUpdateCallbackAsync(DesiredPropertyUpdateCallback callback, Object userContext)
at Microsoft.Azure.Devices.BlobStorage.IoT.ModuleTwinConfigurationProvider.Initialize()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at Microsoft.Azure.Devices.BlobStorage.IoT.ModuleTwinConfigurationProvider..ctor(ModuleClient iotModuleClient)
at Microsoft.Azure.Devices.BlobStorage.IoT.ModuleTwinConfigurationSource.Build(IConfigurationBuilder builder)
at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()
at Microsoft.Extensions.Hosting.HostBuilder.BuildAppConfiguration()
at Microsoft.Extensions.Hosting.HostBuilder.Build()
at Microsoft.AzureStack.Services.Storage.FrontEnd.Program.BuildServices(String[] args)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at Microsoft.AzureStack.Services.Storage.FrontEnd.Program.Main(String[] args)
It does work correctly if I give it internet to startup then take it offline but it does not work if it does not have internet to start up.
Also noticing the following in the edge agent logs:
Module 'azureblobstorageoniotedge' scheduled to restart after 05m:00s (02m:29s left). Empty edge agent config was received.
Attempting to read config from backup(/tmp/edgeAgent/backup.json) instead
IoT Edge devices automatically have offline capabilities enabled. When an IoT Edge device goes into offline mode, the IoT Edge hub takes on three roles:
deployment.template.json: