Skip to content
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

Using node-libcurl inside arm32v7 docker container fails with "out of memory" due to wrong package suggested in readme #166

Closed
mschrupp opened this issue Apr 15, 2019 · 3 comments

Comments

@mschrupp
Copy link

We have Dockerfile based on arm32v7/node:10-slim.

As mentioned in the README.md, we install libcurl4-openssl-dev.

The build works with it, but using node-libcurl to download file with https fails with out of memory.

Installing libcurl4-gnutls-dev instead fixes the issue.

I don't know why the build works (?) though. I don't have the time to look into this any further, but I thought it might help somebody.

Maybe this could be mentioned in the README.md?

Thanks a lot for your work

@gsouf
Copy link

gsouf commented Apr 30, 2019

I confirm that the above is the right fix for this issue

@JCMais
Copy link
Owner

JCMais commented May 21, 2019

I can reproduce, I'm almost sure this has to do with the fact that Node.js 10 is built with OpenSSL 1.1.0, but on the image you mentioned libcurl is built with OpenSSL 1.0.0.

I've tried the image arm32v7/node:8 (Node.js 8 is built with OpenSSL 1.0.0) and it does seem to work. The versions must match because Node.js itself also exports some OpenSSL symbols. I will investigate this further this week to make sure that is the problem.

@JCMais JCMais changed the title Using node-libcurl inside docker container fails with "out of memory" due to wrong package suggested in readme Using node-libcurl inside arm32v7 docker container fails with "out of memory" due to wrong package suggested in readme May 25, 2019
@JCMais JCMais added the arm label May 25, 2019
@JCMais
Copy link
Owner

JCMais commented May 25, 2019

Confirmed this is the issue, you must use a matching OpenSSL version to the one used by Node.js. Otherwise, you are going to get this error. The reason is the one I mentioned above, see issue here for more details #164.

So basically, you must rebuild libcurl with the OpenSSL version Node.js uses, or use other TLS backend, as you did.

There is a note about this on the README now: https://github.com/JCMais/node-libcurl#important-notes-on-prebuilt-binaries--direct-installation

@JCMais JCMais closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants