Skip to content
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

camera-capture fails to automatically start #81

Open
1 of 4 tasks
AnnamariaGalante opened this issue Jan 19, 2023 · 0 comments
Open
1 of 4 tasks

camera-capture fails to automatically start #81

AnnamariaGalante opened this issue Jan 19, 2023 · 0 comments

Comments

@AnnamariaGalante
Copy link

  • bug report -> please search issues before submitting
  • feature request
  • documentation issue or request
  • regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce
Hi everyone. I tried to deploy this solution on my iotedge device but the camera-capture module fails to automatically start. It works only with a manual start, or with the iot edge direct-method "Restart". Edge agent tells me that it is a runtime error, but i don't know how to fix it. I have deployed the solution with IotEdge agent 1.2 and IoTEdge Hub 1.2., with the agent giving the following errors:

Any log messages given by the failure
2023-01-13 11:00:18.169 +00:00 [ERR] - Executing command for operation ["start"] failed.
Microsoft.Azure.Devices.Edge.Agent.Edgelet.EdgeletCommunicationException- Message:Error calling start module camera-capture: runtime operation error: start module "camera-capture", StatusCode:500, at: at Microsoft.Azure.Devices.Edge.Agent.Edgelet.Version_2021_12_07.ModuleManagementHttpClient.HandleException(Exception exception, String operation) in /mnt/vss/_work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Edgelet/version_2021_12_07/ModuleManagementHttpClient.cs:line 232
at Microsoft.Azure.Devices.Edge.Agent.Edgelet.Versioning.ModuleManagementHttpClientVersioned.Execute[T](Func1 func, String operation) in /mnt/vss/_work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Edgelet/versioning/ModuleManagementHttpClientVersioned.cs:line 152 at Microsoft.Azure.Devices.Edge.Agent.Edgelet.Version_2021_12_07.ModuleManagementHttpClient.StartModuleAsync(String name) in /mnt/vss/_work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Edgelet/version_2021_12_07/ModuleManagementHttpClient.cs:line 178 at Microsoft.Azure.Devices.Edge.Agent.Edgelet.ModuleManagementHttpClient.<>c__DisplayClass26_0.<<Throttle>b__0>d.MoveNext() in /mnt/vss/_work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Edgelet/ModuleManagementHttpClient.cs:line 138 --- End of stack trace from previous location where exception was thrown --- at Microsoft.Azure.Devices.Edge.Agent.Edgelet.ModuleManagementHttpClient.Throttle[T](Func1 identityOperation) in /mnt/vss/_work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Edgelet/ModuleManagementHttpClient.cs:line 153
at Microsoft.Azure.Devices.Edge.Agent.Core.LoggingCommandFactory.LoggingCommand.ExecuteAsync(CancellationToken token) in /mnt/vss/_work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/LoggingCommandFactory.cs:line 59
<3> 2023-01-13 11:00:18.271 +00:00 [ERR] - Executing command for operation ["Command Group: (\n [Stop module camera-capture]\n [Start module camera-capture]\n [Saving camera-capture to store]\n)"] failed.
Microsoft.Azure.Devices.Edge.Agent.Edgelet.EdgeletCommunicationException- Message:Error calling start module camera-capture: runtime operation error: start module "camera-capture", StatusCode:500, at: at Microsoft.Azure.Devices.Edge.Agent.Edgelet.Version_2021_12_07.ModuleManagementHttpClient.HandleException(Exception exception, String operation) in /mnt/vss/_work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Edgelet/version_2021_12_07/ModuleManagementHttpClient.cs:line 232
at Microsoft.Azure.Devices.Edge.Agent.Edgelet.Versioning.ModuleManagementHttpClientVersioned.Execute[T](Func1 func, String operation) in /mnt/vss/_work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Edgelet/versioning/ModuleManagementHttpClientVersioned.cs:line 152 at Microsoft.Azure.Devices.Edge.Agent.Edgelet.Version_2021_12_07.ModuleManagementHttpClient.StartModuleAsync(String name) in /mnt/vss/_work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Edgelet/version_2021_12_07/ModuleManagementHttpClient.cs:line 178 at Microsoft.Azure.Devices.Edge.Agent.Edgelet.ModuleManagementHttpClient.<>c__DisplayClass26_0.<<Throttle>b__0>d.MoveNext() in /mnt/vss/_work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Edgelet/ModuleManagementHttpClient.cs:line 138 --- End of stack trace from previous location where exception was thrown --- at Microsoft.Azure.Devices.Edge.Agent.Edgelet.ModuleManagementHttpClient.Throttle[T](Func1 identityOperation) in /mnt/vss/_work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Edgelet/ModuleManagementHttpClient.cs:line 153
at Microsoft.Azure.Devices.Edge.Agent.Core.LoggingCommandFactory.LoggingCommand.ExecuteAsync(CancellationToken token) in /mnt/vss/_work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/LoggingCommandFactory.cs:line 59
at Microsoft.Azure.Devices.Edge.Agent.Core.Commands.GroupCommand.ExecuteAsync(CancellationToken token) in /mnt/vss/_work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/commands/GroupCommand.cs:line 35
at Microsoft.Azure.Devices.Edge.Agent.Core.LoggingCommandFactory.LoggingCommand.ExecuteAsync(CancellationToken token) in /mnt/vss/_work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/LoggingCommandFactory.cs:line 59
<3> 2023-01-13 11:00:18.279 +00:00 [ERR] - Step failed in deployment 186, continuing execution. Failure when running command Command Group: (
[Stop module camera-capture]
[Start module camera-capture]
[Saving camera-capture to store]

Then, given our manifest set on restartPolicy: Alway, the camera caputre module restarts but gives the same error.
Here the manfifest:
{
"modulesContent": {
"$edgeAgent": {
"properties.desired": {
"schemaVersion": "1.1",
"runtime": {
"type": "docker",
"settings": {
"minDockerVersion": "v1.25",
"loggingOptions": "",
"registryCredentials": {
"demomanufacturing": {
"address": "",
"password": "",
"username": ""
},
"docker": {
"address": "",
"password": "",
"username": ""
}
}
}
},
"systemModules": {
"edgeAgent": {
"env": {
"SendRuntimeQualityTelemetry": {
"value": false
},
"MaxRestartCount": {
"value": 5
},
"IntensiveCareTimeInMinutes": {
"value": 5
},
"ModuleUpdateMode": {
"value": "WaitForAllPulls"
},
"CoolOffTimeUnitInSeconds": {
"value": 60
}
},
"settings": {
"image": "mcr.microsoft.com/azureiotedge-agent:1.2",
"createOptions": "{}"
},
"type": "docker"
},
"edgeHub": {
"restartPolicy": "always",
"settings": {
"image": "mcr.microsoft.com/azureiotedge-hub:1.2",
"createOptions": "{"HostConfig":{"PortBindings":{"5671/tcp":[{"HostPort":"5671"}],"8883/tcp":[{"HostPort":"8883"}],"443/tcp":[{"HostPort":"443"}]}}}"
},
"status": "running",
"type": "docker"
}
},
"modules": {
"camera-capture": {
"env": {
"IMAGE_PROCESSING_ENDPOINT": {
"value": ""
},
"RESIZE_WIDTH": {
"value": "256"
},
"RESIZE_HEIGHT": {
"value": "256"
},
"IMAGE_PROCESSING_PARAMS": {
"value": ""{'returnLabels': 'true'}""
},
"VERBOSE": {
"value": "True"
}
},
"restartPolicy": "always",
"settings": {
"image": "",
"createOptions": "
{"HostConfig":{"PortBindings":{"5012/tcp":[{"HostPort":"5012"}]},"Binds":["/dev/video0:/dev/video0"],"Devices":[{"PathOnHost":"/dev/video0","PathInContainer":"/dev/video0","CgroupPermissions":"mrw"}]}}
"
},
"startupOrder": 4294967295,
"status": "running",
"type": "docker",
"version": "1.0"
},

                "image-classifier-service": {
                    "restartPolicy": "always",
                    "settings": {
                        "image": ""
                    },
                    "startupOrder": 2,
                    "status": "running",
                    "type": "docker"
                }
            }
        }
    },
    "$edgeHub": {
        "properties.desired": {
            "schemaVersion": "1.2",
            "routes": {
                "CameraCaptureToIoTHub": {
                    "route": "FROM /messages/modules/camera-capture/outputs/output1 INTO $upstream"
                },
                "CameraCaptureGAToIoTHub": {
                    "route": "FROM /messages/modules/CameraCaptureGA/outputs/* INTO $upstream"
                }
            },
            "storeAndForwardConfiguration": {
                "timeToLiveSecs": 7200
            }
        }
    },
    "camera-capture": {
        "properties.desired": {}
    },
    "image-classifier-service": {
        "properties.desired": {}
    }
}

}

Expected/desired behavior
camera capture module automatically running, not only after manual restart

OS and Version?

Raspdian running on a Pi4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant