Greengrass v2/ ubuntu wsl / cannot deploy component / Illegal reflective access by com.google.gson.internal.reflect.ReflectionHelper

0

Hi, I'm new to greengrass so I am following the tutorial: https://docs.aws.amazon.com/greengrass/v2/developerguide/defer-component-updates-tutorial.html

In my ubuntu 20.04 (wsl under windows 11), I managed to install all the tools and created a core device and a component. so I see it listed under Greengrass devices > components > My components > com.example.BatteryAwareHelloWorld

When I click "com.example.BatteryAwareHelloWorld" and "Deploy" in the IoT console the deployment process always fails in few seconds without too much info.

In the Nucleus, (wsl ubuntu) I get the following message: WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.google.gson.internal.reflect.ReflectionHelper (file:/greengrass/v2/packages/artifacts-unarchived/aws.greengrass.Nucleus/2.12.0/aws.greengrass.nucleus/lib/Greengrass.jar) to constructor java.util.Collections$EmptyList() WARNING: Please consider reporting this to the maintainers of com.google.gson.internal.reflect.ReflectionHelper WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release

Can anyone help me with this issue please?

J
已提問 6 個月前檢視次數 239 次
1 個回答
0
已接受的答案

Hi. That's only a warning. It's not the cause of your deployment failure. Your component should have a log file at /greengrass/v2/logs/com.example.BatteryAwareHelloWorld.log. Please check that file for more insight into what's gone wrong.

profile pictureAWS
專家
Greg_B
已回答 6 個月前
  • Hi, Greg. Thank you for the feedback. However, I did try to check the log file but the log file does not exist so that why I'm bit lost

  • Please review the Greengrass log and the AWS Console. It will tell you why the deployment failed.

    Please note that WSL is not explicitly supported. WSL does not have Systemd so you cannot install Greengrass as a system service in WSL which will limit what GG can do. Greengrass natively supports installing on Windows, so you can do that directly.

  • Hi. Thanks for the suggestion. I managed to find error in the log as it was failing to get items from s3. I did add "allow/GetObject" but somehow it didnt work. (I added it separately json but maybe I made mistake). I added pretty much the same stuff to existing policy and it started to get items from s3 so the deployment worked. Thank you everyone :)

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南