By using AWS re:Post, you agree to the Terms of Use
/[Greengrass][IDT] test component and MQTT failed with general info/

[Greengrass][IDT] test component and MQTT failed with general info

0

At current, my Greengrass core device (v2.5.5), is on my rasp 3b+ running normally with manual deployment from local/cloud. However, the IDT (version 4.5.3 with suite=GGV2Q_2.3.1) execution passed for 3/6 test cases as below only:

========== Test Summary ==========

  • Execution Time: 1m51s
  • Tests Completed: 6
  • Tests Passed: 3
  • Tests Failed: 3
  • Tests Skipped: 0

Test Groups:

  • pretestvalidation: PASSED
  • version: PASSED
  • coredependencies: PASSED
  • mqtt: FAILED
  • component: FAILED

Failed Tests:

  • Group Name: mqtt

Test Name: mqttpubsub; Reason: Failed at 'my device is running Greengrass

  • Group Name: component

Test Name: cloudcomponent; Reason: Failed at 'my device is running Greengrass' Test Name: localcomponent; Reason: Failed at 'my device is running Greengrass'


Is there further detail/meaningful info from these error log/code?

I have tried to look into the log folder but nothing else there.

I have attached all failed logs as below:

localcomponent:

  • time="22:48:06+07:00" level=info msg=22:48:06.237 [localdeployment] [INFO] com.aws.greengrass.testing.features.LoggerSteps - Attaching thread context to scenario: 'A component is deployed locally using CLI'
  • time="22:48:06+07:00" level=info msg=22:48:06.238 [localdeployment] [INFO] greengrass/features/localdeployment.feature - line 4: 'my device is registered as a Thing'
  • time="22:48:08+07:00" level=info msg=22:48:08.085 [localdeployment] [INFO] com.aws.greengrass.testing.resources.AbstractAWSResourceLifecycle - Created IotPolicy in IotLifecycle
  • time="22:48:09+07:00" level=info msg=22:48:09.615 [localdeployment] [INFO] com.aws.greengrass.testing.resources.AbstractAWSResourceLifecycle - Created IamPolicy in IamLifecycle
  • time="22:48:10+07:00" level=info msg=22:48:10.194 [localdeployment] [INFO] com.aws.greengrass.testing.resources.AbstractAWSResourceLifecycle - Created IamRole in IamLifecycle
  • time="22:48:10+07:00" level=info msg=22:48:10.639 [localdeployment] [INFO] com.aws.greengrass.testing.resources.AbstractAWSResourceLifecycle - Created IotRoleAlias in IotLifecycle
  • time="22:48:10+07:00" level=info msg=22:48:10.837 [localdeployment] [INFO] com.aws.greengrass.testing.resources.AbstractAWSResourceLifecycle - Created IotPolicy in IotLifecycle
  • time="22:48:11+07:00" level=info msg=22:48:11.040 [localdeployment] [INFO] com.aws.greengrass.testing.resources.AbstractAWSResourceLifecycle - Created IotThingGroup in IotLifecycle
  • time="22:48:12+07:00" level=info msg=22:48:12.066 [localdeployment] [INFO] com.aws.greengrass.testing.resources.AbstractAWSResourceLifecycle - Created IotCertificate in IotLifecycle
  • time="22:48:12+07:00" level=info msg=22:48:12.466 [localdeployment] [INFO] com.aws.greengrass.testing.resources.AbstractAWSResourceLifecycle - Created IotThing in IotLifecycle
  • time="22:48:14+07:00" level=info msg=22:48:14.966 [localdeployment] [INFO] greengrass/features/localdeployment.feature - line 5: 'my device is running Greengrass'
  • time="22:48:14+07:00" level=info msg=22:48:14.976 [localdeployment] [ERROR] greengrass/features/localdeployment.feature - Failed at step: 'my device is running Greengrass'
  • time="22:48:14+07:00" level=info msg=com.google.inject.ConfigurationException: Guice configuration errors:
  • time="22:48:14+07:00" level=info msg=1) [Guice/ErrorInUserCode]: Unable to method intercept: GreengrassSteps
  • time="22:48:14+07:00" level=info msg= while locating GreengrassSteps
  • time="22:48:14+07:00" level=info msg=22:48:14.990 [localdeployment] [INFO] greengrass/features/localdeployment.feature - line 9: 'I create a Greengrass deployment with components'
  • time="22:48:14+07:00" level=info msg=22:48:14.990 [localdeployment] [INFO] greengrass/features/localdeployment.feature - line 11: 'I deploy the Greengrass deployment configuration'
  • time="22:48:14+07:00" level=info msg=22:48:14.991 [localdeployment] [INFO] greengrass/features/localdeployment.feature - line 12: 'the Greengrass deployment is COMPLETED on the device after 180 seconds'
  • time="22:48:14+07:00" level=info msg=22:48:14.991 [localdeployment] [INFO] greengrass/features/localdeployment.feature - line 13: 'I verify greengrass-cli is available in greengrass root'
  • time="22:48:14+07:00" level=info msg=22:48:14.991 [localdeployment] [INFO] greengrass/features/localdeployment.feature - line 14: 'I create a local deployment with components'
  • time="22:48:14+07:00" level=info msg=22:48:14.991 [localdeployment] [INFO] greengrass/features/localdeployment.feature - line 16: 'the local Greengrass deployment is SUCCEEDED on the device after 120 seconds'
  • time="22:48:14+07:00" level=info msg=22:48:14.991 [localdeployment] [INFO] greengrass/features/localdeployment.feature - line 17: 'the aws.greengrass.LocalHelloWorld log on the device contains the line "Hello World!!" within 20 seconds'
  • time="22:48:16+07:00" level=info msg=22:48:16.569 [localdeployment] [INFO] com.aws.greengrass.testing.features.LoggerSteps - Clearing thread context on scenario: 'A component is deployed locally using CLI'
  • time="22:48:16+07:00" level=info msg=22:48:16.577 [localdeployment] [ERROR] com.aws.greengrass.testing.launcher.reporting.StepTrackingReporting - Failed: 'A component is deployed locally using CLI': Failed at 'my device is running Greengrass'
  • time="22:48:16+07:00" level=info msg=22:48:16.584 [] [] [INFO] com.aws.greengrass.testing.modules.AWSResourcesCleanupModule - Cleaned up com.aws.greengrass.testing.resources.iam.IamLifecycle$$EnhancerByGuice$$10441879@e128dc2
  • time="22:48:23+07:00" level=error msg=Test exited unsuccessfully error=exit status

cloudcomponent:

  • 2022-May-04 15:37:28,499 [cloudComponent] [idt-b47156801aee3f29c860] [INFO] greengrass/features/cloudComponent.feature - line 9: 'I create a Greengrass deployment with components'
  • 2022-May-04 15:37:28,499 [cloudComponent] [idt-b47156801aee3f29c860] [INFO] greengrass/features/cloudComponent.feature - line 11: 'I deploy the Greengrass deployment configuration'
  • 2022-May-04 15:37:28,500 [cloudComponent] [idt-b47156801aee3f29c860] [INFO] greengrass/features/cloudComponent.feature - line 12: 'the Greengrass deployment is COMPLETED on the device after 180 seconds'
  • 2022-May-04 15:37:28,500 [cloudComponent] [idt-b47156801aee3f29c860] [INFO] greengrass/features/cloudComponent.feature - line 13: 'the com.aws.HelloWorld log on the device contains the line "Hello World!!" within 20 seconds'
  • 2022-May-04 15:37:28,500 [cloudComponent] [idt-b47156801aee3f29c860] [INFO] greengrass/features/cloudComponent.feature - line 15: 'I create a Greengrass deployment with components'
  • 2022-May-04 15:37:28,500 [cloudComponent] [idt-b47156801aee3f29c860] [INFO] greengrass/features/cloudComponent.feature - line 17: 'I deploy the Greengrass deployment configuration'
  • 2022-May-04 15:37:28,500 [cloudComponent] [idt-b47156801aee3f29c860] [INFO] greengrass/features/cloudComponent.feature - line 18: 'the Greengrass deployment is COMPLETED on the device after 180 seconds'
  • 2022-May-04 15:37:28,500 [cloudComponent] [idt-b47156801aee3f29c860] [INFO] greengrass/features/cloudComponent.feature - line 19: 'the com.aws.HelloWorld log on the device contains the line "Hello World Updated!!" within 20 seconds'
  • 2022-May-04 15:37:31,557 [cloudComponent] [idt-b47156801aee3f29c860] [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'
  • 2022-May-04 15:37:31,558 [cloudComponent] [idt-b47156801aee3f29c860] [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': Failed at 'my device is running Greengrass'

mqttpubsub:

  • 2022-May-04 15:36:55,929 [mqtt] [idt-614fb227a4f0913ba4be] [INFO] greengrass/features/mqtt.feature - line 9: 'I create a Greengrass deployment with components'
  • 2022-May-04 15:36:55,931 [mqtt] [idt-614fb227a4f0913ba4be] [INFO] greengrass/features/mqtt.feature - line 12: 'I deploy the Greengrass deployment configuration'
  • 2022-May-04 15:36:55,931 [mqtt] [idt-614fb227a4f0913ba4be] [INFO] greengrass/features/mqtt.feature - line 13: 'the Greengrass deployment is COMPLETED on the device after 180 seconds'
  • 2022-May-04 15:36:55,931 [mqtt] [idt-614fb227a4f0913ba4be] [INFO] greengrass/features/mqtt.feature - line 14: 'the aws.greengrass.IotMqttSubscriber log on the device contains the line "Subscribed to IoT topic idt/Mqtt/Test with QOS=AT_LEAST_ONCE" within 20 seconds'
  • 2022-May-04 15:36:55,931 [mqtt] [idt-614fb227a4f0913ba4be] [INFO] greengrass/features/mqtt.feature - line 15: 'the aws.greengrass.IotMqttPublisher log on the device contains the line "Published to IoT topic idt/Mqtt/Test with payload test message and qos AT_LEAST_ONCE" within 10 seconds'
  • 2022-May-04 15:36:58,922 [mqtt] [idt-614fb227a4f0913ba4be] [INFO] com.aws.greengrass.testing.features.LoggerSteps - Clearing thread context on scenario: 'Component publishes MQTT message to Iot core and retrieves it as well'
  • 2022-May-04 15:36:58,924 [mqtt] [idt-614fb227a4f0913ba4be] [ERROR] com.aws.greengrass.testing.launcher.reporting.StepTrackingReporting - Failed: 'Component publishes MQTT message to Iot core and retrieves it as well': Failed at 'my device is running Greengrass'
  • 2022-May-04 15:36:58,930 [] [] [INFO] com.aws.greengrass.testing.modules.AWSResourcesCleanupModule - Cleaned up com.aws.greengrass.testing.resources.s3.S3Lifecycle$$EnhancerByGuice$$11137706@7e3ca22c
  • As I checked successfully with manual creation and deployment from both of local and cloud. It seems this error during reporting step and should be revised by the test framework only.

  • As suggestion, I have tried some workaround related to Permission/Role to fix IDT Local/Cloud Component test case, But still get same issue. The ERROR message is triggered during final logging/reporting step (After all functional verification steps were Passed as in log file). --> Failure not related to functionality of Greengrass service(Deployment/MQTT).

4 Answers
1

Hi, some things to try, can you first ensure that IDT has the correct permissions? You can follow this: https://docs.aws.amazon.com/greengrass/v2/developerguide/dev-tst-prereqs.html#config-aws-account-for-idt

Also this doesn't look to be the case here, but is a common fix which is if your tests need more time to run, you can increase the --timeout-multiplier to increase timeout.

answered 2 months ago
  • I have tried to add more time for the IDT execution with this option '--timeout-multiplier 5' but still got the same result. Here all of prerequisites have been done as you can see the local and cloud component test steps Passed at checking for the component log from local deployment and cloud deployment(upgrade).

  • As I checked, they all failed at same step "Created IotThing in IotLifecycle" -> "'my device is running Greengrass": time="22:48:12+07:00" level=info msg=22:48:12.466 localdeployment com.aws.greengrass.testing.resources.AbstractAWSResourceLifecycle - Created IotThing in IotLifecycle time="22:48:14+07:00" level=info msg=22:48:14.966 localdeployment greengrass/features/localdeployment.feature - line 5: 'my device is running Greengrass' time="22:48:14+07:00" level=info msg=22:48:14.976 localdeployment greengrass/features/localdeployment.feature - Failed at step: 'my device is running Greengrass'

1

The issue could also be caused due to Guice error per this log -

time="22:48:14+07:00" level=info msg=com.google.inject.ConfigurationException: Guice configuration errors:

time="22:48:14+07:00" level=info msg=1) Guice/ErrorInUserCode: Unable to method intercept: GreengrassSteps

time="22:48:14+07:00" level=info msg= while locating GreengrassSteps

We're investigating this possibility now.

answered 2 months ago
  • Thank you so much, I am also thinking about it. Is there any way I can attach the configs and logs for the IDT test? I don't see any button to do it here.

0

You can paste the json files here. Please do not post sensitive info like password/keys from the json files, we won't need them for debugging anyway.

Can you share the JVM version used for this setup? And also the host machine on which IDT is run - if its windows/mac/linux.

answered 2 months ago
  • The device.json: [ { "id": "<pool-id>", "sku": "<sku>", "features": [ { "name": "arch", "value": "aarch64" }, { "name": "ml", "value": "no" }, { "name": "docker", "value": "no" }, { "name": "streamManagement", "value": "no" }, { "name": "hsi", "value": "no" } ], "devices": [ { "id": "raspberrypi", "operatingSystem": "Linux", "connectivity": { "protocol": "ssh", "ip": "10.3.112.32", "port": 22, "auth": { "method": "password", "credentials": { "user": "hungtn", "password": "*********" } } } } ] } ]

  • The userdata.json: { "TempResourcesDirOnDevice": "/home/hungtn/IDT/", "InstallationDirRootOnDevice": "/home/hungtn/greengrass/v2", "GreengrassNucleusZip": "C:\Users\hung.nguyen\greengrass-nucleus-latest.zip", "GreengrassV2TokenExchangeRole": "IDTGreengrassV2TokenExchangeRole" }

    • The host machine is Windows with JVM version:

    openjdk version "18" 2022-03-22 OpenJDK Runtime Environment Corretto-18.0.0.37.1 (build 18+37-FR) OpenJDK 64-Bit Server VM Corretto-18.0.0.37.1 (build 18+37-FR, mixed mode, sharing)

    • JVM version on my Rasp is:

    openjdk version "11.0.15" 2022-04-19 OpenJDK Runtime Environment (build 11.0.15+10-post-Debian-1deb11u1) OpenJDK 64-Bit Server VM (build 11.0.15+10-post-Debian-1deb11u1, mixed mode)

    • config.json:

    { "log": { "location": "../logs/" }, "configFiles": { "root": "../configs", "device": "../configs/device.json" }, "testPath": "../tests/", "reportPath": "../results/", "certificatePath": "../certificates/", "awsRegion": "ap-southeast-2", "auth": { "method": "file", "credentials": { "profile": "default" } } }

  • Thanks for sharing, sent this info to the team to investigate

  • Hi @AWS-User-8006754, Is there any other point needed here? This is me(AWS-hungtn), I don't know somehow I have an another account ID now: https://repost.aws/community/users/USK6qDpMOcRVKM6K6yD6dnBQ

0

Hi, can you share the json configs used for the IDT run? A zip of the logs generated by the test run would also be helpful.

answered 2 months 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