Lambda function gets stuck after deployment

0

Hi,

I use GG to deploy a Lambda function to TX2 (JetPack 4.2). The deployment is successful. Then Lambda function just does not run. Here is the log for Lambda function.

[2019-07-30T16:14:38.961-07:00][INFO]-lambda_runtime.py:120,Running [arn:aws:lambda:us-west-2:286168668889:function:leopardlib-image-classification-demo:11]
[2019-07-30T16:14:38.961-07:00][INFO]-ipc_client.py:170,Getting work for function [arn:aws:lambda:us-west-2:286168668889:function:leopardlib-image-classification-demo:11] from http://localhost:8000/2016-11-01/functions/arn:aws:lambda:us-west-2:286168668889:function:leopardlib-image-classification-demo:11/work

And here is the runtime.log.

[2019-07-30T16:14:35.167-07:00][INFO]-MQTT connection successful.	{"attemptId": "soic", "clientId": "adrian-neo-tf-tx2_Core"}
[2019-07-30T16:14:35.168-07:00][INFO]-MQTT connection established.	{"endpoint": "a14iwnd8ozg94-ats.iot.us-west-2.amazonaws.com:8883", "clientId": "adrian-neo-tf-tx2_Core"}
[2019-07-30T16:14:35.168-07:00][INFO]-MQTT connection connected. Start subscribing.	{"clientId": "adrian-neo-tf-tx2_Core"}
[2019-07-30T16:14:35.168-07:00][INFO]-Deployment agent connected to cloud.
[2019-07-30T16:14:35.168-07:00][INFO]-Start subscribing.	{"numOfTopics": 2, "clientId": "adrian-neo-tf-tx2_Core"}
[2019-07-30T16:14:35.168-07:00][INFO]-Trying to subscribe to topic $aws/things/adrian-neo-tf-tx2_Core-gda/shadow/update/delta
[2019-07-30T16:14:35.216-07:00][INFO]-Trying to subscribe to topic $aws/things/adrian-neo-tf-tx2_Core-gda/shadow/get/accepted
[2019-07-30T16:14:35.309-07:00][INFO]-All topics subscribed.	{"clientId": "adrian-neo-tf-tx2_Core"}
[2019-07-30T16:14:35.723-07:00][INFO]-Created worker.	{"functionArn": "arn:aws:lambda:::function:GGIPDetector:1", "workerId": "86738b3d-39fb-4350-7068-a27b6621b6e6", "pid": 21944}
[2019-07-30T16:14:35.857-07:00][WARN]-[5]GK Remote: Error retrieving public key data: ErrPrincipalNotConfigured: private key for MqttCertificate is not set
[2019-07-30T16:14:35.871-07:00][INFO]-Created worker.	{"functionArn": "arn:aws:lambda:::function:GGConnManager", "workerId": "c05d58c5-e8d6-4b4f-74b2-683e5f0046a9", "pid": 21990}
[2019-07-30T16:14:35.999-07:00][INFO]-Created worker.	{"functionArn": "arn:aws:lambda:::function:GGShadowService", "workerId": "b76aa3d9-b267-47bb-76ad-dc2f592100a1", "pid": 22055}
[2019-07-30T16:14:36.176-07:00][INFO]-Created worker.	{"functionArn": "arn:aws:lambda:::function:GGDeviceCertificateManager", "workerId": "06a9fde0-7db1-45cb-5308-d7f6ad43e86c", "pid": 22100}
[2019-07-30T16:14:36.183-07:00][WARN]-[5]GK Remote: Error retrieving public key data: ErrPrincipalNotConfigured: private key for MqttCertificate is not set
[2019-07-30T16:14:36.365-07:00][INFO]-Created worker.	{"functionArn": "arn:aws:lambda:::function:GGCloudSpooler:1", "workerId": "d23354b4-c233-48ed-65e7-fcbbb12c13da", "pid": 22156}
[2019-07-30T16:14:36.523-07:00][INFO]-Created worker.	{"functionArn": "arn:aws:lambda:::function:GGShadowSyncManager", "workerId": "c481a3d9-1b66-4b72-4e9a-3c465da75f19", "pid": 22214}
[2019-07-30T16:14:36.667-07:00][INFO]-Created worker.	{"functionArn": "arn:aws:lambda:::function:GGTES", "workerId": "28eed3d7-f151-4db3-646f-c39b6a77a1d3", "pid": 22272}
[2019-07-30T16:14:36.771-07:00][INFO]-Created worker.	{"functionArn": "arn:aws:lambda:::function:GGSecretManager:1", "workerId": "fdd1803b-91b8-43fd-797f-cb7c35a0d79b", "pid": 22323}
[2019-07-30T16:14:36.772-07:00][INFO]-Started all system components.
[2019-07-30T16:14:36.903-07:00][INFO]-Created worker.	{"functionArn": "arn:aws:lambda:us-west-2:286168668889:function:leopardlib-image-classification-demo:11", "workerId": "1187df1f-9821-46a0-5c52-56ce228d8cf2", "pid": 22374}
[2019-07-30T16:14:37.686-07:00][WARN]-[5]GK Remote: Error retrieving public key data: ErrPrincipalNotConfigured: private key for MqttCertificate is not set

What does the last warning mean?

asked 5 years ago539 views
4 Answers
0

Hi Adrian-LI,

Greengrass hasn't been tested on Jetpack 4.2 yet. It's known to work on 3.3. I would recommend installing Jetpack 3.3.
https://docs.aws.amazon.com/greengrass/latest/developerguide/setup-filter.other.html

We'll update the docs when Greengrass has been tested on Jetpack 4.2.

Thanks,
KR-AWS

AWS
KR-AWS
answered 5 years ago
0

Hi KR-AWS,

Thank you for replying!
GG worked on the same TX2 (with JetPack 4.2) in a previous project. I did not change any setting other than switching to a new GG group. It suddenly does not work any more. So it must be something else.
I guess I will try with 3.3 then.

Best,
Adrian

answered 5 years ago
0

Hi Adrian-LI,

You can also try changing the group default for containerization. Then redeploy. If Greengrass won't even start you may need to reinstall Greengrass.
https://docs.aws.amazon.com/greengrass/latest/developerguide/lambda-group-config.html#lambda-containerization-groupsettings

What's different between the two GG groups? If you're trying to do an ML demo you might want to start with just the Hello World lambda. Make sure that works and then continue.

In particular, are you using any connectors?
Do you have Python 2.7 and 3.7 installed?
Is it a long running lambda? In which case turn on lambda logging and redeploy. Then look at the lambda logs.
https://docs.aws.amazon.com/greengrass/latest/developerguide/gg-troubleshooting.html#troubleshooting-logs

Thanks,
KR-AWS

AWS
KR-AWS
answered 5 years ago
0

Hi KR-AWS,

I found the problem. The new group does not have a trigger subscription.
And GG does work on TX2 with JetPack 4.2.
Thank you very much!

Best,
Adrian

answered 5 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.

Guidelines for Answering Questions