AWS greengrass component broken

0

I deployed a component locally, and there was some error in the program syntax, and the component status was broken. But I can't deploy other components again, even itself. Every time I deploy, I will be prompted that this component is broken. Now it is an endless loop. COMPONENT_BROKEN: FAILED_ROLLBACK_COMPLETE: Service com.example.clientdevices.MyHelloWorldSubscriber in broken state after deployment.

McLody
已提問 1 年前檢視次數 1073 次
1 個回答
1

Hey @McLody,

I assume based on the wording that you used the greengrass cli to perform the local deployment of your component which had the bug. If you want to fix your issue try fixing the bug on your code and then bump your component version on the recipe and create a new deployment with the changes. If you do not change the version every time you make a change greengrass won't recognize anything changed on the code.

Optionally, if you don't want to change the version on the recipe, you would have to first create a deployment removing the component followed by another deployment, deploying your component again, so it would look something like this See docs for details

greengrass-cli deployment create --remove com.example.clientdevices.MyHelloWorldSubscriber

(If you merged/deployed your component through the cloud and want to remove it locally you will need to provide the groupId)

After removing the component (confirm your component is no longer listed by running greengrass-cli component list, create a new deployment with the fixed code changes

 sudo greengrass-cli deployment create \
    --merge com.example.clientdevices.MyHelloWorldSubscriber \
    --recipeDir recipes/ \ 
    --artifactDir artifacts/
AWS
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南