question

IainWhite-1972 avatar image
0 Votes"
IainWhite-1972 asked VenkatYalla-0009 answered

Can't get Node JS Edge Modules running under kubernetes

We have some Edge Modules that we're trying to get running on K8s (k3os), using the edge k8s mini-site as a reference https://microsoft.github.io/iotedge-k8s-doc/.

We've had success with our C# modules - they're running fine, but our NodeJS modules are failing at initialisation.:

 Error: connect ECONNREFUSED 127.0.0.1:35001                                                                                                                             ││     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14) 

The problem is when the module tries to connect to the iotedged runtime (Using WORKLOADURI which is defined as http://localhost:35001)

It seems that somewhere in nodejs it is resolving that URL, so instead of localhost it's calling 127.0.0.1.

When we exec's on to the module we tried to curl 127.0.0.1:35001 which wasn't responding but it was responding to localhost:35001, so I expect that's what's causing the problem.

Is this an issue that anyone else has encountered? Has anyone managed to get NodeJS modules running on K8s? It seems to me to be failing at the point that every NodeJS module would fail , in the boilerplate code that sets up the client transport - this isn't something that appears to be unique to anything in my module.





azure-iot-edge
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

VenkatYalla-0009 avatar image
1 Vote"
VenkatYalla-0009 answered

@IainWhite-1972

Unfortunately, this is a known issue that we don't have an ETA on fixing. Please send an email to veyalla@microsoft.com to discuss potential workarounds.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.