New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to establish a connection to query-engine-node-api library. It seems there is a problem with your OpenSSL installation! #14073
Comments
Same type of error
Prisma CLI Version : 4.0.0 |
i have try an old version of my code that is actually in production on server. it was working on the same PC with the same config npx prisma generate Prisma CLI Version : 3.15.2 i don't understand what is going on thx |
@mjpaquet Your environment changed. See this issue and comment for your specific case: #13717 (comment) |
Thank @janpio it was the problem. NodeJS was sandbox by Ubuntu Software (Snap)
now everything is working |
I m using fnm still the same issue. |
Have you try to manually install OpenSSL and glibC ? on my case it was already done |
Did some investigation. Ubuntu 22.04 has upgraded libssl to 3, and does not propose libssl1.1 |
I'm also having this issue on Ubuntu 22.04. |
If any of you still having this issue are using Homebrew on your machine, I found out through some very annoying debugging that apparently Homebrew had a higher precedence on my $PATH, and since I had installed other programs with it that depended on the OpenSSL 1.1 binary, my system was defaulting to that as the binary to use for OpenSSL instead of the default installed binary by Ubuntu (in my case Pop OS, a derivative of Ubuntu) in /usr/bin/openssl. Try running TLDR check and see if you have any other versions of OpenSSL installed on your system as a peer-dependency via something like Homebrew or another package manager, and make sure that version of OpenSSL is on version 3 or is not taking precedence over your system package manager's version of OpenSSL |
This solved my issue! Thanks very much. |
This is not a good solution because you will cause other programs that have been installed via homebrew to break. if i set /usr/bin in my zshrc to be before homebrew bin directory. It breaks other things i installed via homebrew |
What was your solution? |
Guys, I had this problem here and I found out that anaconda (which uses python) had the openssl version in 1.1.0, even though I updated the openssl version for my machine in 3.0.2 zsh just couldn't find this version the anaconda. What I did was put the version of my machine as the main version of the system, with this change prisma started working again !! |
Can you be more specific? |
My computer had two versions of openssl: an anaconda version 1.1.0 and a 3.0.2 version downloaded from ubuntu. The problem was that Prisma was using the version of anaconda that was out of date and not the latest version that was installed. I solved the problem by taking out the anaconda version and using only the updated version |
I meant: Can you be more specific about the steps you took to remove Conda's version of OpenSSL? I see that Conda has installed OpenSSL on my system, but when I run |
Now I get it. Well I found out that openssl was the one for anaconda using the command |
For folks running Prisma on K8 environments (like GKE, etc) in a container, you will want to use |
I can confirm the anaconda installation is having issues with openssl. Now works as a charm. |
Anaconda = https://www.anaconda.com/? Can you describe the setup a bit how you get into this situation? |
I installed OpenSSL.Light and the problem is gone. |
If you have conda running on base, just go ahead and deactivate it |
I had the same issue when running my nodejs+prisma app with Docker. I was initially using |
For @victorkurauchi and others getting this issue on Alpine Linux (especially in Docker), this comment in another issue pointed out that the latest Alpine strips out legacy OpenSSL APIs. This caused this issue to start occurring for me recently. I was able to fix it without downgrading or cross-grading to bullseye or buster by adding this line to my dockerfile before the
|
@zackdotcomputer solution worked for me! Just added this line of code to my Dockerfile and was good to go. Thank you all! |
Just curious, does anyone know what changed that could have caused this to be come an issue? Our docker image was using a pinned version (ie: 16.x.x-alpine) and it started having this issue sometime within the past few days. edit: alpine pushed a new version out that bumped openssl up to 3.0, and the alpine version isn't pinned in that package name. |
Hello, I have switched from
I am looking on a way to fix my Dockerfile, in the meantime if someone has a fix ... Thanks ! |
I switched from |
Looks like something is happening with the library: openssl1.1-compat it is now switched to "dev" status: https://pkgs.alpinelinux.org/contents?file=libssl.so&path=&name=&branch=&arch= Probably switching between images is an intermediate solution... Adding line below helped to build the image: RUN apk add --no-cache libc6-compat
RUN apk add --no-cache openssl1.1-compat-dev Here is the full docker file: ## Docker file from here: https://github.com/prisma/prisma/issues/12417#issuecomment-1238242374
##########
## DEPS ##
##########
FROM node:lts-alpine AS deps
RUN apk add --no-cache libc6-compat
RUN apk add --no-cache openssl1.1-compat-dev
WORKDIR /app
# Install dependencies based on the preferred package manager
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
RUN \
if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
elif [ -f package-lock.json ]; then npm ci; \
elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i; \
else echo "Lockfile not found." && exit 1; \
fi
COPY prisma ./prisma
RUN pnpm prisma generate
#############
## BUILDER ##
#############
FROM node:lts-alpine AS builder
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY --from=deps /app .
COPY . .
RUN npm run build
############
## RUNNER ##
############
FROM node:lts-alpine AS runner
WORKDIR /app
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/dist ./
USER nextjs
CMD ["node", "./main.js"] |
For node v18 the docker tag |
Hey everyone, Alberto from Prisma here. For anyone getting this error on Linux Alpine (e.g., on |
I was using node:18-alpine in a VS Code dev container and getting this error. My solution was to switch to node:18, and rebuild the container. |
❤️👌 |
Even with OpenSSL installed on my machine (I have installed it through Brew), that's what solved for me (Ubuntu 22.04): |
Hey @diaraujo13, would you happen to have a |
There's a few different issues in this thread, but all or most of them seem to be fixed already. OpenSSL version detection when Homebrew or Anaconda is installed should be fixed as of Prisma 4.9.0, and support for OpenSSL 3 on Alpine was added in Prisma 4.8.0. One thing I'm not quite sure about and need to check is @mjpaquet's report of Prisma not working with Node.js installed via I'm going to go ahead and close this issue, please let us know if I missed something and it needs to be reopened, or open a new issue if you run into any problems! |
fixed by running |
Bug description
How to reproduce
next dev
andprisma generate
will cause the issueEnvironment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: