- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
sh -c is creating a child process and when greengrass cleans up the parent process of the component it is not automatically killing the child process.
I suggest you remove sh -c and run the nodejs command directly in your recipe.
con risposta 2 anni fa
The duplication of the "ggv2-lwc-master-collector-component" that you're observing is not typical behavior for AWS IoT Greengrass V2 components. Generally, each component should run as a single instance unless specifically designed to have multiple instances.
There are a few potential reasons for this duplication:
-
Configuration Issue: The component's recipe might be configured to run multiple instances. Check the component's recipe file for any settings that could cause it to launch multiple processes.
-
Deployment Problem: There might have been an issue during deployment that caused the component to be started multiple times. This could happen if there were interruptions or errors during the deployment process.
-
Component Logic: The component itself might be designed to spawn multiple processes. This could be intentional, but if it's not, there might be a bug in the component's code causing it to start additional instances of itself.
-
Restart Without Cleanup: If the Greengrass core was restarted abruptly or if there was a system crash, it's possible that the old process wasn't properly terminated before a new one was started.
To resolve this issue:
-
Review the component's recipe and configuration to ensure it's not set to run multiple instances.
-
Check the Greengrass logs for any errors or warnings related to this component.
-
Try redeploying the component or restarting the Greengrass core software.
-
If the problem persists, you may need to manually stop the extra processes and then redeploy the component.
-
Consider reaching out to AWS support if you can't resolve the issue, as this behavior is not expected for standard Greengrass V2 components.
Sources
How do I redeploy the same deployment config in Greengrass v2 | AWS re:Post
How to make a greengrass component run only once? | AWS re:Post
Greengrass Core V2 - Restart component on config change | AWS re:Post
con risposta 2 anni fa
This appears to be an issue related to https://github.com/aws-greengrass/aws-greengrass-nucleus/blob/main/README_SYSTEMD_GUIDANCE.md , that link contains guidance to work around the issue.
We have also released version 2.14.1 which resolves this issue.
con risposta 2 anni fa
Contenuto pertinente
- AWS UFFICIALEAggiornata 2 anni fa
- AWS UFFICIALEAggiornata un anno fa

But I didn't put that in. This is my lifecycle run script from the recipe
"Script": "/usr/bin/nodejs20.x {artifacts:decompressedPath}/ggv2-lwc-main-collector-component/src/index.js"
What version of Greengrass are you running? We have found an issue with GG v2.14.0 where GG shutdown is not graceful. Please try other versions.