By using AWS re:Post, you agree to the AWS re:Post Terms of Use

[Greengrass][IDT] question for Greengrass v2 IDT testing error on component/mqtt tests on our AIOT device

0

Hi, Sir,

I got the greengrass v2 IDT testing errors on component/mqtt tests (had passed on coredependencies/version/pretestvalidation tests), and I'm wondering if it's the java env compatibility issue (I checked there's nearly the same question asked 2 months ago, but no positive fix/answer in the thread => https://repost.aws/questions/QU1ZPN9d6sSPGjetFnH88uuw/greengrass-idt-test-component-and-mqtt-failed-with-general-info)

My testing env (just enable the mandatory tests):

  1. IDT running host: Windows 10, OpenJDK for Windows 17.0.3.
  2. DUT: MediaTek SoC running Yotco 3.1 with OpenJDK 13.0.5 and greengrass v2 core 2.5.5.

the test manager summary is: ========== Test Summary ========== Execution Time: 16m31s Tests Completed: 7 Tests Passed: 3 Tests Failed: 4 Tests Skipped: 0

Test Groups: coredependencies: PASSED version: PASSED component: FAILED mqtt: FAILED lambdadeployment: FAILED pretestvalidation: PASSED

I got totally the same java exception error and can NOT continue the testing on the cloud component and mqtt test as below. It looks like the java jar running compatibility problem with the Java run-time platform. Do you have any experience and give me the hint or guide for fixing this??

Thanks, A.J.

2022-6月-16 13:05:28,468 [mqtt] [idt-11c34a9894540dc4e465] [ERROR] greengrass/features/mqtt.feature - Failed at step: 'my device is running Greengrass' com.google.inject.ConfigurationException: Guice configuration errors:

  1. [Guice/ErrorInUserCode]: Unable to method intercept: GreengrassSteps while locating GreengrassSteps

1 error

Full classname legend:

GreengrassSteps: "com.aws.greengrass.testing.features.GreengrassSteps"

End of classname legend:

    at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1126) ~[AWSGreengrassV2TestingIDT-1.0.jar:?]
    at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1086) ~[AWSGreengrassV2TestingIDT-1.0.jar:?]
    at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1138) ~[AWSGreengrassV2TestingIDT-1.0.jar:?]
    at io.cucumber.guice.GuiceFactory.getInstance(GuiceFactory.java:43) ~[AWSGreengrassV2TestingIDT-1.0.jar:?]
    at io.cucumber.java.JavaStepDefinition.execute(JavaStepDefinition.java:27) ~[AWSGreengrassV2TestingIDT-1.0.jar:?]
    at io.cucumber.core.runner.PickleStepDefinitionMatch.runStep(PickleStepDefinitionMatch.java:63) ~[AWSGreengrassV2TestingIDT-1.0.jar:?]
    at io.cucumber.core.runner.TestStep.executeStep(TestStep.java:64) ~[AWSGreengrassV2TestingIDT-1.0.jar:?]
    at io.cucumber.core.runner.TestStep.run(TestStep.java:49) ~[AWSGreengrassV2TestingIDT-1.0.jar:?]
    at io.cucumber.core.runner.PickleStepTestStep.run(PickleStepTestStep.java:46) ~[AWSGreengrassV2TestingIDT-1.0.jar:?]
    at io.cucumber.core.runner.TestCase.run(TestCase.java:51) ~[AWSGreengrassV2TestingIDT-1.0.jar:?]
    at io.cucumber.core.runner.Runner.runPickle(Runner.java:67) ~[AWSGreengrassV2TestingIDT-1.0.jar:?]
    at io.cucumber.core.runtime.Runtime.lambda$run$2(Runtime.java:100) ~[AWSGreengrassV2TestingIDT-1.0.jar:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
    at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
    at io.cucumber.core.runtime.Runtime$SameThreadExecutorService.execute(Runtime.java:243) ~[AWSGreengrassV2TestingIDT-1.0.jar:?]
    at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:123) ~[?:?]
    at io.cucumber.core.runtime.Runtime.lambda$run$3(Runtime.java:100) ~[AWSGreengrassV2TestingIDT-1.0.jar:?]
    at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) [?:?]
    at java.util.stream.SliceOps$1$1.accept(SliceOps.java:200) [?:?]
    at java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1602) [?:?]
    at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129) [?:?]
    at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527) [?:?]
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513) [?:?]
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) [?:?]
    at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) [?:?]
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) [?:?]
    at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) [?:?]
    at io.cucumber.core.runtime.Runtime.run(Runtime.java:101) [AWSGreengrassV2TestingIDT-1.0.jar:?]
    at com.aws.greengrass.testing.launcher.TestLauncher.main(TestLauncher.java:130) [AWSGreengrassV2TestingIDT-1.0.jar:?]

Caused by: java.lang.IllegalArgumentException: Constructor is not visible at com.google.common.base.Preconditions.checkArgument(Preconditions.java:142) ~[AWSGreengrassV2TestingIDT-1.0.jar:?] at com.google.inject.internal.BytecodeGen.enhancedConstructor(BytecodeGen.java:113) ~[AWSGreengrassV2TestingIDT-1.0.jar:?] at com.google.inject.internal.ProxyFactory$ProxyConstructor.<init>(ProxyFactory.java:175) ~[AWSGreengrassV2TestingIDT-1.0.jar:?] at com.google.inject.internal.ProxyFactory.create(ProxyFactory.java:151) ~[AWSGreengrassV2TestingIDT-1.0.jar:?] at com.google.inject.internal.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:93) ~[AWSGreengrassV2TestingIDT-1.0.jar:?] at com.google.inject.internal.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:30) ~[AWSGreengrassV2TestingIDT-1.0.jar:?] at com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:38) ~[AWSGreengrassV2TestingIDT-1.0.jar:?] at com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:34) ~[AWSGreengrassV2TestingIDT-1.0.jar:?] at com.google.inject.internal.FailableCache$1.load(FailableCache.java:43) ~[AWSGreengrassV2TestingIDT-1.0.jar:?] at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3529) ~[AWSGreengrassV2TestingIDT-1.0.jar:?] at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2278) ~[AWSGreengrassV2TestingIDT-1.0.jar:?] at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2155) ~[AWSGreengrassV2TestingIDT-1.0.jar:?] at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2045) ~[AWSGreengrassV2TestingIDT-1.0.jar:?] at com.google.common.cache.LocalCache.get(LocalCache.java:3951) ~[AWSGreengrassV2TestingIDT-1.0.jar:?] at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3974) ~[AWSGreengrassV2TestingIDT-1.0.jar:?] at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4935) ~[AWSGreengrassV2TestingIDT-1.0.jar:?] at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4941) ~[AWSGreengrassV2TestingIDT-1.0.jar:?] at com.google.inject.internal.FailableCache.get(FailableCache.java:54) ~[AWSGreengrassV2TestingIDT-1.0.jar:?] at com.google.inject.internal.ConstructorInjectorStore.get(ConstructorInjectorStore.java:49) ~[AWSGreengrassV2TestingIDT-1.0.jar:?] at com.google.inject.internal.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:148) ~[AWSGreengrassV2TestingIDT-1.0.jar:?] at com.google.inject.internal.InjectorImpl.initializeJitBinding(InjectorImpl.java:606) ~[AWSGreengrassV2TestingIDT-1.0.jar:?] at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:943) ~[AWSGreengrassV2TestingIDT-1.0.jar:?] at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:863) ~[AWSGreengrassV2TestingIDT-1.0.jar:?] at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:301) ~[AWSGreengrassV2TestingIDT-1.0.jar:?] at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:224) ~[AWSGreengrassV2TestingIDT-1.0.jar:?] at com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:1092) ~[AWSGreengrassV2TestingIDT-1.0.jar:?] at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1121) ~[AWSGreengrassV2TestingIDT-1.0.jar:?] ... 28 more

asked 2 years ago606 views
6 Answers
0

Hi A.J,

Can you please post the entire greengrass-test-run.log file here. Also which greengrass version are you using? IDT 4.5.8 supports Greengrass versions 2.5.6, 2.6.0 and 2.7.0

Thanks, Sai Rohan

AWS
answered 2 years ago
  • Hi, Sai, The greengrass nucleus version I used is 2.5.6; the entire greengrass-test-run.log file is too big and the comment characters is limited to 600 chars, this is what I'm confused; I also didn't see where I can upload the log file here. Could you guide me how I can post big log file or upload those files for your check? and I'm curious that could this be caused by my java version in Windows running IDT 4.5.8 or the device-side ??

  • Hi, Sai, I found that my original installation of Nucleus on device is 2.5.5, but the Nucleus zip package placed with the IDT 4.5.8 in Windows host is 2.5.6 (located in the "GreengrassNucleusZip" filed in userdata.json in "configs" folder in IDT installation pacakge), and it looks the IDT testing is using the nucleus package put with IDT in the Windows host side , so I think my testing nucleus version is 2.5.6. Is my understanding correct ? Thanks, A.J.

  • Hi A.J, Yes, IDT should be testing using the nucleus provided in GreengrassNucleusZip. It doesn't seem like AWS re:Post has a good way for you to share the logs with us. Could you upload or paste the logs somewhere else and link it here? Remove any sensitive data from it if there is any

  • Hi, I copied all the single-test logs into my public google drive folder, the public sharing link is => https://drive.google.com/drive/folders/1qK0wCG4p9OqiqBhD6tLDmknBJmO6ggzj?usp=sharing

    after accessing to the link, you can see all the logs are the \result_0817\ folders. The partial log I provided in the previous thread is in \logs\component\cloudcomponent\greengrass-test-run.log Please help check it and let me know if any question. Thanks, A.J.

  • Hi, I noticed in your logs you have Errors such as "Error output: mkdir: cannot create directory `/greengrass/v2/idt-55d91bcd1f6b0c20eadc': No space left on device" as well as other errors that also mention having no space left. Can you clear up some more space on your device/delete unnecessary things? One thing to note is that IDT will install the Nucleus you have listed at GreengrassNucleusZip so you don't need a Nucleus already installed. If there isn't space to install the Nucleus and you want to use your existing installed Nucleus, in the latest IDT 4.5.8 release, we also support testing with a PreInstalled Nucleus. It's documented here under userdata.json https://docs.aws.amazon.com/greengrass/v2/developerguide/set-config.html. The quick guide is that you set the PreInstalled field to yes, and have the InstallationDirRootOnDevice as where your Nucleus is installed.

0

Hello, You are correct that this is the same issue in the previous thread mentioned. The IoT Device Tester team is currently working on a fix for this issue, but is still pending a release for this fix. We are currently tracking this thread and will update this post when the release containing the MQTT fix goes public. Sorry for the inconvenience.

AWS
answered 2 years ago
  • Hi, thanks for your prompt reply; I'll wait for the MQTT fix and please kindly update here when the fix is available; moreover. is there a way to bypass or waive those errors caused by test tool issues and we can finish all the other mandatory tests ?

  • Hello, yes as a way to bypass you can use the flag "--skip-group-id component,mqtt" which will skip those test groups in the meantime during your testing of the other tests. Again sorry for the inconvenience and expect a response to this thread in the near future when the fix is public. Thank you.

  • Hi, I do use the flag "--skip-group-id component,mqtt" and I got the "timeout error" while running "lambdadeploymenttest" test as below: ========== Test Summary ========== Execution Time: 15m17s Tests Completed: 4 Tests Passed: 3 Tests Failed: 1 Tests Skipped: 0

    Test Groups: lambdadeployment: FAILED pretestvalidation: PASSED version: PASSED coredependencies: PASSED

    Failed Tests: Group Name: lambdadeployment Test Name: lambdadeploymenttest Reason: timeout error

    moreover, there is no details showing in "lambdaDeploymentTest.log" in \logs\lambdadeployment\lambdaDeploymentTest; it's just stopped in the line "Starting Nucleus after provision" as below:

    time="2022-07-12T15:55:53+08:00" level=warning msg="Temporary file C:\Users\ajjiang\AppData\Local\Temp\idt-component2771655396 was not removed successfully" time="2022-07-12T15:55:53+08:00" level=info msg="Configured DUT with Provisioned resources" time="2022-07-12T15:55:53+08:00" level=info msg="Starting Nucleus after provisioning"

    however, I can see the Nucleus core is running up using "ps" command in the DUT and don't know why it comes the timeout error; can you help check on this ??
    Thanks, A.J.

0

Hello A.J,

We've launched a new IDT v4.5.8 which has the fix for the Guice issue. Please download it from here

Thanks, Sai

AWS
answered 2 years ago
  • Hi, Sai, Thank you for the info; Had downloaded the new IDT, and will do the testing. Thanks, A.J.

  • Hi, Sai, I've tested the IDT v4.5.8 with the same device, however, I still meet the same errors using v4.5.3 (still the java command execution exception which is the Guice issue you explained); below I pasted the error lines in the log (\logs\mqtt\mqttpubsub\greeengrass-test-run.log), and, I see the same errors in cloud component test log. My java environment is: IDT v4.5.8 running in Woindows with openJDK 17.0.3 for windows and DUT is a Yocto 3.1 Linux with openJDK v13.0.5 ported to Yocto.

    2022-8月-17 17:31:07,384 [mqtt] [idt-6294935d80e780e3232a] [ERROR] greengrass/features/mqtt.feature - Failed at step: 'my device is running Greengrass' com.aws.greengrass.testing.api.device.exception.CommandExecutionException: Usage: java [options] <mainclass> [args...] (to execute a class) or java [options] -jar <jarfile> [args...] (to execute a jar file) or java [options] -m <module>[/<mainclass>] [args...] java [options] --module <module>[/<mainclass>] [args...] (to execute the main class in a module) or java [options] <sourcefile> [args] (to execute a single source-file program)

    Arguments following the main class, source file, -jar <jarfile>, -m or --module <module>/<mainclass> are passed as the arguments to main class.

    Could you help on this ?? since I have no idea why the same errors still occur in the IDT 4.5.8 which you explained my error logs in 4.5.3 should be fixed in 4.5.8. Thanks, A.J.

0

Hi A.J,

An example command with skip-group-id would be -

./devicetester_linux-x86-64 run-suite --suite-id GGV2Q_2.3.1 --skip-group-id mqtt,component --userdata userdata.json

It could be that the test timesout out right after nucleus installation. You can also use the timeout multiplier to increase timeouts like this-

./devicetester_linux-x86-64 run-suite --suite-id GGV2Q_2.3.1 --skip-group-id mqtt,component --userdata userdata.json --timeout-multiplier 2.5

We are aware of the Guice issue for the component test and have the fix in our code. You can expect a release next week. Again sorry for the inconvenience caused.

Thanks,

Sai Rohan

AWS
answered 2 years ago
  • Hi, Rohan, Thank you for the quick reply; I do follow your comment to run the device tester as ".\devicetester_win_x86-64.exe run-suite --suite-id GGV2Q_2.3.1 --skip-group-id mqtt,component --userdata userdata.json --timeout-multiplier 2.5" (my Device Tester is running in Win10), however, the result is all the same (only the wait-time is longer for the increased timeout), and changing the timeout-multiplier parameter to 3 also doesn't help. Do you think this problem is related to the "Guice issue" ?? If not, do you have any suggestion I could do for debugging this issue? (actually, I don't know what's going on for the tester; it's just wait there and then timeout error and in the meantime, nothing abnormal in the DUT system) Thanks, A.J.

0

Hi A.J,

Yes this seems to be a Guice issue, it's one of the dependencies that we have for IDT. Unfortunately there is nothing(that we know of) at the moment to get around this issue.

Thanks, Sai Rohan

AWS
answered 2 years ago
  • Hi, Rohan, When will be the new IDT fixing the Guice issue available ? since I just checked the AWS IDT for greengrass v2 doc site and it's still the version 4.5.3 which is the same version I used. Thanks, A.J.

0

Goodmorning A J

We are actively pursuing a resolution to this issue, and are working on an updated IDT release.

We will keep you posted once the release is available.

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