-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Docker Container not running with node-rdkafka and librdkafka #3691
Comments
That is likely a node-rdkafka issue, please file an issue on that repo. |
I am reporting the issue on node-rdkafka as well, Also i am using https://github.com/edenhill/librdkafka.git which i supose using the latest version of librdkafka . |
i have the same probleme [c] PID:1 - 11/09/2023, 8:39:02 PM LOG [Fi] Start application listening on group:find url: ["b**"] Thread 16 "rdk:broker-1" received signal SIGSEGV, Segmentation fault. (gdb) bt the segmentation fault is occurring within the SSL_get_peer_certificate function from the libssl library. |
I would suggest trying to use https://github.com/confluentinc/confluent-kafka-javascript which is compatible with node-rdkafka (and is based on it). It includes a precompiled version of librdkafka within which should have all the openssl dependencies built into it. I recall having to set ssl.ca.location while using node-rdkafka, maybe this is related. This isn't the case with confluent-kafka-javascript. Example of a dockerfile using that: confluentinc/confluent-kafka-javascript#48 (comment) |
Description
I am using node-rdkafka to connect my application with kafka. When i am running the application using docker i am getting error Segmentation fault (core dumped)
I have used different combination of node images to resolve the issue.
How to reproduce
Attaching my DockerFile
FROM node:14.17.3
RUN npm cache clean --force
RUN apt-get update
RUN apt install -y liblz4-dev
RUN apt install -y libsasl2-dev
RUN apt install -y libssl-dev
RUN apt-get install -y ca-certificates curl gnupg
g++ make musl-dev
python3 unzip wget
git
RUN git clone https://github.com/edenhill/librdkafka.git &&
cd librdkafka &&
./configure --install-deps &&
make &&
make install
ENV BUILD_LIBRDKAFKA=0
ENV LD_LIBRARY_PATH=/usr/local/lib
RUN mkdir -p /home/node && chown -R node:node /home/node
ENV NODE_ENV=local
WORKDIR /home/node
COPY ["package.json", "./"]
RUN npm install husky -g
RUN npm install -g typescript
RUN npm install -g ts-node
RUN npm install
COPY . .
EXPOSE 4003
RUN chown -R node /home/node
USER node
RUN rm -rf dist
RUN tsc
CMD node dist/bin/server.js
Checklist
Please provide the following information:
v1.6.2
3.1.0
'metadata.broker.list': this.#BROKER, 'group.id': process.env.SERVICE_NAME, 'enable.auto.commit': false
ubuntu (x64)
debug=..
as necessary) from librdkafkaThe text was updated successfully, but these errors were encountered: