Error during module execution inside IoT Edge
See original GitHub issueI tried to run the module inside IoT Edge without the EdgeHubConnectionString as argument, but I get the following exception:
[11:28:46 DBG] Starting Module Host...
[11:28:46 ERR] Error during module execution - restarting!
System.AggregateException: One or more errors occurred. (Object reference not set to an instance of an object.) ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Azure.IIoT.Module.Framework.Client.IoTSdkFactory.ModuleClientAdapter.<>c__DisplayClass5_0.<CreateAsync>b__0(ConnectionStatus s, ConnectionStatusChangeReason r)
at Microsoft.Azure.Devices.Client.InternalClient.OnConnectionStatusChanged(ConnectionStatus status, ConnectionStatusChangeReason reason)
at Microsoft.Azure.Devices.Client.Transport.RetryDelegatingHandler.<>c__DisplayClass35_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.InternalClient.OpenAsync()
at Microsoft.Azure.IIoT.Module.Framework.Client.IoTSdkFactory.ModuleClientAdapter.CreateAsync(String product, IotHubConnectionStringBuilder cs, ITransportSettings transportSetting, TimeSpan timeout, IRetryPolicy retry, Action onConnectionLost, ILogger logger)
at Microsoft.Azure.IIoT.Utils.Try.Options[T](Func`1[] options)
--- End of inner exception stack trace ---
at Microsoft.Azure.IIoT.Module.Framework.Hosting.ModuleHost.StartAsync(String type, String siteId, String serviceInfo, IProcessControl reset)
at Microsoft.Azure.IIoT.Modules.OpcUa.Twin.ModuleProcess.RunAsync() in /src/src/ModuleProcess.cs:line 93
---> (Inner Exception #0) System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Azure.IIoT.Module.Framework.Client.IoTSdkFactory.ModuleClientAdapter.<>c__DisplayClass5_0.<CreateAsync>b__0(ConnectionStatus s, ConnectionStatusChangeReason r)
at Microsoft.Azure.Devices.Client.InternalClient.OnConnectionStatusChanged(ConnectionStatus status, ConnectionStatusChangeReason reason)
at Microsoft.Azure.Devices.Client.Transport.RetryDelegatingHandler.<>c__DisplayClass35_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.InternalClient.OpenAsync()
at Microsoft.Azure.IIoT.Module.Framework.Client.IoTSdkFactory.ModuleClientAdapter.CreateAsync(String product, IotHubConnectionStringBuilder cs, ITransportSettings transportSetting, TimeSpan timeout, IRetryPolicy retry, Action onConnectionLost, ILogger logger)
at Microsoft.Azure.IIoT.Utils.Try.Options[T](Func`1[] options)<---
It’s running on Linux amd64 and the latest mschier_develop (master or tag 2.0.0 doesn’t compile: ‘LogEx’ does not contain a definition for ‘Level’). It’s running when I set cmd EdgeHubConnectionString (which is the module connection string, not edgehub)
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Troubleshoot Azure IoT Edge common errors
Resolve common issues encountered when using an IoT Edge solution. ... Option 2: Set DNS server in IoT Edge deployment per module.
Read more >IoTEdge: error in module running, but manual restart works
Hello everyone, I am trying to deploy a solution on my iotedge device. The solution is the Custom vision system available on Microsoft...
Read more >Azure IoT Edge Module : Error while Build and Push ...
Looks like one of the paths in your command cannot be found in the intermediate docker image. Try running a shell directly on...
Read more >IoT Edge module fails to send a message to edgeHub with ...
The custom module was successfully sending messages to the edge hub till IoT Edge runtime version 1.2.10. This issue was noticed in a...
Read more >Azure IoT Edge for Visual Studio Code
Build and publish IoT Edge modules; Debug IoT Edge modules locally and remotely; IntelliSense and code snippets for the deployment manifest ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The network mode issue lies in the createOptions which should be
"createOptions": "{\"NetworkingConfig\": {\"EndpointsConfig\": {\"host\": {}}}, \"HostConfig\": {\"NetworkMode\": \"host\" }}"
In 2.5.1