Skip to content

Issue with Greengrass lite

0

Hello,

I have configured a Ubuntu EC2 instance as a GG Lite device using the instructions available on github. On the AWS Management Console, the device status shows that it is healthy. However, on the EC2 instance where the gg lite services are running, I see the following errors. These errors appear as soon as I start the greengrass-lite.target service

journalctl -a -t iotcored

Jan 29 03:28:34 ip-172-31-35-153 iotcored[26129]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:28:35 ip-172-31-35-153 iotcored[26144]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:28:36 ip-172-31-35-153 iotcored[26160]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:28:37 ip-172-31-35-153 iotcored[26175]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:28:39 ip-172-31-35-153 iotcored[26191]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:28:40 ip-172-31-35-153 iotcored[26206]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:28:41 ip-172-31-35-153 iotcored[26221]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:28:42 ip-172-31-35-153 iotcored[26237]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:28:44 ip-172-31-35-153 iotcored[26254]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:28:45 ip-172-31-35-153 iotcored[26269]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:32:38 ip-172-31-35-153 iotcored[26345]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:32:39 ip-172-31-35-153 iotcored[26361]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:32:40 ip-172-31-35-153 iotcored[26376]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:32:41 ip-172-31-35-153 iotcored[26391]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:32:42 ip-172-31-35-153 iotcored[26406]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:32:44 ip-172-31-35-153 iotcored[26421]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:32:45 ip-172-31-35-153 iotcored[26436]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:32:46 ip-172-31-35-153 iotcored[26452]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:32:47 ip-172-31-35-153 iotcored[26467]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:32:49 ip-172-31-35-153 iotcored[26482]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:44:30 ip-172-31-35-153 iotcored[31653]: E[iotcored] mqtt.c:544: Subscribe to $aws/things/gglite-ubuntu-dev/jobs/notify-next-namespace-aws-gg-deployment failed: MQ>
Jan 29 03:44:30 ip-172-31-35-153 iotcored[31653]: E[iotcored] mqtt.c:544: Subscribe to $aws/things/gglite-ubuntu-dev/jobs/notify-next-namespace-aws-gg-deployment failed: MQ>
Jan 29 03:44:30 ip-172-31-35-153 iotcored[31653]: E[iotcored] mqtt.c:544: Subscribe to $aws/things/gglite-ubuntu-dev/jobs/notify-next-namespace-aws-gg-deployment failed: MQ>

journalctl -a -t ggdeploymentd

Jan 29 03:28:34 ip-172-31-35-153 ggdeploymentd[26136]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:28:34 ip-172-31-35-153 ggdeploymentd[26136]: W[ggdeploymentd] entry.c:38: Failed to get root path from config.
Jan 29 03:28:35 ip-172-31-35-153 ggdeploymentd[26152]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:28:35 ip-172-31-35-153 ggdeploymentd[26152]: W[ggdeploymentd] entry.c:38: Failed to get root path from config.
Jan 29 03:28:36 ip-172-31-35-153 ggdeploymentd[26167]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:28:36 ip-172-31-35-153 ggdeploymentd[26167]: W[ggdeploymentd] entry.c:38: Failed to get root path from config.
Jan 29 03:28:38 ip-172-31-35-153 ggdeploymentd[26183]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:28:38 ip-172-31-35-153 ggdeploymentd[26183]: W[ggdeploymentd] entry.c:38: Failed to get root path from config.
Jan 29 03:28:39 ip-172-31-35-153 ggdeploymentd[26198]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:28:39 ip-172-31-35-153 ggdeploymentd[26198]: W[ggdeploymentd] entry.c:38: Failed to get root path from config.
Jan 29 03:28:40 ip-172-31-35-153 ggdeploymentd[26213]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:28:40 ip-172-31-35-153 ggdeploymentd[26213]: W[ggdeploymentd] entry.c:38: Failed to get root path from config.
Jan 29 03:28:41 ip-172-31-35-153 ggdeploymentd[26228]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:28:41 ip-172-31-35-153 ggdeploymentd[26228]: W[ggdeploymentd] entry.c:38: Failed to get root path from config.
Jan 29 03:28:43 ip-172-31-35-153 ggdeploymentd[26246]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:28:43 ip-172-31-35-153 ggdeploymentd[26246]: W[ggdeploymentd] entry.c:38: Failed to get root path from config.
Jan 29 03:28:44 ip-172-31-35-153 ggdeploymentd[26261]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:28:44 ip-172-31-35-153 ggdeploymentd[26261]: W[ggdeploymentd] entry.c:38: Failed to get root path from config.
Jan 29 03:28:45 ip-172-31-35-153 ggdeploymentd[26276]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:28:45 ip-172-31-35-153 ggdeploymentd[26276]: W[ggdeploymentd] entry.c:38: Failed to get root path from config.
Jan 29 03:32:38 ip-172-31-35-153 ggdeploymentd[26353]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:32:38 ip-172-31-35-153 ggdeploymentd[26353]: W[ggdeploymentd] entry.c:38: Failed to get root path from config.
Jan 29 03:32:39 ip-172-31-35-153 ggdeploymentd[26368]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:32:39 ip-172-31-35-153 ggdeploymentd[26368]: W[ggdeploymentd] entry.c:38: Failed to get root path from config.
Jan 29 03:32:40 ip-172-31-35-153 ggdeploymentd[26383]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:32:40 ip-172-31-35-153 ggdeploymentd[26383]: W[ggdeploymentd] entry.c:38: Failed to get root path from config.
Jan 29 03:32:41 ip-172-31-35-153 ggdeploymentd[26398]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:32:41 ip-172-31-35-153 ggdeploymentd[26398]: W[ggdeploymentd] entry.c:38: Failed to get root path from config.
Jan 29 03:32:43 ip-172-31-35-153 ggdeploymentd[26413]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:32:43 ip-172-31-35-153 ggdeploymentd[26413]: W[ggdeploymentd] entry.c:38: Failed to get root path from config.
Jan 29 03:32:44 ip-172-31-35-153 ggdeploymentd[26428]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:32:44 ip-172-31-35-153 ggdeploymentd[26428]: W[ggdeploymentd] entry.c:38: Failed to get root path from config.
Jan 29 03:32:45 ip-172-31-35-153 ggdeploymentd[26443]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:32:45 ip-172-31-35-153 ggdeploymentd[26443]: W[ggdeploymentd] entry.c:38: Failed to get root path from config.
Jan 29 03:32:46 ip-172-31-35-153 ggdeploymentd[26459]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:32:46 ip-172-31-35-153 ggdeploymentd[26459]: W[ggdeploymentd] entry.c:38: Failed to get root path from config.
Jan 29 03:32:48 ip-172-31-35-153 ggdeploymentd[26474]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:32:48 ip-172-31-35-153 ggdeploymentd[26474]: W[ggdeploymentd] entry.c:38: Failed to get root path from config.
Jan 29 03:32:49 ip-172-31-35-153 ggdeploymentd[26489]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:32:49 ip-172-31-35-153 ggdeploymentd[26489]: W[ggdeploymentd] entry.c:38: Failed to get root path from config.
Jan 29 03:44:30 ip-172-31-35-153 ggdeploymentd[31659]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:44:30 ip-172-31-35-153 ggdeploymentd[31659]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:44:30 ip-172-31-35-153 ggdeploymentd[31659]: W[core-bus] client_common.c:141: Server responded with an error.
Jan 29 03:44:30 ip-172-31-35-153 ggdeploymentd[31659]: W[core-bus] client_common.c:141: Server responded with an error.

I tried a deployment and it just says In progress on the AWS console. Nothing happens in terms of files getting to the EC2 client setup as the device.

I have gglite deployed to /var/lib/greengrass as the gg root folder.

How can I get past these errors?

AWS

asked 2 years ago233 views

4 Answers
1

The errors you're encountering with your AWS IoT Greengrass Lite setup on your Ubuntu EC2 instance indicate a few potential issues:

  1. Configuration problems: The error "Failed to get root path from config" suggests that the Greengrass Lite configuration file may be missing or incorrectly set up. Ensure that the configuration file is present and correctly specifies the root path (/var/lib/greengrass in your case).

  2. MQTT connection issues: The error "Subscribe to $aws/things/gglite-ubuntu-dev/jobs/notify-next-namespace-aws-gg-deployment failed" indicates that the device is having trouble subscribing to the MQTT topics necessary for receiving deployment notifications. This could be due to network connectivity problems or incorrect device credentials.

  3. Server communication errors: The repeated "Server responded with an error" messages suggest that there might be issues with the communication between the Greengrass Lite components and the AWS IoT Core service.

To resolve these issues, try the following steps:

  1. Verify the Greengrass Lite configuration file: Check that the config.yaml file in the /var/lib/greengrass/config directory exists and contains the correct root path and other necessary settings.

  2. Check device credentials: Ensure that the device certificate and private key are correctly placed in the /var/lib/greengrass/certs directory and have the proper permissions.

  3. Verify network connectivity: Make sure the EC2 instance has outbound internet access and can reach the AWS IoT endpoints.

  4. Review IAM roles and policies: Check that the IAM role associated with your EC2 instance has the necessary permissions for Greengrass operations.

  5. Examine CloudWatch logs: If you have enabled CloudWatch logging for your Greengrass core, check these logs for additional error information.

  6. Restart the Greengrass Lite service: Try stopping and restarting the greengrass-lite.target service to see if it resolves the issues.

If these steps don't resolve the problem, you may need to reinstall Greengrass Lite or contact AWS support for further assistance.
Sources
Greengrass test fail | AWS re:Post
Troubleshooting client devices - AWS IoT Greengrass

answered 2 years ago

EXPERT

reviewed 2 years ago

1

I have the cert and the keys in /ggcredentials directory. I have the config.yaml in /etc/greengrass directory. I did a chown and chrgrp of these directories to ggcore after which, the only error that I see is for ggdeploymentd :

journalctl -a -t ggdeploymentd -e

Jan 29 05:03:15 ip-172-31-35-153 ggdeploymentd[32316]: W[core-bus] client_common.c:141: Server responded with an error.

I am unable to deploy components to this device. Device status is healthy.

AWS

answered 2 years ago

EXPERT

reviewed 2 years ago

1

Resolution:

I was trying to deploy to a single Thing, and gglite does not support it yet. Deploying to a Thing group works!

AWS

answered 2 years ago

0

I am still unable to deploy components.

The set of errors in the iotcored showed up much later. So, the ownership change to the directory did not help.

journalctl -a -t iotcored -e

Jan 29 05:04:14 ip-172-31-35-153 iotcored[32308]: E[iotcored] mqtt.c:375: Server did not respond to ping within Keep Alive period.
Jan 29 05:04:14 ip-172-31-35-153 iotcored[32308]: E[core_mqtt] core_mqtt.c:3409: MQTT Connection Disconnected Successfully
Jan 29 05:04:14 ip-172-31-35-153 iotcored[32308]: E[iotcored] tls.c:120: Read failed.
Jan 29 05:04:14 ip-172-31-35-153 iotcored[32308]: E[core_mqtt] core_mqtt.c:1802: Call to receiveSingleIteration failed. Status=MQTTRecvFailed
Jan 29 05:04:14 ip-172-31-35-153 iotcored[32308]: E[iotcored] mqtt.c:350: Error in receive loop, closing connection.
Jan 29 05:05:14 ip-172-31-35-153 iotcored[32308]: E[iotcored] mqtt.c:375: Server did not respond to ping within Keep Alive period.
Jan 29 05:05:14 ip-172-31-35-153 iotcored[32308]: E[core_mqtt] core_mqtt.c:3409: MQTT Connection Disconnected Successfully
Jan 29 05:05:14 ip-172-31-35-153 iotcored[32308]: E[iotcored] tls.c:120: Read failed.
Jan 29 05:05:14 ip-172-31-35-153 iotcored[32308]: E[core_mqtt] core_mqtt.c:1802: Call to receiveSingleIteration failed. Status=MQTTRecvFailed
Jan 29 05:05:14 ip-172-31-35-153 iotcored[32308]: E[iotcored] mqtt.c:350: Error in receive loop, closing connection.
Jan 29 05:06:14 ip-172-31-35-153 iotcored[32308]: E[iotcored] mqtt.c:375: Server did not respond to ping within Keep Alive period.
Jan 29 05:06:14 ip-172-31-35-153 iotcored[32308]: E[core_mqtt] core_mqtt.c:3409: MQTT Connection Disconnected Successfully
Jan 29 05:06:14 ip-172-31-35-153 iotcored[32308]: E[iotcored] tls.c:120: Read failed.
Jan 29 05:06:14 ip-172-31-35-153 iotcored[32308]: E[core_mqtt] core_mqtt.c:1802: Call to receiveSingleIteration failed. Status=MQTTRecvFailed
Jan 29 05:06:14 ip-172-31-35-153 iotcored[32308]: E[iotcored] mqtt.c:350: Error in receive loop, closing connection.

ping and nmap tests documented here are successful.

Any help is appreciated. Thanks.

AWS

answered 2 years ago

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.