s2i-nodejs-container: NodeJS container failed again on `rdkafka`

The failed logs can be seen here:

++ -MD -MP -g -O2 -fPIC -Wall -Wsign-compare -Wfloat-equal -Wpointer-arith -Wcast-align -Wno-non-virtual-dtor -c HeadersImpl.cpp -o HeadersImpl.o
g++ -MD -MP -g -O2 -fPIC -Wall -Wsign-compare -Wfloat-equal -Wpointer-arith -Wcast-align -Wno-non-virtual-dtor -c QueueImpl.cpp -o QueueImpl.o
g++ -MD -MP -g -O2 -fPIC -Wall -Wsign-compare -Wfloat-equal -Wpointer-arith -Wcast-align -Wno-non-virtual-dtor -c MetadataImpl.cpp -o MetadataImpl.o
Creating shared library librdkafka++.so.1
g++ -L/opt/app-root/src/node_modules/node-rdkafka/build/deps -shared -Wl,-soname,librdkafka++.so.1 RdKafka.o ConfImpl.o HandleImpl.o ConsumerImpl.o ProducerImpl.o KafkaConsumerImpl.o TopicImpl.o TopicPartitionImpl.o MessageImpl.o HeadersImpl.o QueueImpl.o MetadataImpl.o -o librdkafka++.so.1 -L../src -lrdkafka
cp librdkafka++.so.1 librdkafka++-dbg.so.1
Creating static library librdkafka++.a
ar rcs librdkafka++.a RdKafka.o ConfImpl.o HandleImpl.o ConsumerImpl.o ProducerImpl.o KafkaConsumerImpl.o TopicImpl.o TopicPartitionImpl.o MessageImpl.o HeadersImpl.o QueueImpl.o MetadataImpl.o
cp librdkafka++.a librdkafka++-dbg.a
Creating librdkafka++.so symlink
rm -f "librdkafka++.so" && ln -s "librdkafka++.so.1" "librdkafka++.so"
Generating pkg-config file rdkafka++.pc
Generating pkg-config file rdkafka++-static.pc
Checking librdkafka++ integrity
librdkafka++.so.1              OK
librdkafka++.a                 OK
make[2]: Leaving directory '/opt/app-root/src/node_modules/node-rdkafka/deps/librdkafka/src-cpp'
make[2]: Entering directory '/opt/app-root/src/node_modules/node-rdkafka/deps/librdkafka/src'
Install librdkafka to /opt/app-root/src/node_modules/node-rdkafka/build/deps
d $DESTDIR/opt/app-root/src/node_modules/node-rdkafka/build/deps/include/librdkafka
/bin/sh: line 1: d: command not found
make[2]: [../mklove/Makefile.base:269: lib-install] Error 127 (ignored)
d $DESTDIR/opt/app-root/src/node_modules/node-rdkafka/build/deps
/bin/sh: line 1: d: command not found
rdkafka.h rdkafka_mock.h $DESTDIR/opt/app-root/src/node_modules/node-rdkafka/build/deps/include/librdkafka
make[2]: [../mklove/Makefile.base:270: lib-install] Error 127 (ignored)
/bin/sh: line 1: rdkafka.h: command not found
make[2]: Leaving directory '/opt/app-root/src/node_modules/node-rdkafka/deps/librdkafka/src'
make[2]: *** [../mklove/Makefile.base:271: lib-install] Error 127
make[1]: *** [Makefile:44: install-subdirs] Error 2
make[1]: Leaving directory '/opt/app-root/src/node_modules/node-rdkafka/deps/librdkafka'
make: *** [deps/librdkafka.target.mk:30: 11a9e3388a67e1ca5c31c1d8da49cb6d2714eb41.intermediate] Error 2
rm 11a9e3388a67e1ca5c31c1d8da49cb6d2714eb41.intermediate
make: Leaving directory '/opt/app-root/src/node_modules/node-rdkafka/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:282:12)
gyp ERR! System Linux 5.19.15-201.fc36.x86_64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /opt/app-root/src/node_modules/node-rdkafka
gyp ERR! node -v v14.19.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm WARN hello-world@0.0.1 No description
npm WARN hello-world@0.0.1 No repository field.
npm WARN hello-world@0.0.1 No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-rdkafka@2.14.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-rdkafka@2.14.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /opt/app-root/src/.npm/_logs/2022-10-20T06_26_23_499Z-debug.log
The command '/bin/sh -c /usr/libexec/s2i/assemble' returned a non-zero code: 1
S2I image 'quay.io/f35/nodejs:14' test FAILED (exit code: 1)
docker: container ID file found, make sure the other container isn't running or delete /tmp/tmp.yYAA7DnE3s.cid.
See 'docker run --help'.
Error response from daemon: Cannot kill container: 7fc677cf787b8190a9933b34452f5d4fdab9568f27dff69351630f1e432ec9f9: No such container: 7fc677cf787b8190a9933b34452f5d4fdab9568f27dff69351630f1e432ec9f9
Success!
Untagged: quay.io/f35/nodejs

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 19 (19 by maintainers)

Commits related to this issue

Most upvoted comments

@pacostas @mhdawson What should be fixed in s2i-nodejs-containers? Or should we wait a couple of days? I saw in the log, that we are using node_rdkafka 1.9.2 and you are talking about node_rdkafka 2.13. Do we need somehow extend https://github.com/sclorg/s2i-nodejs-container/blob/master/14/s2i/bin/assemble?

Thanks for solving this issue 😃

@pacostas could you help out with this one. I think it lines up with some testing you are already doing with Kafkajs and node-rdkafka so you might have a heads start.