(nucleus): issues with IDT for greengrass v2 cloudcomponent test failed
Closed this issue · 2 comments
Describe the bug
I am tyring to use IDT for greengrass v2 following
https://docs.aws.amazon.com/greengrass/v2/developerguide/device-config-setup.html
by following the official guide
after by launching greengrass with
sudo -E java -Droot="/test/greengrass/v2" -Dlog.store=FILE -jar ./GreengrassInstaller/lib/Greengrass.jar --aws-region us-west-2 --thing-name IM30 --thing-group-name GreengrassQuickStartGroup_test --component-default-user root:root --provision true --setup-system-service true --deploy-dev-tools true
it shows
"Successfully set up Nucleus as a system service"
my effectiveConfig.yaml :
---
system:
certificateFilePath: "/test/greengrass/v2/thingCert.crt"
privateKeyPath: "/test/greengrass/v2/privKey.key"
rootCaPath: "/test/greengrass/v2/rootCA.pem"
rootpath: "/test/greengrass/v2"
thingName: "IM30"
services:
aws.greengrass.LocalHelloWorld:
componentType: "GENERIC"
configuration: {}
dependencies: []
lifecycle:
Run: "java -DcomponentName=\"HelloWorld\" -jar /test/greengrass/v2/packages/artifacts/aws.greengrass.LocalHelloWorld/1.0.0/cloudcomponent.jar"
version: "1.0.0"
aws.greengrass.Nucleus:
componentType: "NUCLEUS"
configuration:
awsRegion: "us-west-2"
componentStoreMaxSizeBytes: "10000000000"
deploymentPollingFrequencySeconds: "15"
envStage: "prod"
fleetStatus:
periodicStatusPublishIntervalSeconds: 86400
greengrassDataPlaneEndpoint: ""
greengrassDataPlanePort: "8443"
httpClient: {}
interpolateComponentConfiguration: false
iotCredEndpoint: "xx.credentials.iot.us-west-2.amazonaws.com"
iotDataEndpoint: "xx-ats.iot.us-west-2.amazonaws.com"
iotRoleAlias: "GreengrassV2TokenExchangeRoleAlias"
jvmOptions: "-Dlog.store=FILE"
logging: {}
mqtt:
spooler: {}
networkProxy:
proxy: {}
platformOverride: {}
runWithDefault:
posixShell: "sh"
posixUser: "root:root"
telemetry: {}
dependencies: []
lifecycle:
bootstrap:
requiresPrivilege: "true"
script: "\nset -eu\nKERNEL_ROOT=\"/test/greengrass/v2\"\nUNPACK_DIR=\"/test/greengrass/v2/packages/artifacts-unarchived/aws.greengrass.Nucleus/2.9.4/aws.greengrass.nucleus\"\
\nrm -r \"$KERNEL_ROOT\"/alts/current/*\necho \"-Dlog.store=FILE\" > \"\
$KERNEL_ROOT/alts/current/launch.params\"\nln -sf \"$UNPACK_DIR\" \"$KERNEL_ROOT/alts/current/distro\"\
\nexit 100"
version: "2.9.4"
DeploymentService:
ComponentToGroups:
aws.greengrass.LocalHelloWorld:
"4e69ead5-a595-4b96-a7c8-45da74475fe0": "LOCAL_DEPLOYMENT"
dependencies: []
GroupToLastDeployment:
LOCAL_DEPLOYMENT:
configArn: null
timestamp: 1679992938275
thing/IM30:
configArn: "arn:aws:greengrass:us-west-2:116407744508:configuration:thing/IM30:111"
timestamp: 1679993636499
thinggroup/GreengrassQuickStartGroup_test:
configArn: "arn:aws:greengrass:us-west-2:116407744508:configuration:thinggroup/GreengrassQuickStartGroup_test:51"
timestamp: 1679993661994
GroupToRootComponents:
LOCAL_DEPLOYMENT:
aws.greengrass.LocalHelloWorld:
groupConfigArn: "4e69ead5-a595-4b96-a7c8-45da74475fe0"
groupConfigName: "LOCAL_DEPLOYMENT"
version: "1.0.0"
thing/IM30: {}
thinggroup/GreengrassQuickStartGroup_test: {}
runtime:
ProcessedDeployments:
"1679993661353":
ConfigurationArn: "arn:aws:greengrass:us-west-2:116407744508:configuration:thing/IM30:111"
DeploymentId: "arn:aws:greengrass:us-west-2:116407744508:configuration:thing/IM30:111"
DeploymentRootPackages: []
DeploymentStatus: "SUCCEEDED"
DeploymentStatusDetails:
detailed-deployment-status: "SUCCESSFUL"
DeploymentType: "SHADOW"
GreengrassDeploymentId: "ef974963-4dfe-49a4-a1fc-73c8aa49a545"
version: "0.0.0"
FleetStatusService:
dependencies: []
lastPeriodicUpdateTime: 1679981624527
sequenceNumber: 122
version: "0.0.0"
main:
dependencies:
- "FleetStatusService:HARD"
- "DeploymentService:HARD"
- "aws.greengrass.LocalHelloWorld"
- "TelemetryAgent:HARD"
- "aws.greengrass.Nucleus"
- "UpdateSystemPolicyService:HARD"
- "aws.greengrass.Nucleus"
lifecycle: {}
runtime:
service-digest: {}
TelemetryAgent:
dependencies: []
runtime:
lastPeriodicAggregationMetricsTime: 1679981624784
lastPeriodicPublishMetricsTime: 1679981624784
version: "0.0.0"
UpdateSystemPolicyService:
dependencies: []
version: "0.0.0"
however while I launch the deployment of idt with command:
./devicetester_linux_x86-64 run-suite --suite-id GGV2Q_2.5.0 --userdate userdata.json
the test_manager.log in idt shows
[ERROR] [2023-03-28 16:56:12]: Test exited unsuccessfully testCaseId=cloudcomponent error=exit status 1 executionId=9f12b10c-cd42-11ed-bb24-080027641c32
[INFO] [2023-03-28 16:56:12]: All tests finished. executionId=9f12b10c-cd42-11ed-bb24-080027641c32
[INFO] [2023-03-28 16:56:13]:
========== Test Summary ==========
Execution Time: 26m50s
Tests Completed: 7
Tests Passed: 6
Tests Failed: 1
Tests Skipped: 0
----------------------------------
Test Groups:
lambdadeployment: PASSED
mqtt: PASSED
component: FAILED
pretestvalidation: PASSED
coredependencies: PASSED
version: PASSED
----------------------------------
Failed Tests:
Group Name: component
Test Name: cloudcomponent
Reason: Failed at 'the Greengrass deployment is COMPLETED on the device after 180 seconds'
----------------------------------
Path to AWS IoT Device Tester Report: /home/user/test/devicetester_greengrass_v2_linux/results/20230328T162913/awsiotdevicetester_report.xml
Path to Test Execution Logs: /home/user/test/devicetester_greengrass_v2_linux/results/20230328T162913/logs
Path to Aggregated JUnit Report: /home/user/test/devicetester_greengrass_v2_linux/results/20230328T162913/GGV2Q_Report.xml
==================================
logs/component/cloudcomponent
greengrass_2023_03_28_05_0.log shows:
2023-03-28T05:33:10.582Z [INFO] (main) com.aws.greengrass.deployment.DeviceConfiguration: Copy Nucleus artifacts to component store. {destination=/test/greengrass/v2/packages/artifacts-unarchived/aws.greengrass.Nucleus/2.9.4/aws.greengrass.nucleus, source=/test/GreengrassInstaller}
2023-03-28T05:33:37.517Z [INFO] (main) com.aws.greengrass.lifecyclemanager.KernelLifecycle: Waiting for services to shutdown. {}
2023-03-28T05:33:37.543Z [INFO] (main) com.aws.greengrass.lifecyclemanager.Kernel: effective-config-dump-complete. {file=/test/greengrass/v2/config/effectiveConfig.yaml}
2023-03-28T05:33:39.019Z [ERROR] (Copier) com.aws.greengrass.util.orchestration.SystemdUtils: systemd-setup. {stderr=Created symlink /etc/systemd/system/multi-user.target.wants/greengrass.service → /etc/systemd/system/greengrass.service., command=systemctl enable greengrass.service}
2023-03-28T05:33:39.889Z [INFO] (main) com.aws.greengrass.util.orchestration.SystemdUtils: systemd-setup. Successfully set up systemd service. {}
2023-03-28T05:33:39.891Z [INFO] (main) com.aws.greengrass.lifecyclemanager.KernelLifecycle: system-shutdown. {main=null}
2023-03-28T05:33:39.902Z [INFO] (main) com.aws.greengrass.lifecyclemanager.KernelLifecycle: Waiting for services to shutdown. {}
2023-03-28T05:33:39.933Z [INFO] (main) com.aws.greengrass.lifecyclemanager.Kernel: effective-config-dump-complete. {file=/test/greengrass/v2/config/effectiveConfig.yaml}
2023-03-28T05:33:39.937Z [INFO] (Serialized listener processor) com.aws.greengrass.lifecyclemanager.KernelLifecycle: executor-service-shutdown-initiated. {}
2023-03-28T05:33:39.938Z [INFO] (main) com.aws.greengrass.lifecyclemanager.KernelLifecycle: Waiting for executors to shutdown. {}
2023-03-28T05:33:39.940Z [INFO] (main) com.aws.greengrass.lifecyclemanager.KernelLifecycle: executor-service-shutdown-complete. {executor-terminated=true, scheduled-executor-terminated=true}
2023-03-28T05:33:39.941Z [INFO] (main) com.aws.greengrass.lifecyclemanager.KernelLifecycle: context-shutdown-initiated. {}
2023-03-28T05:33:39.945Z [INFO] (main) com.aws.greengrass.lifecyclemanager.KernelLifecycle: context-shutdown-complete. {}
greengrass.log shows:
2023-03-28T08:04:47.946Z [ERROR] (pool-2-thread-36) com.aws.greengrass.deployment.DeploymentService: Error occurred while processing deployment. {deploymentId=3969e50c-5002-4b97-93aa-8640e11b3985, serviceName=DeploymentService, currentState=RUNNING}
2023-03-28T08:04:48.458Z [ERROR] (pool-2-thread-14) com.aws.greengrass.deployment.DeploymentService: Deployment task failed with following errors. {DeploymentId=arn:aws:greengrass:us-west-2:116407744508:configuration:thing/IM30:94, detailed-deployment-status=FAILED_NO_STATE_CHANGE, deployment-error-types=[DEVICE_ERROR], GreengrassDeploymentId=3969e50c-5002-4b97-93aa-8640e11b3985, serviceName=DeploymentService, currentState=RUNNING, deployment-error-stack=[DEPLOYMENT_FAILURE, COMPONENT_PACKAGE_LOADING_ERROR, LOCAL_RECIPE_NOT_FOUND]}
2023-03-28T08:04:48.521Z [ERROR] (pool-2-thread-14) com.aws.greengrass.deployment.DeploymentDirectoryManager: Unable to preserve artifacts from the last deployment. {}
To Reproduce
See above.
Expected behavior
IDT for greengrass v2 pass all of the test
Actual behavior
IDT for greengrass v2 failed on cloud component test
Environment
- OS: device for greengrass Yocto linux aacch64
- device for idt Ubuntu 22.04.1 LTS
- JDK version:"openjdk version "1.8.0_282"
- Nucleus version:2.9.4
- IDT version:4.7.0
Additional context
Notice the same error on #876 (comment)
not sure if it is related
but other test Pass
This repository is not for IDT. Please create a support case in the AWS Console, or post on repost.aws.
This repository is not for IDT. Please create a support case in the AWS Console, or post on repost.aws.
Sorry for that. I thought I found the same error here.