-
Notifications
You must be signed in to change notification settings - Fork 458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error 500 IoT Edge module container Image expecting IOTEDGE_WORKLOADURI enviorment variable #584
Comments
Can you please provide a little more detail around your scenario? Are these modules being started outside of the context of the IoT Edge? This environment variable is set by the Edge Agent when starting the containers. |
Hello Mike, Thanks for your time in reading out this issue. These Iot edge modules are a customer one built in C# and deployed into the edge runtime both onprem and VM hosted in cloud. I am not getting the 500 error now and the module is also running. But during its runtime its not able to get the environment variable IOTEDGE_WORKLOADURI although its been configured at the .env file and as well at the within module environment variables section at the azure portal. Appreciate if you have any advise. |
This environment variable ( What version of iotedge is running? You can run |
ISSUE RESOLVED. Upon defining Createoptions section with required environment variables into deployment template file pushed these into the edge solution config file and was able to be picked up during runtime. Likewise the same can be configured at the ARM portal within the module when you select through Set Module option. However the text boxes given to input envionment variables wasnt really working well and i did stay away from that option as working through the application config file was much easier. Thankyou for your time. Cheers! |
@prashbv How about some additional detail on how/where you solved this? Which file/section and what did you set it to?? |
I solved this by adding: <ItemGroup>
<ProjectCapability Include="AzureIoTEdgeModule" />
</ItemGroup> to the .csproj file |
Error 500 at IoT Edge module
The container Image expecting IOTEDGE_WORKLOADURI enviorment variable when trying to run the application in debug mode.
[Module] Module info: {
"moduleId": "WinUDPListener",
"managedBy": "IotEdge",
"deviceId": "vm-win10-edge",
"generationId": "636790063927487363",
"etag": "NjE0NzI1NjM2",
"connectionState": "Disconnected",
"connectionStateUpdatedTime": "0001-01-01T00:00:00",
"lastActivityTime": "0001-01-01T00:00:00",
"cloudToDeviceMessageCount": 0,
Connection State is also disconnected. When tried running the module at the edge runtime envionment using powershell
Unhandled Exception: System.AggregateException: One or more errors occurred. (Environment variable IOTEDGE_WORKLOADURI is required.) ---> System.InvalidOperationException: Environment variable IOTEDGE_WORKLOADURI is required.
at Microsoft.Azure.Devices.Client.Edge.EdgeModuleClientFactory.CreateInternalClientFromEnvironmentAsync()
at UdpListenerModule.Program.Init() in C:\app\Program.cs:line 53
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at UdpListenerModule.Program.Main(String[] args) in C:\app\Program.cs:line 27
Appreciate your help as setting IOTEDGE_WORKLOADURI environment variable didnt make any difference.
The text was updated successfully, but these errors were encountered: