(nucleus):IDT 4.7.0 for greengrass v2 cloudcomponent test failed Failed at 'the Greengrass deployment is COMPLETED on the device after 180 seconds

0

Describe the Error

Running IDT shows error in cloudcomponent log

the Greengrass deployment is COMPLETED on the device after 180 seconds

comes up with

2023-Mar-29 10:22:22,494 [cloudComponent] [idt-c057b1fc3d6bc618a399] [ERROR] greengrass/features/cloudComponent.feature - Failed at step: 'the Greengrass deployment is COMPLETED on the device after 180 seconds'
java.lang.IllegalStateException: Deployment idt-c057b1fc3d6bc618a399-gg-deployment did not reach COMPLETED
        at com.aws.greengrass.testing.features.DeploymentSteps.deploymentSucceeds(DeploymentSteps.java:311) ~[AWSGreengrassV2TestingIDT-1.0.jar:?]
        at ✽.the Greengrass deployment is COMPLETED on the device after 180 seconds(classpath:greengrass/features/cloudComponent.feature:26) ~[?:?]
2023-Mar-29 10:22:22,510 [cloudComponent] [idt-c057b1fc3d6bc618a399] [INFO] greengrass/features/cloudComponent.feature - Finished step: 'the com.aws.HelloWorld log on the device contains the line "Hello World!!" within 20 seconds' with status SKIPPED
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}

it seems like the mqtt test also have same error in the log after a couple times of trying not sure the problem related to the error

but some how the mqtt test pass

./mqtt/mqttpubsub/greengrass_2023_03_29_01_0.log:2023-03-29T01:59:34.313Z [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}

Details:

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"

while watching systemctl status greengrass.service


root@i350-evk:/test/greengrass/v2# systemctl status greengrass.service
● greengrass.service - Greengrass Core
     Loaded: loaded (/etc/systemd/system/greengrass.service; enabled; vendor preset: disabled)
     Active: active (running) since Wed 2023-03-29 02:46:35 UTC; 16s ago
   Main PID: 11178 (sh)
      Tasks: 68 (limit: 3443)
     Memory: 277.0M
     CGroup: /system.slice/greengrass.service
             ├─11178 /bin/sh /test/greengrass/v2/alts/current/distro/bin/loader
             └─11182 java -Dlog.store=FILE -Dlog.store=FILE -Droot=/test/greengrass/v2 -jar /test/greengrass/v2/alts/current/distro/lib/Greengrass.jar --setup-system-service false

Mar 29 02:46:35 i350-evk systemd[1]: Started Greengrass Core.
Mar 29 02:46:35 i350-evk sh[11178]: Greengrass root: /test/greengrass/v2
Mar 29 02:46:35 i350-evk sh[11178]: Java executable: java
Mar 29 02:46:35 i350-evk sh[11178]: JVM options: -Dlog.store=FILE -Droot=/test/greengrass/v2
Mar 29 02:46:35 i350-evk sh[11178]: Nucleus options: --setup-system-service false
Mar 29 02:46:39 i350-evk sh[11182]: Launching Nucleus...
Mar 29 02:46:46 i350-evk sh[11182]: Launched Nucleus successfully.

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: "xxx.credentials.iot.us-west-2.amazonaws.com"
      iotDataEndpoint: "xxx-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-test-run.log shows:

2023-Mar-29 10:19:21,514 [cloudComponent] [idt-c057b1fc3d6bc618a399] [INFO] greengrass/features/cloudComponent.feature - Finished step: 'I create a Greengrass deployment with components' with status PASSED
2023-Mar-29 10:19:22,164 [cloudComponent] [idt-c057b1fc3d6bc618a399] [INFO] com.aws.greengrass.testing.resources.AbstractAWSResourceLifecycle - Created GreengrassDeployment in GreengrassV2Lifecycle
2023-Mar-29 10:19:22,165 [cloudComponent] [idt-c057b1fc3d6bc618a399] [INFO] com.aws.greengrass.testing.features.DeploymentSteps - Created Greengrass deployment: fe860f32-3236-4493-b71d-56e585382c0c
2023-Mar-29 10:19:22,166 [cloudComponent] [idt-c057b1fc3d6bc618a399] [INFO] greengrass/features/cloudComponent.feature - Finished step: 'I deploy the Greengrass deployment configuration to thing group' with status PASSED
2023-Mar-29 10:22:22,494 [cloudComponent] [idt-c057b1fc3d6bc618a399] [ERROR] greengrass/features/cloudComponent.feature - Failed at step: 'the Greengrass deployment is COMPLETED on the device after 180 seconds'
java.lang.IllegalStateException: Deployment idt-c057b1fc3d6bc618a399-gg-deployment did not reach COMPLETED
        at com.aws.greengrass.testing.features.DeploymentSteps.deploymentSucceeds(DeploymentSteps.java:311) ~[AWSGreengrassV2TestingIDT-1.0.jar:?]
        at ✽.the Greengrass deployment is COMPLETED on the device after 180 seconds(classpath:greengrass/features/cloudComponent.feature:26) ~[?:?]
2023-Mar-29 10:22:22,510 [cloudComponent] [idt-c057b1fc3d6bc618a399] [INFO] greengrass/features/cloudComponent.feature - Finished step: 'the com.aws.HelloWorld log on the device contains the line "Hello World!!" within 20 seconds' with status SKIPPED
2023-Mar-29 10:22:22,511 [cloudComponent] [idt-c057b1fc3d6bc618a399] [INFO] greengrass/features/cloudComponent.feature - Finished step: 'I create a Greengrass deployment with components' with status SKIPPED
2023-Mar-29 10:22:22,512 [cloudComponent] [idt-c057b1fc3d6bc618a399] [INFO] greengrass/features/cloudComponent.feature - Finished step: 'I deploy the Greengrass deployment configuration to thing group' with status SKIPPED
2023-Mar-29 10:22:22,513 [cloudComponent] [idt-c057b1fc3d6bc618a399] [INFO] greengrass/features/cloudComponent.feature - Finished step: 'the Greengrass deployment is COMPLETED on the device after 180 seconds' with status SKIPPED
2023-Mar-29 10:22:22,513 [cloudComponent] [idt-c057b1fc3d6bc618a399] [INFO] greengrass/features/cloudComponent.feature - Finished step: 'the com.aws.HelloWorld log on the device contains the line "Hello World Updated!!" within 20 seconds' with status SKIPPED

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

Additional context Notice the same error on https://github.com/aws-greengrass/aws-greengrass-nucleus/issues/876#issuecomment-786948524 not sure if it is related but other test Pass

5 Answers
1

Hello @loordb, Looking at your provided information I would suggest restarting greengrass and then re-running the tests again with the timeout-multiplier flag. This will increase the timeout of the tests and make sure what you are running into is not just simply a time issue.

To restart greengrass:

sudo service greengrass restart

To re-run tests with the timeout-multiplier:

./devicetester_linux_x86-64 run-suite --suite-id GGV2Q_2.5.0 --timeout-multiplier 5 --userdata userdata.json

If you are still running into an error, can you please post your latest greengrass_YYYY_MM_DD_HH_X.log again along side the deploymentId and the deployment lifecycle phases the device has gone through, and the timestamps for the phase transition.

Knowing this information will tell us if you are actually running into an error or if it is just a time issue.

Regards.

AWS
answered a year ago
  • HI @jrcarb-AWS I have upload the log below after following the steps you mentions help it can clarify the problem thx

0
Accepted Answer
loordb
answered a year ago
0

Hello @jrcarb-AWS after trying the steps you have mentioned

I have upload the full log in

https://github.com/yuchinchenTW/IDT_-forgreengrassv2_log/tree/123/20230330T093130

hope it helps to clarify the error

sudo service greengrass restart
./devicetester_linux_x86-64 run-suite --suite-id GGV2Q_2.5.0 --timeout-multiplier 5 --userdata userdata.json

the test_manager.log shows the same error:

10:31:25.930 [otf-1.0.0-SNAPSHOT] [mqtt] [idt-e44384162d7530cffc52] [INFO] com.aws.greengrass.testing.resources.AbstractAWSResourceLifecycle - Removed GreengrassDeployment in GreengrassV2Lifecycle
10:31:26.167 [otf-1.0.0-SNAPSHOT] [mqtt] [idt-e44384162d7530cffc52] [INFO] com.aws.greengrass.testing.resources.AbstractAWSResourceLifecycle - Removed GreengrassDeployment in GreengrassV2Lifecycle
10:31:26.493 [otf-1.0.0-SNAPSHOT] [mqtt] [idt-e44384162d7530cffc52] [INFO] com.aws.greengrass.testing.resources.AbstractAWSResourceLifecycle - Removed GreengrassComponent in GreengrassV2Lifecycle
10:31:26.774 [otf-1.0.0-SNAPSHOT] [mqtt] [idt-e44384162d7530cffc52] [INFO] com.aws.greengrass.testing.resources.AbstractAWSResourceLifecycle - Removed GreengrassComponent in GreengrassV2Lifecycle
10:31:27.569 [otf-1.0.0-SNAPSHOT] [mqtt] [idt-e44384162d7530cffc52] [INFO] com.aws.greengrass.testing.resources.AbstractAWSResourceLifecycle - Removed S3Object in S3Lifecycle
10:31:28.173 [otf-1.0.0-SNAPSHOT] [mqtt] [idt-e44384162d7530cffc52] [INFO] com.aws.greengrass.testing.resources.AbstractAWSResourceLifecycle - Removed S3Bucket in S3Lifecycle
10:31:28.179 [otf-1.0.0-SNAPSHOT] [mqtt] [idt-e44384162d7530cffc52] [INFO] com.aws.greengrass.testing.features.AWSResourcesSteps - Successfully removed externally created resources
10:31:28.182 [otf-1.0.0-SNAPSHOT] [mqtt] [idt-e44384162d7530cffc52] [INFO] com.aws.greengrass.testing.features.LoggerSteps - Clearing thread context on scenario: 'Component publishes MQTT message to Iot core and retrieves it as well'
10:31:28.186 [] [mqtt] [idt-e44384162d7530cffc52] [INFO] com.aws.greengrass.testing.launcher.reporting.StepTrackingReporting - Passed: 'Component publishes MQTT message to Iot core and retrieves it as well'
[INFO] [2023-03-30 10:31:32]: All tests finished. executionId=98b8bcae-ce9a-11ed-8691-080027641c32
[INFO] [2023-03-30 10:31:34]:

========== Test Summary ==========
Execution Time:         59m58s
Tests Completed:        7
Tests Passed:           6
Tests Failed:           1
Tests Skipped:          0
----------------------------------
Test Groups:
    lambdadeployment:           PASSED
    mqtt:                       PASSED
    pretestvalidation:          PASSED
    coredependencies:           PASSED
    version:                    PASSED
    component:                  FAILED
----------------------------------
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/20230330T093130/awsiotdevicetester_report.xml
Path to Test Execution Logs: /home/user/test/devicetester_greengrass_v2_linux/results/20230330T093130/logs
Path to Aggregated JUnit Report: /home/user/test/devicetester_greengrass_v2_linux/results/20230330T093130/GGV2Q_Report.xml
==================================

here is the log you asked not sure if it help because after hours of search seems nothing infom for me greengrass_2023_03_30_01_0.log see the log in the link due to the log is too long and cannot post in the comment

https://github.com/yuchinchenTW/IDT_-forgreengrassv2_log/blob/123/20230330T093130/logs/component/cloudcomponent/greengrass_2023_03_30_01_0.log

it seems like the error shows the same at greengrass-test-run.log

2023-Mar-30 10:01:55,825 [cloudComponent] [idt-63ea438cc5fbbf1a023d] [INFO] com.aws.greengrass.testing.features.DeploymentSteps - Created Greengrass deployment: cd08a43f-4ffe-4849-aebb-de46d9fc5ee9
2023-Mar-30 10:01:55,826 [cloudComponent] [idt-63ea438cc5fbbf1a023d] [INFO] greengrass/features/cloudComponent.feature - Finished step: 'I deploy the Greengrass deployment configuration to thing group' with status PASSED
2023-Mar-30 10:16:56,096 [cloudComponent] [idt-63ea438cc5fbbf1a023d] [ERROR] greengrass/features/cloudComponent.feature - Failed at step: 'the Greengrass deployment is COMPLETED on the device after 180 seconds'
java.lang.IllegalStateException: Deployment idt-63ea438cc5fbbf1a023d-gg-deployment did not reach COMPLETED
        at com.aws.greengrass.testing.features.DeploymentSteps.deploymentSucceeds(DeploymentSteps.java:311) ~[AWSGreengrassV2TestingIDT-1.0.jar:?]
        at ✽.the Greengrass deployment is COMPLETED on the device after 180 seconds(classpath:greengrass/features/cloudComponent.feature:26) ~[?:?]

notice that the idt environment and greengrass device do have the time difference (UTC+8 && UTC+0 ;8 hours diff) but we think that the time differ does not causing the result of the error I mean it should work even if the device is in different places

loordb
answered a year ago
  • Hello @loordb,

    First off, thank you for submitting all of your logs, it was really helpful in debugging the issue. From your cloudcomponent/greengrass.log logs we can see that the component deployment started at around 1:58, and finished deployment successfully at around 2:31. Which means the deployment took around more than 30 mins, so my previous timeout multiplier was not enough. Can you please try again with a timeout multiplier of 12?

    ./devicetester_linux_x86-64 run-suite --suite-id GGV2Q_2.5.0 --timeout-multiplier 12 --userdata userdata.json

    Regards.

  • Hello @jrcarb-AWS thx for the early reply, we have tried the command you have mentioned see the result below, seems like the same error still happening, we also have upload the new tesing log to git hope it helps

0

Hello @jrcarb-AWS after trying with the command which you have mentioned

./devicetester_linux_x86-64 run-suite --suite-id GGV2Q_2.5.0 --timeout-multiplier 12 --userdata userdata.json

seems like the same error still happened

after couple times of trying

the log have upload to the link below

https://github.com/yuchinchenTW/IDT_-forgreengrassv2_log/tree/123/20230331T102452

12:26:58.321 [otf-1.0.0-SNAPSHOT] [cloudComponent] [idt-07ade2fc27374da68d46] [INFO] com.aws.greengrass.testing.DefaultGreengrass - Leaving Greengrass running on pid: 0
12:26:58.322 [otf-1.0.0-SNAPSHOT] [cloudComponent] [idt-07ade2fc27374da68d46] [INFO] com.aws.greengrass.testing.features.FileSteps - Stopping Greengrass service..
12:27:24.342 [otf-1.0.0-SNAPSHOT] [cloudComponent] [idt-07ade2fc27374da68d46] [INFO] com.aws.greengrass.testing.features.FileSteps - Starting Greengrass service..
12:27:24.896 [otf-1.0.0-SNAPSHOT] [cloudComponent] [idt-07ade2fc27374da68d46] [INFO] com.aws.greengrass.testing.resources.AbstractAWSResourceLifecycle - Removed GreengrassDeployment in GreengrassV2Lifecycle
12:27:25.215 [otf-1.0.0-SNAPSHOT] [cloudComponent] [idt-07ade2fc27374da68d46] [INFO] com.aws.greengrass.testing.resources.AbstractAWSResourceLifecycle - Removed GreengrassDeployment in GreengrassV2Lifecycle
12:27:25.437 [otf-1.0.0-SNAPSHOT] [cloudComponent] [idt-07ade2fc27374da68d46] [INFO] com.aws.greengrass.testing.resources.AbstractAWSResourceLifecycle - Removed GreengrassDeployment in GreengrassV2Lifecycle
12:27:25.711 [otf-1.0.0-SNAPSHOT] [cloudComponent] [idt-07ade2fc27374da68d46] [INFO] com.aws.greengrass.testing.resources.AbstractAWSResourceLifecycle - Removed GreengrassComponent in GreengrassV2Lifecycle
12:27:26.373 [otf-1.0.0-SNAPSHOT] [cloudComponent] [idt-07ade2fc27374da68d46] [INFO] com.aws.greengrass.testing.resources.AbstractAWSResourceLifecycle - Removed S3Object in S3Lifecycle
12:27:26.883 [otf-1.0.0-SNAPSHOT] [cloudComponent] [idt-07ade2fc27374da68d46] [INFO] com.aws.greengrass.testing.resources.AbstractAWSResourceLifecycle - Removed S3Bucket in S3Lifecycle
12:27:26.884 [otf-1.0.0-SNAPSHOT] [cloudComponent] [idt-07ade2fc27374da68d46] [INFO] com.aws.greengrass.testing.features.AWSResourcesSteps - Successfully removed externally created resources
12:27:26.885 [otf-1.0.0-SNAPSHOT] [cloudComponent] [idt-07ade2fc27374da68d46] [INFO] com.aws.greengrass.testing.features.LoggerSteps - Clearing thread context on scenario: 'As a developer, I can create a component in Cloud and deploy it on my device via thing group'
12:27:26.885 [] [cloudComponent] [idt-2e3f3b9d5e6bd3bcce32] [INFO] com.aws.greengrass.testing.launcher.reporting.StepTrackingReporting - Passed: 'As a developer, I can create a component in Cloud and deploy it on my device'
12:27:26.886 [] [cloudComponent] [idt-07ade2fc27374da68d46] [ERROR] com.aws.greengrass.testing.launcher.reporting.StepTrackingReporting - Failed: 'As a developer, I can create a component in Cloud and deploy it on my device via thing group': Failed at 'the Greengrass deployment is COMPLETED on the device after 180 seconds'
12:27:27.131 [] [] [] [INFO] com.aws.greengrass.testing.modules.AWSResourcesCleanupModule - Cleaned up TestContext{testId=TestId{prefix=idt, id=2e3f3b9d5e6bd3bcce32}, testDirectory=/tmp/gg-testing-6897313184919651577/idt-2e3f3b9d5e6bd3bcce32, testResultsPath=/home/user/test/devicetester_greengrass_v2_linux/results/20230331T102452/logs/component/cloudcomponent, cleanupContext=CleanupContext{persistAWSResources=false, persistInstalledSoftware=true, persistGeneratedFiles=false}, initializationContext=InitializationContext{persistModes=[installed.software], persistAWSResources=false, persistInstalledSoftware=true, persistGeneratedFiles=false}, logLevel=DEBUG, installRoot=/test/greengrass/v2, currentUser=ggc_user, coreThingName=IM30, coreVersion=2.9.4, tesRoleName=GreengrassV2TokenExchangeRole, hsmConfigured=false, trustedPluginsPaths=[]}
[ERROR] [2023-03-31 12:27:30]: Test exited unsuccessfully executionId=38162d05-cf6b-11ed-b7ea-080027641c32 testCaseId=cloudcomponent error=exit status 1
[INFO] [2023-03-31 12:27:30]: All tests finished. executionId=38162d05-cf6b-11ed-b7ea-080027641c32
[INFO] [2023-03-31 12:27:33]: 

========== Test Summary ==========
Execution Time: 	2h2m32s
Tests Completed: 	7
Tests Passed: 		6
Tests Failed: 		1
Tests Skipped: 		0
----------------------------------
Test Groups:
    pretestvalidation: 		PASSED
    coredependencies: 		PASSED
    version: 			PASSED
    mqtt: 			PASSED
    lambdadeployment: 		PASSED
    component: 			FAILED
----------------------------------
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/20230331T102452/awsiotdevicetester_report.xml
Path to Test Execution Logs: /home/user/test/devicetester_greengrass_v2_linux/results/20230331T102452/logs
Path to Aggregated JUnit Report: /home/user/test/devicetester_greengrass_v2_linux/results/20230331T102452/GGV2Q_Report.xml
==================================

also upload our config help here hope it helps

config.json

{
  "log": {
    "location": "../logs/"
  },
  "configFiles": {
    "root": "../configs",
    "device": "../configs/device.json"
  },
  "testPath": "../tests/",
  "reportPath": "../results/",
  "certificatePath": "../certificates/",
  "awsRegion": "us-west-2",
  "auth": {
    "method": "environment"
  }
}

device.json

[
  {
    "id": "IM30",
    "sku": "IM30",
    "features": [
      {
        "name": "arch",
        "value": "aarch64"
      },
      {
        "name": "ml",
        "value": "no"
      },
      {
        "name": "docker",
        "value": "no"
      },
      {
        "name": "streamManagement",
        "value": "no"
      },
      {
        "name": "hsi",
        "value": "no"
      }
    ],
    "devices": [
      {
        "id": "test",
        "operatingSystem": "Linux",
        "connectivity": {
          "protocol": "ssh",
          "ip": "192.168.120.29",
          "port": 22,
          "auth": {
            "method": "password",
            "credentials": {
              "user": "root",
              "password": "123"
            }
          }
        }
      }
    ]
  }
]

loordb
answered a year ago
  • later on we also have tried ./devicetester_linux_x86-64 run-suite --suite-id GGV2Q_2.5.0 --timeout-multiplier 20 --userdata userdata.json and the log shows the same error . Notice that we disconnect the ssh while after we see the same cloudcomponent error log in the log (because it take too long to test in --timeout-multiplier 20) so it will show the ssh disconnect log at the end

    17:45:40.765 [otf-1.0.0-SNAPSHOT] [cloudComponent] [idt-4c42025f3cf8ba495b5d] [ERROR] com.aws.greengrass.testing.idt.IDTDevice - Failed to execute a command on null, CommandInput{line=sh, workingDirectory=null, input=null, timeout=null, args=[-c, systemctl stop greengrass.service]}
    com.amazonaws.iot.idt.exception.IDTServiceException: failed to execute on device: couldn't connect a remote session with error: ssh: unexpected packet in response to channel open: <nil>
    
    	at com.amazonaws.iot.idt.IDTCredentialsInterceptor.enrich(IDTCredentialsInterceptor.java:73)
    	at com.amazonaws.iot.idt.IDTCredentialsInterceptor.intercept(IDTCredentialsInterceptor.java:56)
    

    Before that all of the log seeems the same see the --timeout-multiplier 20 log in the link https://github.com/yuchinchenTW/IDT_-forgreengrassv2_log/tree/123/20230331T141120/logs

0

Hello

Based on the logs, after the timeout multiplier of 20 is applied, the cloud component test indeed went through all the steps without any issue. But, something triggered the retry of the same test, and during the retry the ssh timeout led to the failure.

My hypothesis is that, since this is a preinstalled Greengrass running for long time, the accumulated logs are coming in the way of the testcases to run properly. While IDT/Greengrass teams look into hardening the testcases in this particular usecase, I have one suggestion for you to try.

Can you please stop Greengrass, remove all the logs in logs folder, and restart the Greengrass installation, before running the tests again, with 20 multiplier.

AWS
answered a year 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