Skip to content

(nucleus): AWS_IOT_THING_NAME variable empty in environment of my components #1732

@Dizzzmas

Description

@Dizzzmas

Describe the bug
We use fleet provisioning to roll greengrass onto our devices.
In the last couple weeks we've encountered the below issue on 2 different newly installed devices:

Our deployed greengrass components have empty AWS_IOT_THING_NAME env variable

When running cat /proc/<process_id>/environ | tr '\0' '\n'
where <process_id> belongs to the greengrass component, running on device via greengrass deployment, we see the following picture:

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
LANGUAGE=en_US.UTF-8
INVOCATION_ID=f832fb4ded1b4ee7a25e491ee6c95a1d
AWS_REGION=eu-west-2

AWS_IOT_THING_NAME= # EMPTY!!!

PIDFILE=/greengrass/v2/alts/loader.pid
AWS_GG_NUCLEUS_DOMAIN_SOCKET_FILEPATH=/greengrass/v2/ipc.socket
JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
AWS_DEFAULT_REGION=eu-west-2
LC_MESSAGES=en_US.UTF-8
AWS_GG_NUCLEUS_DOMAIN_SOCKET_FILEPATH_FOR_COMPONENT=/greengrass/v2/ipc.socket
AWS_GG_FIPS_MODE=false
LANG=en_US.UTF-8
SVCUID=BEZ2SJJXUUPYUAHB
JOURNAL_STREAM=8:9713
GG_ROOT_CA_PATH=/greengrass/v2/claim-certs/claim.root.pem
GGC_VERSION=2.12.6
AWS_CONTAINER_AUTHORIZATION_TOKEN=BEZ2SJJXUUPYUAHB
SYSTEMD_EXEC_PID=1591
AWS_USE_FIPS_ENDPOINT=false
PWD=/greengrass/v2/alts/current/distro/bin
HOME=/root
AWS_CONTAINER_CREDENTIALS_FULL_URI=http://localhost:45847/2016-11-01/credentialprovider/

For some reason AWS_IOT_THING_NAME is empty, and this is not solved by a reboot.

I can see the Thing having correct name inside IoT Core and /greengrass/v2/config/effectiveConfig.yaml has the correct thingName on the device

Expected behavior
Every greengrass component always has AWS_IOT_THING_NAME set at runtime

Actual behavior
Our greengrass components have empty AWS_IOT_THING_NAME

Environment

  • OS: Ubuntu 22.04
  • JDK version: 11.0.23+9-post-Ubuntu-1ubuntu122.04.1
  • Nucleus version: 2.12.6

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions