question

SebastienPerin-5295 avatar image
0 Votes"
SebastienPerin-5295 asked SebastienPerin-5295 action

Azure App Service - How to solve appsvc/node container issue "GLIBC_2.29 not found" ?

I'm looking for help on an issue quite similar to this one.

I'm new to Azure App Service so I followed the Nodejs quick start. Now I try to deploy my own Nodejs expressjs server which uses sqlite3 npm package (which successfully builds during deployment). Deployment goes fine until the "npm start" execution where I get the following error:

 2021-03-11T23:23:49.381909031Z > node server/dist/main.js
 2021-03-11T23:23:49.381913832Z 
 2021-03-11T23:23:50.915597419Z internal/modules/cjs/loader.js:1122
 2021-03-11T23:23:50.915651323Z   return process.dlopen(module, path.toNamespacedPath(filename));
 2021-03-11T23:23:50.915657823Z                  ^
 2021-03-11T23:23:50.915663023Z 
 2021-03-11T23:23:50.915667724Z Error: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /node_modules/sqlite3/lib/binding/node-v83-linux-x64/node_sqlite3.node)
 2021-03-11T23:23:50.915673224Z     at Object.Module._extensions..node (internal/modules/cjs/loader.js:1122:18)
 2021-03-11T23:23:50.915677924Z     at Module.load (internal/modules/cjs/loader.js:928:32)
 2021-03-11T23:23:50.915682525Z     at Function.Module._load (internal/modules/cjs/loader.js:769:14)
 2021-03-11T23:23:50.915687025Z     at Module.require (internal/modules/cjs/loader.js:952:19)
 2021-03-11T23:23:50.915691425Z     at require (internal/modules/cjs/helpers.js:88:18)
 2021-03-11T23:23:50.915702526Z     at Object.<anonymous> (/node_modules/sqlite3/lib/sqlite3-binding.js:4:15)
 2021-03-11T23:23:50.915707126Z     at Module._compile (internal/modules/cjs/loader.js:1063:30)
 2021-03-11T23:23:50.915711626Z     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
 2021-03-11T23:23:50.915716127Z     at Module.load (internal/modules/cjs/loader.js:928:32)
 2021-03-11T23:23:50.915720727Z     at Function.Module._load (internal/modules/cjs/loader.js:769:14)
 2021-03-11T23:23:50.936617185Z npm info lifecycle myapp@0.1.0~start: Failed to exec start script
 2021-03-11T23:23:50.953031152Z npm ERR! code ELIFECYCLE
 2021-03-11T23:23:50.960747354Z npm ERR! errno 1
 2021-03-11T23:23:50.964115573Z npm ERR! myapp@0.1.0 start: `node server/dist/main.js`
 2021-03-11T23:23:50.971916280Z npm ERR! Exit status 1
 2021-03-11T23:23:50.971932481Z npm ERR! 
 2021-03-11T23:23:50.971937981Z npm ERR! Failed at the myapp@0.1.0 start script.
 2021-03-11T23:23:50.971942281Z npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
 2021-03-11T23:23:51.016790096Z npm timing npm Completed in 3604ms
 2021-03-11T23:23:51.017682454Z 
 2021-03-11T23:23:51.018546310Z npm ERR! A complete log of this run can be found in:
 2021-03-11T23:23:51.020055409Z npm ERR!     /root/.npm/_logs/2021-03-11T23_23_50_971Z-debug.log

I have some experience and skills with docker container deployment, including Azure Kubernetes Service. But I'm still a bit lost here because I only use Visual Studio Code to deploy to my App Service resource. For example I still don't know if it's possible to customize the Dockerfile of my App Service and if yes how to do it. If I could do this then I may be able to fix the "GLIBC_2.29 not found" issue in this container.

I would really appreciate your community help on that issue.

Kind regards

azure-webappsazure-webapps-development
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.

brtrach-MSFT avatar image
0 Votes"
brtrach-MSFT answered

@SebastienPerin-5295 I was working on a GLIBC issue a few weeks ago. When I ran ldd --version it returned that version 2.28 was installed on the image. It might be worth checking to see if GLIBC is installed on your image, and if so, you may simply need to adjust your version number.

Azure does support the ability to bring custom container images. This customization though is done outside of Azure. We support custom images from a couple of resources but since you mentioned Docker, I will include a few links on how to customize an image.

The docker images that App Services has published can be found here. You can use this to access the same images we use and customize them to your liking.

Once you have settled on a Docker image, I would suggest checking out Docker's resources on getting started, which can be found here.

After you have your customized image ready to go, you can follow these steps to get going with your image in Azure. This quickstart uses Azure Container Registry but Web App Containers supports multiple services.

After following these steps and guidelines, please let us know if there are any specific questions or issues you run into regarding this matter.

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.

SebastienPerin-5295 avatar image
0 Votes"
SebastienPerin-5295 answered

Thanks for your answer @brtrach-MSFT,

I used node LTS 14. But I changed for node LTS 12, and the issue just disappeared. It's probably related to sqlite3 npm package itself.

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.

JasonFreeberg-3971 avatar image
0 Votes"
JasonFreeberg-3971 answered SebastienPerin-5295 commented

@SebastienPerin-5295 How are you deploying your code? (GitHub Actions, Azure Pipelines, CLI, FTP, etc.) If you're using GitHub Actions or Pipelines, can you paste your YAML file?

· 1
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.