0

I am trying to connect my raspberry pi4 device running raspy OS lite with AWS Iot Greengrass v2 and i do following steps:

  1. From AWS Greengrass console i setup a core device

  2. On my raspberry i install Java 8 runtime

    $ sudo apt.get update $ sudo apt-get install openjdk-8-jdk

  3. On my raspberry i download the installer:

    curl -s https://d2s8p88vqu9w66.cloudfront.net/releases/greengrass-nucleus-latest.zip > greengrass-nucleus-latest.zip && unzip greengrass-nucleus-latest.zip -d GreengrassCore

  4. On my device i run the installer:

    sudo -E java -Droot="/greengrass/v2" -Dlog.store=FILE -jar ./GreengrassCore/lib/Greengrass.jar --aws-region eu-west-1 --thing-name GreengrassQuickStartCore-1773dec1ad2 --thing-group-name GreengrassQuickStartGroup --component-default-user ggc_user:ggc_group --provision true --setup-system-service true --deploy-dev-tools true

All seems to be done, my core device was created in aws console and status is "Healty" but on my raspberry the folder /greengrass/v2 does not exist and i cannot see logs etc. If i read documentation for troubleshooting device issues everyone report /greengrass/v2/logs/ as a log folder but on my device greengrass folder does not exist.

Everyone have some suggestion about?

So many thanks in advance

Manuel Santi
  • 1,106
  • 17
  • 46
  • Greengrass installs to /greengrass/v2/ and puts all certificates there. If you can see it as "Healthy in console" , that means it must be installed and running. Are you sure you are looking for the /greengrass directory in root not your home directory? – Kris Nov 25 '21 at 18:02

3 Answers3

1

Did you install the AWS CLI V1 (the V2 version is not supported on the raspberry pi). Be sure to do this before installing Greengrass Core software.

$ curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"

$ unzip awscli-bundle.zip

$ sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws

1

Had a similar error, be careful with the paths, sometimes you are using relative and absolute paths.

Example: GGv2 folder in the filesystem root directory (/greengrass/v2)

cd /greengrass/v2

Example: GGv2 folder relative to the current directory

cd ./greengrass/v2

Example: GGv2 folder at current user home directory (/usr/home/greengrass/v2)

cd ~/greengrass/v2

I assume your log files shall be located at filesystem root:

cd /greengrass/v2/logs

If you cannot access the logs folder, try changing its permissions:

sudo chmod 755 /greengrass/v2/logs
cd /greengrass/v2/logs
0

Stick to the default OpenJDK (JDK 11) version:

sudo apt install default-jdk

Verify that you have openjdk version "11.*" running on you RaspberryPi:

java -version

Export your AWS credentials to you RaspberryPi as environment variables. You can find those in your local development machine in ~/.aws/credentials if you have configured them already. If not, you can login to the AWS IAM Console, go to your user and scroll down until you find 'Access keys'. Then create one and copy it upon creation (you cannot retrieve the secret key afterwards, so keep it handy or do an 'aws configure' on you local machine, which will save it under ~/.aws/credentials):

export AWS_ACCESS_KEY_ID=<AWS_ACCESS_KEY_ID>
export AWS_SECRET_ACCESS_KEY=<AWS_SECRET_ACCESS_KEY>

Download the Greengrass installer:

curl -s https://d2s8p88vqu9w66.cloudfront.net/releases/greengrass-nucleus-latest.zip > greengrass-nucleus-latest.zip && unzip greengrass-nucleus-latest.zip -d GreengrassInstaller

Run the java command:

sudo -E java -Droot="/greengrass/v2" -Dlog.store=FILE -jar ./GreengrassInstaller/lib/Greengrass.jar --aws-region <your-region> --thing-name <your-thing-name>  --component-default-user ggc_user:ggc_group --provision true --setup-system-service true --deploy-dev-tools true

You should see something like:

...
Successfully set up Nucleus as a system service

If all goes well, your RaspberryPi should have a folder /greengrass/v2/ containing all greengrass related files including logs.