Error: DPI-1047: Cannot locate a 64-bit Oracle Client library: "/usr/src/app/oracle/instantclient_18_3/libclntsh.so: file too short".
This is my Dockerfile FROM node:carbon
USER root
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
COPY . .
RUN chmod -R 777 /usr/src/app
ENV LD_LIBRARY_PATH="/usr/src/app/oracle/instantclient_18_3"
I am using [email protected] node module to connect with oracle database. And I am getting above error while calling getConnection function of oracledb.
file too short sounds like an OS error reporting you have a corrupted Oracle Instant Client installation.
Thanks @cjbj for responding, There is only single line in libclntsh.so , i.e. libclntsh.so.18.1
That would be the expected symbolic link to libclntsh.so.18.1, which obviously must exist. Make sure you copy all the files.
Here are some resources that you may be interested in:
- http://yum.oracle.com/oracle-linux-nodejs.html You could use these packages to install Node.js
- https://github.com/oracle/docker-images/blob/master/OracleInstantClient/dockerfiles/18.3.0/Dockerfile You could use this as the basis for a container
Thanks @cjbj , libclntsh.so file was getting corrupt on windows machine while extracting. Now I am extracting it directly on my remote environment before setting environment variables.
@KaustubhYK can you please share your fixed dockerfile here? it would help a lot.
@KaustubhYK try the new node-oracledb 6 default Thin mode: this doesn't need Instant Client, so installing will be a lot smoother. See the release announcement.
@KaustubhYK and @bmabir17 can you share your solution? DPI-1047: Cannot locate a 64-bit Oracle Client library: "/opt/oracle/instantclient_23_6/libclntsh.so: file too short".
I have the same issue. I checked the client installation it seems ok.
ldconfig -p | grep libclntsh.so
libclntsh.so.23.1 (libc6,x86-64) => /opt/oracle/instantclient_23_6/libclntsh.so.23.1