V2 greengrass deployment error in lifecyclemanager.GenericExternalService

0

Hello everyone, I followed this guide to create a core on the cloud9 environment: https://greengrassv2.workshop.aws/en/chapter1_introduction.html
Appart from some minor issues, everything went fine. However then I went on to turn a computer running an ubuntu server into a greengrass core. I installed awscli, and then followed the same guide, the first component, hello world, deployed just fine. But then when trying to deploy the publisher after that, I get this error:

2021-10-20T07:48:16.170Z [INFO] (com.example.Publisher-lifecycle) com.aws.greengrass.lifecyclemanager.GenericExternalService: service-report-state. {serviceName=com.example.Publisher, currentState=ERRORED, newState=NEW}
2021-10-20T07:48:16.170Z [INFO] (com.example.Publisher-lifecycle) com.aws.greengrass.lifecyclemanager.GenericExternalService: service-set-state. {serviceName=com.example.Publisher, currentState=ERRORED, newState=NEW}
2021-10-20T07:48:16.182Z [ERROR] (pool-2-thread-22) com.aws.greengrass.lifecyclemanager.GenericExternalService: service-errored. {reason=Script errored in install, serviceName=com.example.Publisher, currentState=NEW}
2021-10-20T07:48:16.182Z [INFO] (pool-2-thread-22) com.aws.greengrass.lifecyclemanager.GenericExternalService: service-report-state. {serviceName=com.example.Publisher, currentState=NEW, newState=ERRORED}
2021-10-20T07:48:16.182Z [INFO] (com.example.Publisher-lifecycle) com.aws.greengrass.lifecyclemanager.GenericExternalService: service-set-state. {serviceName=com.example.Publisher, currentState=NEW, newState=ERRORED}
2021-10-20T07:48:16.183Z [INFO] (com.example.Publisher-lifecycle) com.aws.greengrass.lifecyclemanager.GenericExternalService: service-report-state. {serviceName=com.example.Publisher, currentState=ERRORED, newState=NEW}
2021-10-20T07:48:16.183Z [INFO] (com.example.Publisher-lifecycle) com.aws.greengrass.lifecyclemanager.GenericExternalService: service-set-state. {serviceName=com.example.Publisher, currentState=ERRORED, newState=NEW}
2021-10-20T07:48:16.194Z [ERROR] (pool-2-thread-22) com.aws.greengrass.lifecyclemanager.GenericExternalService: service-errored. {reason=Script errored in install, serviceName=com.example.Publisher, currentState=NEW}
2021-10-20T07:48:16.194Z [INFO] (pool-2-thread-22) com.aws.greengrass.lifecyclemanager.GenericExternalService: service-report-state. {serviceName=com.example.Publisher, currentState=NEW, newState=ERRORED}
2021-10-20T07:48:16.195Z [INFO] (com.example.Publisher-lifecycle) com.aws.greengrass.lifecyclemanager.GenericExternalService: service-set-state. {serviceName=com.example.Publisher, currentState=NEW, newState=BROKEN}
2021-10-20T07:48:16.196Z [INFO] (com.example.Publisher-lifecycle) com.aws.greengrass.status.FleetStatusService: fss-status-update-published. Status update published to FSS. {serviceName=FleetStatusService, currentState=RUNNING}
2021-10-20T07:48:16.197Z [INFO] (com.example.Publisher-lifecycle) com.aws.greengrass.status.FleetStatusService: fss-status-update-published. Status update published to FSS. {serviceName=FleetStatusService, currentState=RUNNING}
2021-10-20T07:48:16.197Z [ERROR] (com.example.Publisher-lifecycle) com.aws.greengrass.lifecyclemanager.GenericExternalService: service-broken. service is broken. Deployment is needed. {serviceName=com.example.Publisher, currentState=BROKEN}
2021-10-20T07:48:17.156Z [WARN] (pool-2-thread-18) com.aws.greengrass.deployment.DeploymentConfigMerger: merge-config. merge-config-service BROKEN. {serviceName=com.example.Publisher}
2021-10-20T07:48:17.157Z [ERROR] (pool-2-thread-18) com.aws.greengrass.deployment.activator.DeploymentActivator: merge-config. Deployment failed. {deploymentId=6af84bce-2405-41cf-b676-62780e983b95}
com.aws.greengrass.deployment.exceptions.ServiceUpdateException: Service com.example.Publisher in broken state after deployment
at com.aws.greengrass.deployment.DeploymentConfigMerger.waitForServicesToStart(DeploymentConfigMerger.java:194)
at com.aws.greengrass.deployment.activator.DefaultActivator.activate(DefaultActivator.java:84)
at com.aws.greengrass.deployment.DeploymentConfigMerger.updateActionForDeployment(DeploymentConfigMerger.java:150)
at com.aws.greengrass.deployment.DeploymentConfigMerger.mergeInNewConfig(DeploymentConfigMerger.java:107)
at com.aws.greengrass.deployment.DefaultDeploymentTask.call(DefaultDeploymentTask.java:134)
at com.aws.greengrass.deployment.DefaultDeploymentTask.call(DefaultDeploymentTask.java:38)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)

2021-10-20T07:48:17.159Z [INFO] (pool-2-thread-18) com.aws.greengrass.deployment.DeploymentService: deployment-task-execution. Finished deployment task. {deploymentId=6af84bce-2405-41cf-b676-62780e983b95, serviceName=DeploymentService, currentState=RUNNING}
2021-10-20T07:48:30.130Z [INFO] (pool-2-thread-16) com.aws.greengrass.deployment.DeploymentService: Current deployment finished. {DeploymentId=6af84bce-2405-41cf-b676-62780e983b95, serviceName=DeploymentService, currentState=RUNNING}
2021-10-20T07:48:30.229Z [INFO] (pool-2-thread-16) com.aws.greengrass.deployment.DeploymentStatusKeeper: Stored deployment status. {DeploymentId=6af84bce-2405-41cf-b676-62780e983b95, DeploymentStatus=FAILED}
2021-10-20T07:48:30.253Z [INFO] (pool-2-thread-16) com.aws.greengrass.deployment.DeploymentDirectoryManager: Persist link to last deployment. {link=/greengrass/v2/deployments/previous-failure}
2021-10-20T07:48:30.254Z [INFO] (pool-2-thread-16) com.aws.greengrass.deployment.DeploymentDirectoryManager: Clean up link to earlier deployment. {link=/greengrass/v2/deployments/previous-success}

The component is the exact same as the one I succesfully deployed on the cloud9 greengrass core. Does anyone have an idea where this error comes from?

Edited by: WittyNickname on Oct 20, 2021 1:20 AM

asked 3 years ago852 views
2 Answers
0

Hi,

In the provided logs, you can see that there was an error:

reason=Script errored in install, serviceName=com.example.Publisher, currentState=NEW}

What this means is that the install command in the recipe failed to execute.

You can look in the log file for com.example.Publisher and it should tell you what it was doing.

From the workshop link you provided, the install step does the following:

        "Install": "pip3 install awsiotsdk numpy"

Is pip3 installed on the device you are trying to deploy to? If not, then you'll need to install that on the device first.

AWS
Rob
answered 3 years ago
0

I just new it had to be something annoyingly simple.
Quite embarrassing this is.
thank you Rob, you are correct.

answered 3 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