AWS IoT Greengrass -Lambda manager state is broken

0

I was successfully setup my pi4 as core device, and some components works fine like IP detector in the console.

I was plan to setup Modbus RTU inbuilt component and the component is installed successfully. but the dependencies like Lambda Manager occurs broken state.

In Greengrass log, its shows some version error.

If I manually change the version it could not reflect in my local core device.

Logs:

com.aws.greengrass.deployment.IotJobsHelper: Added the job to the queue. {ThingName=my-rasperrypi, JobId=f395b688-df36-4d62} 2024-04-30T13:24:23.031Z [INFO] (pool-3-thread-26) com.aws.greengrass.deployment.DeploymentService: Received deployment in the queue. {DeploymentId=f395b688-d123-4d62-b123-14044b1b1234, GreengrassDeploymentId=null, DeploymentType=IOT_JOBS, serviceName=DeploymentService, currentState=RUNNING} 2024-04-30T13:24:23.032Z [INFO] (pool-3-thread-26) com.aws.greengrass.deployment.DeploymentService: Received deployment document in queue. {document={"configurationValidationPolicy":{"timeout":60.0},"components":{"aws.greengrass.Cli":{"version":"2.2.0","runWith":{}},"aws.greengrass.LambdaLauncher":{"version":"2.0.6"},"aws.greengrass.TokenExchangeService":{"version":"2.0.3"},"aws.greengrass.LambdaRuntimes":{"version":"2.0.8"},"aws.greengrass.LocalDebugConsole":{"version":"2.4.2"},"aws.greengrass.Modbus":{"version":"2.1.8","configurationUpdate":{"merge":{"lambdaExecutionParameters":{"EnvironmentVariables":{"ModbusLocalPort":"/dev/ttyUSB0"}},"containerMode":"NoContainer"}},"runWith":{}},"aws.greengrass.LambdaManager":{"version":"2.3.3","configurationUpdate":{"merge":{"RESET":[""]}},"runWith":{}},"aws.greengrass.Nucleus":{"version":"2.2.0"},"aws.greengrass.clientdevices.IPDetector":{"version":"2.1.9"},"aws.greengrass.LegacySubscriptionRouter":{"version":"2.1.11","configurationUpdate":{"merge":{"subscriptions":{"aws-greengrass-modbus":{"id":"aws-greengrass-modbus","source":"arn:aws:lambda:ap-south-1-544924697444:aws:function:aws-greengrass-modbus:version=2.1.8","subject":"modbus/adapter/response","target":"cloud"}}}},"runWith":{}}},"componentUpdatePolicy":{"timeout":60.0,"action":"NOTIFY_COMPONENTS"},"schemaDate":"2021-05-17","deploymentId":"a8a2471f-b1234-4123-9312-ecc88d1e0d32","creationTimestamp":1.714483451358E12,"deploymentName":"Deployment for mypi-group","failureHandlingPolicy":"DO_NOTHING","configurationArn":"arn:aws:greengrass:ap-south-1:544924697444:configuration:thinggroup/mypi-group:46","requiredCapabilities":[]}, serviceName=DeploymentService, currentState=RUNNING} 2024-04-30T13:24:23.113Z [INFO] (pool-3-thread-26) com.aws.greengrass.deployment.DeploymentStatusKeeper: Stored deployment status. {DeploymentId=f395b688-df36-4d62-bf57-14044b12312, GreengrassDeploymentId=a8a2471f-bea4-404e-93fd-ecc88d1e1234, DeploymentStatus=IN_PROGRESS} 2024-04-30T13:24:23.115Z [INFO] (pool-3-thread-26) com.aws.greengrass.deployment.IotJobsHelper: Updating status of persisted deployment. {Status=IN_PROGRESS, StatusDetails={}, ThingName=my-rasperrypi, JobId=f395b688-df36-4d62-bf57-14044b1b7988} 2024-04-30T13:24:23.257Z [INFO] (AwsEventLoop 4) com.aws.greengrass.deployment.IotJobsHelper: Job status update was accepted. {Status=IN_PROGRESS, ThingName=my-rasperrypi, JobId=f395b688-df36-4d62-bf57-14044b1b7988} 2024-04-30T13:24:23.338Z [INFO] (pool-3-thread-26) com.aws.greengrass.deployment.DeploymentDirectoryManager: Create work directory for new deployment. {deploymentId=a8a2471f-bea4-404e-93fd-ecc88d1e0d32, link=/greengrass/v2/deployments/ongoing, directory=/greengrass/v2/deployments/a8a2471f-bea4-404e-93fd-ecc88d1e0d32} 2024-04-30T13:24:23.339Z [INFO] (pool-3-thread-26) com.aws.greengrass.deployment.DeploymentDirectoryManager: Saving deployment metadata to file. {file=/greengrass/v2/deployments/a8a2471f-bea4-404e-93fd-ecc88d1e0d32/deployment_metadata.json, deploymentId=a8a2471f-bea4-404e-93fd-ecc88d1e0d32} 2024-04-30T13:24:23.352Z [INFO] (pool-3-thread-26) com.aws.greengrass.deployment.DeploymentService: Started deployment execution. {serviceName=DeploymentService, currentState=RUNNING, deployment=f395b688-df36-4d62-bf57-14044b1234} 2024-04-30T13:24:23.353Z [INFO] (pool-3-thread-38) com.aws.greengrass.deployment.DeploymentService: deployment-task-execution. Starting deployment task. {Deployment service config={ComponentToGroups={aws.greengrass.Cli={arn:aws:greengrass:ap-south-1:512324697444:configuration:thinggroup/mypi-group:28=thinggroup/mypi-group}, aws.greengrass.clientdevices.IPDetector={arn:aws:greengrass:ap-south-1:544924697444:configuration:thinggroup/mypi-group:28=thinggroup/mypi-group}, aws.greengrass.LambdaLauncher={arn:aws:greengrass:ap-south-1:544924697444:configuration:thinggroup/mypi-group:28=thinggroup/mypi-group}, aws.greengrass.LambdaManager={arn:aws:greengrass:ap-south-1:544924697444:configuration:thinggroup/mypi-group:28=thinggroup/mypi-group}, aws.greengrass.LambdaRuntimes={arn:aws:greengrass:ap-south-1:544924697444:configuration:thinggroup/mypi-group:28=thinggroup/mypi-group}, aws.greengrass.LegacySubscriptionRouter={arn:aws:greengrass:ap-south-1:544924697444:configuration:thinggroup/mypi-group:28=thinggroup/mypi-group}, aws.greengrass.LocalDebugConsole={arn:aws:greengrass:ap-south-1:544924697444:configuration:thinggroup/mypi-group:28=thinggroup/mypi-group}, aws.greengrass.Modbus={arn:aws:greengrass:ap-south-1:544924697444:configuration:thinggroup/mypi-group:28=thinggroup/mypi-group}, aws.greengrass.Nucleus={arn:aws:greengrass:ap-south-1:544924697444:configuration:thinggroup/mypi-group:28=thinggroup/mypi-group}, aws.greengrass.TokenExchangeService={arn:aws:greengrass:ap-south-1:544924697444:configuration:thinggroup/mypi-group:28=thinggroup/mypi-group}}, dependencies=[], GroupMembership={thinggroup/mypi-group=null}, GroupToLastDeployment={thinggroup/mypi-group={configArn=arn:aws:greengrass:ap-south-1:544924697444:configuration:thinggroup/mypi-group:28, timestamp=1713360630032}}, GroupToRootComponents={thinggroup/mypi-group={aws.greengrass.Cli={groupConfigArn=arn:aws:greengrass:ap-south-1:544924697444:configuration:thinggroup/mypi-group:28, groupConfigName=thinggroup/mypi-group, version=2.12.4}, aws.greengrass.clientdevices.IPDetector={groupConfigArn=arn:aws:greengrass:ap-south-1:544924697444:configuration:thinggroup/mypi-group:28, groupConfigName=thinggroup/mypi-group, version=2.1.9}, aws.greengrass.LegacySubscriptionRouter={groupConfigArn=arn:aws:greengrass:ap-south-1:544924697444:configuration:thinggroup/mypi-group:28, groupConfigName=thinggroup/mypi-group, version=2.1.11}, aws.greengrass.LocalDebugConsole={groupConfigArn=arn:aws:greengrass:ap-south-1:544924697444:configuration:thinggroup/mypi-group:28, groupConfigName=thinggroup/mypi-group, version=2.4.2}, aws.greengrass.Modbus={groupConfigArn=arn:aws:greengrass:ap-south-1:544924697444:configuration:thinggroup/mypi-group:28, groupConfigName=thinggroup/mypi-group, version=2.1.8}}}, runtime={ProcessedDeployments={}}, version=0.0.0}, deploymentId=a8a21234-bea4-404e-93fd-ecc88d1e0d32, serviceName=DeploymentService, currentState=RUNNING} 2024-04-30T13:24:23.618Z [INFO] (pool-3-thread-39) com.aws.greengrass.componentmanager.DependencyResolver: resolve-all-group-dependencies-start. Start to resolve all groups dependencies. {allGroupTargets=[aws.greengrass.Cli, aws.greengrass.LambdaLauncher, aws.greengrass.TokenExchangeService, aws.greengrass.LambdaRuntimes, aws.greengrass.LocalDebugConsole, aws.greengrass.Modbus, aws.greengrass.LambdaManager, aws.greengrass.Nucleus, aws.greengrass.clientdevices.IPDetector, aws.greengrass.LegacySubscriptionRouter], componentToVersionRequirements={aws.greengrass.Cli={thinggroup/mypi-group==2.2.0}, aws.greengrass.LambdaLauncher={thinggroup/mypi-group==2.0.6}, aws.greengrass.TokenExchangeService={thinggroup/mypi-group==2.0.3}, aws.greengrass.LambdaRuntimes={thinggroup/mypi-group==2.0.8}, aws.greengrass.LocalDebugConsole={thinggroup/mypi-group==2.4.2}, aws.greengrass.Modbus={thinggroup/mypi-group==2.1.8}, aws.greengrass.LambdaManager={thinggroup/mypi-group==2.3.3}, aws.greengrass.Nucleus={thinggroup/mypi-group==2.2.0}, aws.greengrass.clientdevices.IPDetector={thinggroup/mypi-group==2.1.9}, aws.greengrass.LegacySubscriptionRouter={thinggroup/mypi-group==2.1.11}}} 2024-04-30T13:24:23.619Z [INFO] (pool-3-thread-39) com.aws.greengrass.componentmanager.ComponentManager: No running component satisfies the requirement. Searching in the local component store.. {} 2024-04-30T13:24:23.620Z [INFO] (pool-3-thread-39) com.aws.greengrass.componentmanager.ComponentManager: Found the best local candidate that satisfies the requirement.. {LocalCandidateId=aws.greengrass.Cli-v2.2.0} 2024-04-30T13:24:23.828Z [INFO] (pool-3-thread-39) com.aws.greengrass.componentmanager.ComponentManager: resolve-component-version-end. Resolved component version.. {ResolvedComponent=aws.greengrass.Cli-v2.2.0} 2024-04-30T13:24:23.835Z [INFO] (pool-3-thread-39) com.aws.greengrass.componentmanager.ComponentManager: No running component satisfies the requirement. Searching in the local component store.. {} 2024-04-30T13:24:23.836Z [INFO] (pool-3-thread-39) com.aws.greengrass.componentmanager.ComponentManager: Found the best local candidate that satisfies the requirement.. {LocalCandidateId=aws.greengrass.Nucleus-v2.2.0} 2024-04-30T13:24:24.048Z [INFO] (pool-3-thread-39) com.aws.greengrass.componentmanager.ComponentManager: resolve-component-version-end. Resolved component version.. {ResolvedComponent=aws.greengrass.Nucleus-v2.2.0} 2024-04-30T13:24:24.053Z [INFO] (pool-3-thread-39) com.aws.greengrass.componentmanager.ComponentManager: No running component satisfies the requirement. Searching in the local component store.. {} 2024-04-30T13:24:24.054Z [INFO] (pool-3-thread-39) com.aws.greengrass.componentmanager.ComponentManager: Found the best local candidate that satisfies the requirement.. {LocalCandidateId=aws.greengrass.LambdaLauncher-v2.0.6} 2024-04-30T13:24:24.241Z [INFO] (pool-3-thread-39) com.aws.greengrass.componentmanager.ComponentManager: resolve-component-version-end. Resolved component version.. {ResolvedComponent=aws.greengrass.LambdaLauncher-v2.0.6} 2024-04-30T13:24:24.250Z [INFO] (pool-3-thread-39) com.aws.greengrass.componentmanager.ComponentManager: No running component satisfies the requirement. Searching in the local component store.. {} 2024-04-30T13:24:24.252Z [INFO] (pool-3-thread-39) com.aws.greengrass.componentmanager.ComponentManager: Can't find a local candidate that satisfies the requirement.. {} 2024-04-30T13:24:24.447Z [ERROR] (pool-3-thread-39) com.aws.greengrass.componentmanager.ComponentManager: Failed to negotiate version with cloud and no local version to fall back to. {componentName=aws.greengrass.LambdaManager, versionRequirement={thinggroup/mypi-group==2.3.3, aws.greengrass.LambdaLauncher=>=2.0.0 <2.2.0}} 2024-04-30T13:24:24.448Z [ERROR] (pool-3-thread-38) com.aws.greengrass.deployment.DeploymentService: Error occurred while processing deployment. {deploymentId=a8a2471f-bea4-404e-93fd-ecc88d1e0d32, serviceName=DeploymentService, currentState=RUNNING} java.util.concurrent.ExecutionException: com.aws.greengrass.componentmanager.exceptions.NoAvailableComponentVersionException: No local or cloud component version satisfies the requirements Check whether the version constraints conflict and that the component exists in your AWS account with a version that matches the version constraints. If the version constraints conflict, revise deployments to resolve the conflict. Component aws.greengrass.LambdaManager version constraints: thinggroup/mypi-group requires =2.3.3, aws.greengrass.LambdaLauncher requires >=2.0.0 <2.2.0. at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191) at com.aws.greengrass.deployment.DefaultDeploymentTask.call(DefaultDeploymentTask.java:127) at com.aws.greengrass.deployment.DefaultDeploymentTask.call(DefaultDeploymentTask.java:50) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:840) Caused by: com.aws.greengrass.componentmanager.exceptions.NoAvailableComponentVersionException: No local or cloud component version satisfies the requirements Check whether the version constraints conflict and that the component exists in your AWS account with a version that matches the version constraints. If the version constraints conflict, revise deployments to resolve the conflict. Component aws.greengrass.LambdaManager version constraints: thinggroup/mypi-group requires =2.3.3, aws.greengrass.LambdaLauncher requires >=2.0.0 <2.2.0. at com.aws.greengrass.componentmanager.ComponentManager.negotiateVersionWithCloud(ComponentManager.java:230) at com.aws.greengrass.componentmanager.ComponentManager.resolveComponentVersion(ComponentManager.java:165) at com.aws.greengrass.componentmanager.DependencyResolver.lambda$resolveDependencies$1(DependencyResolver.java:121) at com.aws.greengrass.componentmanager.DependencyResolver.resolveComponentDependencies(DependencyResolver.java:218) at com.aws.greengrass.componentmanager.DependencyResolver.resolveDependencies(DependencyResolver.java:118) at com.aws.greengrass.deployment.DefaultDeploymentTask.lambda$call$2(DefaultDeploymentTask.java:125) ... 4 more

2024-04-30T13:24:38.353Z [INFO] (pool-3-thread-26) com.aws.greengrass.deployment.DeploymentService: Current deployment finished. {DeploymentId=f395b688-df36-4d62-bf57-14044b1b1234, GreengrassDeploymentId=a8a2471f-bea4-404e-93fd-ecc88d12342, serviceName=DeploymentService, currentState=RUNNING} 2024-04-30T13:24:38. [ERROR] (pool-3-thread-26) com.aws.greengrass.deployment.DeploymentService: Deployment task failed with following errors. {DeploymentId=f395b688-df36-4d62-bf57-14044b11234, detailed-deployment-status=FAILED_NO_STATE_CHANGE, deployment-error-types=[REQUEST_ERROR], GreengrassDeploymentId=a8a2471f-bea4-404e-93fd-ecc881234d32, serviceName=DeploymentService, currentState=RUNNING, deployment-error-stack=[DEPLOYMENT_FAILURE, NO_AVAILABLE_COMPONENT_VERSION, COMPONENT_VERSION_REQUIREMENTS_NOT_MET]} com.aws.greengrass.componentmanager.exceptions.NoAvailableComponentVersionException: Enter image description here

2 個答案
0
已接受的答案

Hi. Your deployment contains version 2.0.6 of the aws.greengrass.LambaLauncher and 2.3.3 of aws.greengrass.LambdaManager:

2024-04-30T13:24:23.032Z [INFO] (pool-3-thread-26) com.aws.greengrass.deployment.DeploymentService: Received deployment document in queue. {document={"configurationValidationPolicy":{"timeout":60.0},"components":{"aws.greengrass.Cli":{"version":"2.2.0","runWith":{}},"aws.greengrass.LambdaLauncher":{"version":"2.0.6"},"aws.greengrass.TokenExchangeService":{"version":"2.0.3"},"aws.greengrass.LambdaRuntimes":{"version":"2.0.8"},"aws.greengrass.LocalDebugConsole":{"version":"2.4.2"},"aws.greengrass.Modbus":{"version":"2.1.8","configurationUpdate":{"merge":{"lambdaExecutionParameters":{"EnvironmentVariables":{"ModbusLocalPort":"/dev/ttyUSB0"}},"containerMode":"NoContainer"}},"runWith":{}},"aws.greengrass.LambdaManager":{"version":"2.3.3","configurationUpdate":{"merge":{"RESET":[""]}},"runWith":{}},"aws.greengrass.Nucleus":{"version":"2.2.0"},"aws.greengrass.clientdevices.IPDetector":{"version":"2.1.9"},"aws.greengrass.LegacySubscriptionRouter":{"version":"2.1.11","configurationUpdate":{"merge":{"subscriptions":{"aws-greengrass-modbus":{"id":"aws-greengrass-modbus","source":"arn:aws:lambda:ap-south-1-544924697444:aws:function:aws-greengrass-modbus:version=2.1.8","subject":"modbus/adapter/response","target":"cloud"}}}},"runWith":{}}},"componentUpdatePolicy":{"timeout":60.0,"action":"NOTIFY_COMPONENTS"},"schemaDate":"2021-05-17","deploymentId":"a8a2471f-b1234-4123-9312-ecc88d1e0d32","creationTimestamp":1.714483451358E12,"deploymentName":"Deployment for mypi-group","failureHandlingPolicy":"DO_NOTHING","configurationArn":"arn:aws:greengrass:ap-south-1:544924697444:configuration:thinggroup/mypi-group:46","requiredCapabilities":[]}, serviceName=DeploymentService, currentState=RUNNING}

This a conflict. aws.greengrass.LambaLauncher 2.0.6 requires aws.greengrass.LambdaManager versions >=2.0.0 <2.2.0. So I suggest you revise your deployment to include the latest LambdaLauncher, namely 2.0.13 (which seems to be already installed).

Also, you're deploying Nucleus and CLI (2.2.0). They're nearly 3 years old. I suggest you upgrade them to 2.12.5.

profile pictureAWS
專家
Greg_B
已回答 1 個月前
profile pictureAWS
專家
已審閱 1 個月前
  • Hi, If I revise the deployment, it can't reflect and it goes to previous changes.

0

Hi,

How are you revising the deployment? Are you updating the version for the LambdaManager as suggested by Greg? If yes, what is the error you see?

Thanks

AWS
sidsriv
已回答 1 個月前

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

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

回答問題指南