romanbalayan / oracledb-prebuilt-for-lambda

Node OracleDB Client, pre-built for AWS Lambda
5 stars 0 forks source link

Node 20 support? #19

Open jorool opened 5 months ago

jorool commented 5 months ago

Hello,

How do we make this lib work with lambda with node runtime version 20?

Right now, getting this message: DPI-1047: Cannot locate a 64-bit Oracle Client library: "libclntsh.so: cannot open shared object file: No such file or directory".See https: //node-oracledb.readthedocs.io/en/latest/user_guide/installation.html for help Node-oracledb installation instructions: https://node-oracledb.readthedocs.io/en/latest/user_guide/installation.html You must have Linux 64-bit Oracle Client libraries configured with ldconfig, or in LD_LIBRARY_PATH. If you do not have Oracle Database on this computer, then install the Instant Client Basic or Basic Light package from https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html

romanbalayan commented 5 months ago

Hi @jorool,

Is the error from an AWS Lambda environment?

Tested locally, and should work:

START RequestId: a47b93bf-81e2-46ad-9987-61dd648cfc9d Version: $LATEST
2024-02-10T14:13:45.191Z        23cd8061-c6c3-4780-bec1-b1f47aee61df    INFO    Node Version is: v20.11.0
2024-02-10T14:13:45.223Z        23cd8061-c6c3-4780-bec1-b1f47aee61df    INFO    Oracle Version is: 60300
END RequestId: 23cd8061-c6c3-4780-bec1-b1f47aee61df
REPORT RequestId: 23cd8061-c6c3-4780-bec1-b1f47aee61df  Init Duration: 0.83 ms  Duration: 1254.10 ms    Billed Duration: 1255 ms        Memory Size: 128 MB Max Memory Used: 128 MB
jorool commented 4 months ago

Hey,

Yes, the error happens in lambda runtime environment. I tried upgrading my lambda runtimes from node 18 to 20 and started getting that error. I did not change anything else. Maybe I missed something?

sathiappancei commented 2 months ago

@jorool @romanbalayan did you guys make it work in AWS Lambda environment with Node V20? I am facing exactly the same issue! All works fine with Node V18 but if I switch to Node V20 then error DPI-1047: Cannot locate a 64-bit Oracle Client library: \"libclntsh.so: cannot open shared object file.

Any input is much appreciated.

Thanks.

rgare-jeffa commented 2 months ago

The main issue having this work with the node20 may be because Lambda went from AWS - Linux 2 to Linux 2023. This removed some critical portions of the infrastructure required to utilize the oracle binaries and how they are built with Linux 2 (namely libaio and libnsl(?)).

renanwilliam commented 1 week ago

@rgare-jeffa, do you find any alternative?