[Greengrass][IDT] question for Greengrass v2 IDT 4.5.8 testing errors for suspected java compatibility issue on mqtt/component tests

0

Hi, Sir, I got " Reason: Failed at 'my device is running Greengrass'" in component/mqtt tests and " Reason: timeout error" in lambda test. (My test logs are shared in my google drive => https://drive.google.com/drive/folders/1SXZj66m8CDhN5YhWtoJ_qTPZxlrgRQw6?usp=sharing) Actually, I had posted this issue in https://repost.aws/questions/QUCTpXlsRjSXKemFip634JIA#ANhyHmH4kLRT64cWWdYqTZuw thread, but the thread is too long, and I got no response for 2 weeks, so I re-posted it here.

My testing environment (only enable the mandatory tests): IDT 4.5.8 running host: Windows 10, OpenJDK for Windows 17.0.3. DUT: MediaTek I500 SoC running Yotco 3.1 with OpenJDK 13.0.5/17/18GA and greengrass v2 Nucleus 2.5.6/2.7.0

The last reply from your engineer was to ask for the issue repro in the original thread because your engineer assumed IDT 4.5.8 will fix my issue (he said it's the Guice issue in IDT 4.5.3 and it's fixed in IDT 4.5.8) but it's NOT, after I used IDT 4.5.8 to re-do the test, furthermore, to see if it's helpful if I do some device-side SW upgrade, I upgraded my device-side jdk version from 13.0.5 to 17GA and 18.0.2, and also upgraded the Nucleus core version from 2.5.6 to 2.7.0 and re-do the test, however, the result looks all the same.

Please help check it. Thanks, A.J.

  • Hi AJ

    Since you were able to install Greengrass independently of IDT, without any apparent changes with Java, it appears that the test suite steps happening on device through IDT, are not able to do some thing right.

    I am working on providing a custom build which will provide the exact command where the failure is happening. That will give a better insight. I will keep you posted.

    Thank you SV

  • Hello AJ

    I have created this custom testsuite bundle you can download using

    wget --no-check-certificate --no-proxy 'https://aws-iot-idt-ggv2-oct-private-beta.s3.us-west-2.amazonaws.com/devicetester_greengrass_v2_4.5.11_testsuite_2.3.99_win.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAW2I64IVP75OGNYFH%2F20221021%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20221021T191942Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=34cb0b13c5a9d755f71c1d195bea7478b578079d6f93a74691f10b1698d67d4a' -O devicetester_greengrass_v2_4.5.11_testsuite_2.3.99_win.zip

    This will generate additional logs in idt_server.log file, and will give an indication of where exactly the failure is happening.

    Please post the findings using this bundle.

    Thanks SV

asked 2 years ago293 views
3 Answers
0

Hello AJ,

Thanks for following up. I am also hypothesizing the issue to be around the JDK on the device. Since a command that is running fine in our test setup is encountering error in your device setup. We are also trying to reproduce this issue.

Is it possible to have JDK 11 installed on your device and test? That will confirm that issue

Thanks SV

AWS
answered 2 years ago
  • Hi, SV, I had problem cross-compiling the JDK 11 to our device's platform (aarch64 on Yocto 3.1) and I'm still trying; do you have the aarch64 JDK 11 binary for me so that I can do quick testing ? On the other hand, for the issue investigation, do you guys use remote ssh to remote-checking the target device ? Thanks, A.J.

  • Hi, SV, I've tried the AWS Corretto which is OpenJDK 11.0.16.9.1 and the result is the same; I have no direction for this issue, I'm wondering if the failure is caused by "NOT" using the native ported meta-java openJDK from yoctoproject.org in our AIOT Yocto platform? or is there anything I can try to figure out ? ps: the official meta-java JDK version released from yoctoproject.org is still JDK 8, which doesn't meet the GGv2's JDK version 11 requirement. Thanks, A.J.

0

Hi AJ,

I can't find an OpenJDK bb recipe. Can you link to the one you're using? This is where I'm searching. https://git.yoctoproject.org/meta-java/tree/recipes-core/openjdk?h=dunfell

Given that Yocto is built from source I don't think just copying OpenJDK 18/17 over will run correctly. Let's bypass IDT for a second, does Greengrass run on the device? Are you able to run other java programs?

You can also try switching the Corretto and see if that works for you.

Thanks, KR

AWS
KR-AWS
answered 2 years ago
  • Hi, KR, We don't use the OpenJDK bb recipe (we put aarch64-ready OpenJDK binary in the device and setup java binary PATH);, we followed the "JDK build" document from OpenJDK site (https://htmlpreview.github.io/?https://raw.githubusercontent.com/openjdk/jdk/master/doc/building.html#external-library-requirements) to build the OpenJDK 13.0.5, for the OpenJDK 14 and later, the OpenJDK site provides the linux aarch64 binary so that we don't need do cross-compiling. for your question, 1. yes, greengrass does bring up OK on device 2. yes, I can run java program (.java) on our target MTK I500 Yocto 3.1 arm-based device. for the Corretto, need we do cross-compile to aarch64 platform? or is there aarch64-ready binary for my quick testing?

    Thanks, A.J.

  • Hi, KR, Copied my reply message for SV below since you have the same comment before for trying Corretto (OpenJDK11). I have no clue for figuring out this failure now and any suggestion for clear this problem would be appreciated. Thanks, A.J.

    I've tried the AWS Corretto which is OpenJDK 11.0.16.9.1 and the result is the same; I have no direction for this issue, I'm wondering if the failure is caused by "NOT" using the native ported meta-java openJDK from yoctoproject.org in our AIOT Yocto platform? or is there anything I can try to figure out ? ps: the official meta-java JDK version released from yoctoproject.org is still JDK 8, which doesn't meet the GGv2's JDK version 11 requirement. Thanks, A.J.

0

Hi A.J. Are you able to share your Yocto recipe? I'm particularly interested in how you're depending on OpenJDK. Here's a link to the reference Greengrass Yocto recipe, https://github.com/aws4embeddedlinux/meta-aws/blob/master/recipes-iot/aws-iot-greengrass/greengrass-bin_2.7.0.bb#L22

Thanks, KR

AWS
KR-AWS
answered 2 years ago
  • Hi, KR, I didn't do anything for the greengrass and OpenJDK depending/link, actually, for the IDT testing, I didn't install the greengrass nucleus on our target Yocto system (aws engineer mentioned in my old thread for this issue, for the IDT testing, it's NOT necessary to pre-install the greengrass nucleus binary on target, the IDT tester will upload the Nucleus to the target and bring up it while testing); we consider to officially install them to target system after the IDT test passed. For the OpenJDK, initially I do install the ported OpenJDK 13.0.5 to the target Yocto system with BB file; however, the IDT tests failed, so, I changed to OpenJDK 18/17/15 by coping the OpenJDK package to the system temp and override the Java binary path for verification if the failure is related to the OpenJDK version (no install with BB file in Yocto for JDK 18/17/15, and the failure logs are all the same).

    Thanks, A.J.

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