Passer au contenu

Greengrass Snap on Ubuntu Core cannot execute NodeJS lambdas

0

Hi

It's undocumented but it is impossible to run a NodeJS lambda with the Greengrass Snap. The snap only provides the Python environment : python 2.7 lambdas work like a charm.

After Greengrass snap install on Ubuntu Core and successful lambda deployment of the "hello world" nodejs lambda, no message is posted in the hello/world topic. On the local GG machine, the following error shows in the runtime.log file :

\[2019-05-19T07:46:55.967Z]\[INFO]-Starting worker arn:aws:lambda:eu-west-1:919510806644:function:Greengrass_HelloWorld:4
\[2019-05-19T07:46:56.045Z]\[ERROR]-Runtime execution error: unable to start lambda container: failed to run container sandbox: container_linux.go:344: starting container process caused "exec: "nodejs6.10": executable file not found in $PATH"
\[2019-05-19T07:46:56.047Z]\[ERROR]-failed to start worker d5260972-1b3a-483d-7df8-7c7e27e2e90f: process start failed: failed to run container sandbox: container_linux.go:344: starting container process caused "exec: "nodejs6.10": executable file not found in $PATH"

How can I install and run nodejs lambdas in this environment ?

Regards

--
Jean-Philippe

Edited by: Jips71 on May 19, 2019 3:54 PM

demandé il y a 7 ans429 vues
11 réponses
0

FYI I posted this issue on snapcraft.io for cross referencing : https://forum.snapcraft.io/t/nodejs-runtime-issues-with-the-greengrass-support-interface-and-the-aws-iot-greengrass-snap/11424/4

I checked the aws-iot-greengrass snap files in /var/aws-iot-greengrass/2/snap/ and here is what I found:

There is no plugin: node or node-engine specified in the snapcraft.yaml. Instead, nodejs is referenced in the rootfs-stage-packages section. Abstract:

parts:
rootfs-stage-packages:
stage-packages:
- nodejs=4.2.6~dfsg-1ubuntu4.2
in the dpkg.list node 4.2.6 is referenced. Abstract:

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-============================-=============================-============
ii nodejs 4.2.6~dfsg-1ubuntu4.2 amd64
This is obviously not the required nodejs6.10 required by Greengrass 1.8.0 specs.

répondu il y a 7 ans
0

Hi Jips71,

I was able to replicate the issue on my end. I'm investigating a solution. I'll keep you posted.
Thanks,
KR-AWS

AWS
répondu il y a 7 ans
0

Great thank you !!!

Let me know if I can be of any help

By the way, is the snap source code available somewhere on a public repo (GitHub?)

I would gladly try to contribute with PRs

répondu il y a 7 ans
0

If you work on the snap, will you take a look at upgrading it into 1.9.x ?
Because the deprecation of node 6.10 for AWS lambdas by the end of the month will make it unusable with node anyway
See my other thread https://forums.aws.amazon.com/thread.jspa?threadID=303437&tstart=0

répondu il y a 7 ans
0

Hello KR
Any news on that topic ?
Regards

Jean-Philippe

répondu il y a 7 ans
0

Hi Jean-Philippe,

The Snap isn't in a public repo. I'm sorry but pull requests aren't possible on that project at the moment.
We are also aware that a new Snap needs to be generated for Greengrass 1.9.x. We are still actively working on this issue. We don't provide release dates or estimates.

I'll keep this issue open and continue to update the forum as more information becomes available.

Thanks,
KR-AWS

AWS
répondu il y a 7 ans
0

Hi

Do you have any news on that topic ?

Do you know how to make it possible to execute a nodejs lambda on a Greengrass endpoint ?

répondu il y a 7 ans
0

Hi Jean-Philippe,

As you're already aware, we're working on the 1.9.x Snap which will include support for node8.

To address your question, nodejs lambda failures are specific to Snap and we're working on the fix. Deploying nodejs lambdas to Greengrass outside of a Snap works perfectly fine.

Thanks,
-joe

AWS
répondu il y a 7 ans
0

Hi

I didn't intend to put any pressure. Sorry if I sounded pushy.

KR wrote that he was investigating for a solution, that's why I upped the thread. I'll mark it as answered.

Thanks

--
Jean-Philippe

répondu il y a 7 ans
0

Thank you Dalhbord. I was feeling alone on that topic and I am glad (sadly) that other users are impacted by the problem.

See this broader topic
https://forums.aws.amazon.com/thread.jspa?messageID=908238&tstart=0#908238

répondu il y a 7 ans
0

Hi Jips71, and dahlborg,

There's an announcement about Greengrass and Snap support.
https://forums.aws.amazon.com/ann.jspa?annID=6967

I'll continue to post updates as they become available.

Thanks,
KR-AWS

AWS
répondu il y a 6 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.