grpc-node: Prebuilt gRPC doesn't work with the Ubuntu 18.04 nodejs runtime.
While trying to use Google PubSub Node.js library that uses grpc-node lib I get an error:
node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-glibc/grpc_node.node: undefined symbol: SSL_library_init
I have tried to reinstall this module but that does not help.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 5
- Comments: 46 (28 by maintainers)
Commits related to this issue
- Update Ubuntu image to 18.10. See https://github.com/grpc/grpc-node/issues/341 — committed to kieras/gcs-pci-tokenizer by akieras 6 years ago
fyi
Building gRPC from source did not work for me. I did
So I went the nvm way:
After this I removed node_modules folder and ran
npm i
just in case. And now it’s working 👍@nicolasnoble Thanks for your expertise and prompt action.
fyi - @Mambix Thanks for your tip. It was same for me. Here’s the nodesource way that I used to workaround it fyi 👍 .
So, the nodejs Ubuntu package has been fixed and published as of a few hours ago, and therefore I can close this issue. This was an interesting journey.
Thanks, I’ll try reproducing it. My point is that if you have troubles, other users might as well, so I want to make sure that it’s either a non-widespread issue, or that there’s a known workaround of something.
Okay, I know exactly what’s going on now, thanks a lot for the image and the repro case, @hi5san. Unfortunately, this isn’t fixable, at all. I managed to find at least one another npm package (uws) that is plagued with the same exact problem, so this isn’t on gRPC.
I am going to try creating a small reproduction case to submit a bug in Ubuntu and/or Debian - because that’s an actual issue with the package itself.
The node binary in Ubuntu’s package is just not conforming to the node extension ABI, and as such, will never be able to load any precompiled package out there that uses SSL. But this non-conformance is due to Debian’s rules around OpenSSL, therefore I have little hopes this will ever get fixed, since fixing it would make the package non-conformant.
Your best bet in using gRPC at the moment under Ubuntu 18.04 is to:
npm install --build-from-source=grpc
.I will leave the issue opened for the time being, as this is clearly a problem, and we know its cause, but don’t expect any traction from it from our end beside the provided workarounds above.
Great, thanks. I can then make a bug report to Ubuntu, because I can confirm their nodejs package is broken. That’s the rootcause issue here.