node-rdkafka 2.3.0 Segmentation fault
See original GitHub issueSince 2.3.0, as soon as connect()
method is called (from consumer or producer), a Segmentation fault occured.
Steps to reproduce using docker and e2e tests for brevity :
Dockerfile :
FROM node:9-stretch
RUN npm i node-rdkafka
WORKDIR /node_modules/node-rdkafka
RUN npm i
ENV KAFKA_HOST=localhost:29092
e2e tests run :
$ docker build -t rdkafka .
(...)
$ docker run --net host rdkafka make e2e
Consumer
commit
Makefile:63: recipe for target 'e2e' failed
make: *** [e2e] Segmentation fault (core dumped)
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:17 (6 by maintainers)
Top Results From Across the Web
node-rdkafka is throwing segmentation fault - Stack Overflow
I have tried two version's of node-rdkafka (2.10.0 & 2.10.1). Both the versions are throwing segmentation fault while deployment.
Read more >Understanding NodeJS, Kafka, and SSL - and1zero
Segmentation fault is an error thrown by program written in C / C++ in order to avoid memory corruption. In our application's case,...
Read more >https://213.136.78.173/krish/node-kafka/commit/39d...
versionString) { + console.error(`Librdkafka version of ${versionString} does not match package json: ... Requires broker version >= 2.3.0.
Read more >Server Admin Log/Archive 32 - Wikitech-static
... to apt.wikimedia.org (addresses segfault in XML reader (T162586, T165074) ... 10:07 hashar: Upgrading Jenkins "Git client" plugin 2.3.0..2.4.1 and ...
Read more >subject:"Re\: Jira" - The Mail Archive
Re: [jira] [Created] (KAFKA-14257) Unexpected error ... 2.0.1, >> 2.1.0, 2.2.0, 2.1.1, 2.3.0, 2.2.1, 2.2.2, 2.4.0, 2.3.1, 2.5.0, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The problem here is that librdkafka built is not used inside node module, because node module links against system librdkafka, not the local librdkafka. And system’s librdkafka is usually linked against OpenSSL 1.1 but node is built against OpenSSL 1.0, and this causes the segmentation fault. See PR #388 for the fix.
Also in Debian, you should make sure that you have
libssl1.0-dev
installed, notlibssl-dev
(1.1) so that npm builds librdkafka correctly against OpenSSL 1.0.On Fedora x86_64, with node 8.9.4 and suitable debug parts enabled (Ugh!):
I’m using a non-SSL connection to a local kafka broker, but from what I understand this is generic SSL-support code initialization?
EDIT: On a whim I modified
node_modules/node-rdkafka/configure
in my project, added--disable-ssl
, and executednpm rebuild
. This fixes the immediate problem, and I can work again.