Lunch greengrass with java command but it don't take the config file with --init-config

0

Hello,

I try to configure a raspberry pi 4 on raspbian OS as a edge. I install greengrass on it.

I use this documentation : https://docs.aws.amazon.com/fr_fr/greengrass/v2/developerguide/manual-installation.html

I create a config file :

system:
  certificateFilePath: "/greengrass/v2/device.pem.crt"
  privateKeyPath: "/greengrass/v2/private.pem.key"
  rootCaPath: "/greengrass/v2/AmazonRootCA1.pem"
  rootpath: "/greengrass/v2/"
  thingName: "THING_NAME"
services:
  aws.greengrass.Nucleus:
    componentType: "NUCLEUS"
    version: "2.12.2" 
    configuration:
      awsRegion: "eu-central-1"
      iotRoleAlias: "GreengrassCoreTokenExchangeRoleAlias"
      iotCredEndpoint: "IOT_CREDENTIAL_ENDPOINT"
      iotDataEndpoint: "IOT_ENDPOINT"
      mqtt:
        port: 443
      greengrassDataPlanePort: 443

And I use this command to install Greengrass : sudo -E java -Droot="/greengrass/v2" -Dlog.store=FILE \ -jar ./GreengrassInstaller/lib/Greengrass.jar \ --init-config ./GreengrassInstaller/config.yaml \ --component-default-user ggc_user:ggc_group \ --setup-system-service true

But it create a defautl Thing but not the thing that I mention on the config file.

Thank for all who read me.

  • You can use the --thing-name flag to set your desired thing name instead of the config file. https://docs.aws.amazon.com/fr_fr/greengrass/v2/developerguide/configure-installer.html

    sudo -E java -Droot="/greengrass/v2" -Dlog.store=FILE \ 
     -jar ./GreengrassInstaller/lib/Greengrass.jar \
    --thing-name THING_NAME \
    --init-config ./GreengrassInstaller/config.yaml \ 
     --component-default-user ggc_user:ggc_group \ 
     --setup-system-service true
    

    If this doesn't work then can you double check the values are correct in your config.yaml file?

  • Also I would like to clarify, what do you mean by default thing? What do you actually see in the console and what do you expect to see?

질문됨 2달 전164회 조회
1개 답변
1
수락된 답변

Hello,

As per the documentation that is being followed,

[+] https://docs.aws.amazon.com/fr_fr/greengrass/v2/developerguide/manual-installation.html

The IoT thing is created in the starting step of the GreenGrass configuration. Further, the same thing is used in the config.yaml file for making the setup work. Hence, as per the public documentation you might need to use the thing that was created as the starting step of the setup and use it in the config.yaml file as manual provisioning does not support this creation of thing from config file.

You could try using custom/automatic provisioning as an other option to create thing while running the java command.

[+] Automatic resource provisioning - https://docs.aws.amazon.com/greengrass/v2/developerguide/quick-installation.html#run-greengrass-core-v2-installer

[+] Custom resource provisioning - https://docs.aws.amazon.com/greengrass/v2/developerguide/custom-provisioning.html

AWS
답변함 2달 전
profile picture
전문가
검토됨 2달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠