-
Notifications
You must be signed in to change notification settings - Fork 86
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
Advice for how to install this package in a Docker container #283
Comments
I just confirmed that i am getting a segfault (pulled the image and in a run the following code in a node repl) const Pulsar = require("pulsar-client");
Pulsar.Client.setLogHandler((level, file, line, message) => { console.log("[%s][%s:%d] %s", level, file, line, message); });
var authentication = new Pulsar.AuthenticationOauth2({
type: "sn_service_account",
client_id: process.env.PULSAR_CLIENT_ID,
client_secret: process.env.PULSAR_CLIENT_SECRET,
issuer_url: process.env.PULSAR_ISSUER_URL,
audience: process.env.PULSAR_AUDIENCE,
});
var client = new Pulsar.Client({
serviceUrl: process.env.PULSAR_SERVICE_URL,
authentication: authentication,
});
client.createProducer({ topic: "persistent://public/default/inside-docker" }).then((producer) => { console.log("created producer"); }).catch(console.error); And got the following error (no other output):
So I'm obviously doing something wrong with the installation procedure but not having any luck. This is happening with 1.7.0 and 1.8.0 |
Hi, @ericallam You can add flow code and share Segmentation fault info:
|
Here's the segment log:
Interestingly this looks related to another issue I was running into with deploying this project to AWS ECS in a Docker container, but with the prisma library: I actually managed to fix that issue by using It seems there is an issue with Node.js 18+ because it bundles OpenSSL 3.0 and prisma was using the system OpenSSL, which is OpenSSL 1.1.x on |
And for reference here is the Dockerfile: https://gist.github.com/ericallam/a59beb06dfaeb586fbd3a20d1ffd5eb8 |
Not sure if it'll help but here is the issue where nodejs discusses replacing OpenSSL 1.1 with 3.0: nodejs/node#40106 |
This issue still exists. It seems to have happened on node:17, node:18, and node:19 of Linux. Use node:16 can work.
It may indeed have something to do with this, and I will try to find the reason. |
Until this issue is resolved we should use Node 16: apache/pulsar-client-node#283
The root cause is the OpenSSL symbol conflict between Node.js and CPP client. #310 will be fixed it, we will release For now, If need, You can temporarily use my release version: |
I'm using Pulsar in trigger.dev and I'm trying to deploy a Node.js web service that has a dependency on this package in a Docker container. I'm running into issues trying to get this dependency to work and I was wondering if there is any guidance on the best way to build a Docker container with this package.
Here is the Dockerfile for reference, which does build but is failing to work once I try running it:
I'm not really getting any helpful logs (even though I've turned on logging all of Pulsar's logs):
It looks like possibly a segfault but will keep investigating.
The text was updated successfully, but these errors were encountered: