By using AWS re:Post, you agree to the AWS re:Post Terms of Use

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.

asked 2 years ago1.4K views
1 Answer
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
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions