CraZySacX / node-jdbc

JDBC Wrapper for node.js
140 stars 106 forks source link

Invalid ELF header when installing on azure #227

Open jayaxel opened 2 years ago

jayaxel commented 2 years ago

Hi, I'm trying to install jdbc in the azure app service server, but it seems to always fail with an invalid ELF header. As I understand, this may have something to do with how containers work, but am unable to find any more information around this. Does anyone know how to resolve this issue?

The error is:

2021-11-29T02:10:29.201709304Z   /  _  \ __________ _________   ____  
2021-11-29T02:10:29.201720704Z  /  /_\  \___   /  |  \_  __ \_/ __ \ 
2021-11-29T02:10:29.201725704Z /    |    \/    /|  |  /|  | \/\  ___/ 
2021-11-29T02:10:29.201729404Z \____|__  /_____ \____/ |__|    \___  >
2021-11-29T02:10:29.201733604Z         \/      \/                  \/ 
2021-11-29T02:10:29.201737304Z A P P   S E R V I C E   O N   L I N U X
2021-11-29T02:10:29.201740804Z 
2021-11-29T02:10:29.201744204Z Documentation: http://aka.ms/webapp-linux
2021-11-29T02:10:29.201747604Z NodeJS quickstart: https://aka.ms/node-qs
2021-11-29T02:10:29.201751004Z NodeJS Version : v12.22.4
2021-11-29T02:10:29.201754504Z Note: Any data outside '/home' is not persisted
2021-11-29T02:10:29.201758604Z 
2021-11-29T02:10:29.304881862Z Cound not find build manifest file at '/home/site/wwwroot/oryx-manifest.toml'
2021-11-29T02:10:29.305791363Z Could not find operation ID in manifest. Generating an operation id...
2021-11-29T02:10:29.305807263Z Build Operation ID: 36a8b532-10e7-402d-a21b-e9927fb48be5
2021-11-29T02:10:30.763270589Z Environment Variables for Application Insight's IPA Codeless Configuration exists..
2021-11-29T02:10:31.926835648Z Writing output script to '/opt/startup/startup.sh'
2021-11-29T02:10:32.663831766Z Running #!/bin/sh
2021-11-29T02:10:32.665588467Z 
2021-11-29T02:10:32.665604767Z # Enter the source directory to make sure the script runs where the user expects
2021-11-29T02:10:32.665610367Z cd "/home/site/wwwroot"
2021-11-29T02:10:32.665614667Z 
2021-11-29T02:10:32.665619067Z export NODE_PATH=/usr/local/lib/node_modules:$NODE_PATH
2021-11-29T02:10:32.666060267Z if [ -z "$PORT" ]; then
2021-11-29T02:10:32.666074467Z      export PORT=8080
2021-11-29T02:10:32.666079567Z fi
2021-11-29T02:10:32.666342168Z 
2021-11-29T02:10:32.666355768Z PATH="$PATH:/home/site/wwwroot" npm run start-prod
2021-11-29T02:10:33.046848483Z npm info it worked if it ends with ok
2021-11-29T02:10:33.048934484Z npm info using n******@6.14.14
2021-11-29T02:10:33.049704985Z npm info using n******@v12.22.4
2021-11-29T02:10:33.228182686Z npm info lifecycle d******@0.0.0~prestart-prod: d******@0.0.0
2021-11-29T02:10:33.231721088Z npm info lifecycle d******@0.0.0~start-prod: d******@0.0.0
2021-11-29T02:10:33.243752895Z 
2021-11-29T02:10:33.243802695Z > d******@0.0.0 start-prod /home/site/wwwroot
2021-11-29T02:10:33.243812395Z > NODE_ENV=PROD node ./bin/www
2021-11-29T02:10:33.243817095Z 
2021-11-29T02:10:37.051449712Z internal/modules/cjs/loader.js:1057
2021-11-29T02:10:37.051493712Z   return process.dlopen(module, path.toNamespacedPath(filename));
2021-11-29T02:10:37.051507612Z                  ^
2021-11-29T02:10:37.051512812Z 
2021-11-29T02:10:37.051516312Z Error: /home/site/wwwroot/node_modules/java/build/Release/nodejavabridge_bindings.node: invalid ELF header
2021-11-29T02:10:37.051520012Z     at Object.Module._extensions..node (internal/modules/cjs/loader.js:1057:18)
2021-11-29T02:10:37.051523612Z     at Module.load (internal/modules/cjs/loader.js:863:32)
2021-11-29T02:10:37.051527112Z     at Function.Module._load (internal/modules/cjs/loader.js:708:14)
2021-11-29T02:10:37.051530712Z     at Module.require (internal/modules/cjs/loader.js:887:19)
2021-11-29T02:10:37.051534012Z     at require (internal/modules/cjs/helpers.js:74:18)
2021-11-29T02:10:37.051537412Z     at Object. (/home/site/wwwroot/node_modules/java/lib/nodeJavaBridge.js:21:16)
2021-11-29T02:10:37.051541312Z     at Module._compile (internal/modules/cjs/loader.js:999:30)
2021-11-29T02:10:37.051544712Z     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
2021-11-29T02:10:37.051548512Z     at Module.load (internal/modules/cjs/loader.js:863:32)
2021-11-29T02:10:37.051552012Z     at Function.Module._load (internal/modules/cjs/loader.js:708:14)
2021-11-29T02:10:37.062174819Z npm info lifecycle d******@0.0.0~start-prod: Failed to exec start-prod script
2021-11-29T02:10:37.067563122Z npm ERR! code ELIFECYCLE
2021-11-29T02:10:37.068936323Z npm ERR! errno 1
2021-11-29T02:10:37.073556526Z npm ERR! d******@0.0.0 start-prod: `NODE_ENV=PROD node ./bin/www`
2021-11-29T02:10:37.074571326Z npm ERR! Exit status 1
2021-11-29T02:10:37.075571827Z npm ERR! 
2021-11-29T02:10:37.077683028Z npm ERR! Failed at the d******@0.0.0 start-prod script.
2021-11-29T02:10:37.077732528Z npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2021-11-29T02:10:37.083584031Z npm timing npm Completed in 4143ms
2021-11-29T02:10:37.090747036Z 
2021-11-29T02:10:37.090765436Z npm ERR! A complete log of this run can be found in:
2021-11-29T02:10:37.090771236Z npm ERR!     /root/.npm/_logs/2021-11-29T02_10_37_077Z-debug.log