You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
s2i build https://github.com/sclorg/nodejs-ex.git centos/nodejs-10-centos7 testimgnode
Your branch is up to date with 'origin/master'.
---> Installing application source ...
---> Installing all dependencies
npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated to-iso-string@0.0.2: to-iso-string has been deprecated, use @segment/to-iso-string instead.
npm ERR! code Z_DATA_ERROR
npm ERR! errno -3
npm ERR! invalid distance too far back
npm notice created a lockfile as package-lock.json. You should commit this file.
added 117 packages from 342 contributors in 16.2s
npm ERR! Callback called more than once.
npm ERR! A complete log of this run can be found in:
npm ERR! /opt/app-root/src/.npm/_logs/2019-02-15T06_42_11_908Z-debug.log
Build failed
ERROR: An error occurred: non-zero (13) exit code from centos/nodejs-10-centos7
The Z_DATA_ERROR is a zlib error constant that seems to propagate from the native library through node wrapper. Similar issue on FreeBSD and Node 10.3 was solved with upgrade of the bundled zlib.
Node itself bundles zlib in version 1.2.11, CentOS 7 (and the image in question) contains version 1.2.7, so I guess it may be the manifestation of the same issue as above.
$ s2i build https://github.com/sclorg/nodejs-ex.git nodejs-10-centos7-zlib:local testimgnode
Your branch is up to date with 'origin/master'.
---> Installing application source ...
---> Installing all dependencies
npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated to-iso-string@0.0.2: to-iso-string has been deprecated, use @segment/to-iso-string instead.
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm notice created a lockfile as package-lock.json. You should commit this file.
added 117 packages from 342 contributors and audited 200 packages in 3.482s
found 5 vulnerabilities (2 low, 1 moderate, 1 high, 1 critical)
run `npm audit fix` to fix them, or `npm audit`for details
---> Building in production mode
---> Pruning the development dependencies
audited 200 packages in 0.996s
found 5 vulnerabilities (2 low, 1 moderate, 1 high, 1 critical)
run `npm audit fix` to fix them, or `npm audit`for details
/opt/app-root/src/.npm is not a mountpoint
---> Cleaning the npm cache /opt/app-root/src/.npm
/tmp is not a mountpoint
---> Cleaning the /tmp/npm-*
Build completed successfully
Though the magic of git bisect (:heart:) I managed to isolate the fix to a single commit.
Fix inflateInit2() bug when windowBits is 16 or 32.
A windowBits value of 0, 16, or 32 gets the window bits from the
zlib header. However there is no zlib header for 16, or for 32
when the input is gzip. This commit sets the window bits for
inflate to 15 if a gzip stream is detected and windowBits was 16
or 32.
Thanks @khardix upgrading to zlib 1.2.11 worked for me too.
For anyone that needs it I've made a small script that we run inside our gitlab CI for building zlib (and other RPMs) from Fedora rawhide using mmornati/docker-mock-rpmbuilder which we then install inside of our container that inherits from centos/nodejs-10-centos7:latest. The process boils down to:
Activity
khardix commentedon Feb 15, 2019
This seems like
zlibrelated issue. I tried it with Fedora container with newerzlib, and the problem did not manifest.hhorak commentedon Feb 15, 2019
Can you be more specific, please? Where is the
zlibused in this case?khardix commentedon Feb 15, 2019
The
Z_DATA_ERRORis azliberror constant that seems to propagate from the native library through node wrapper. Similar issue on FreeBSD and Node 10.3 was solved with upgrade of the bundledzlib.Node itself bundles
zlibin version1.2.11, CentOS 7 (and the image in question) contains version1.2.7, so I guess it may be the manifestation of the same issue as above.khardix commentedon Feb 18, 2019
I have managed to fix it by updating
zlibto1.2.11. Steps to reproduce:Rebuild
zlibfrom Fedora Rawhide for EPEL 7:Upgrade build image (here, using
podman/buildah):Verify that the application installs cleanly
khardix commentedon Feb 19, 2019
Though the magic of
git bisect(:heart:) I managed to isolate the fix to a single commit.jabinb commentedon Feb 27, 2019
Thanks @khardix upgrading to zlib 1.2.11 worked for me too.
For anyone that needs it I've made a small script that we run inside our gitlab CI for building zlib (and other RPMs) from Fedora rawhide using mmornati/docker-mock-rpmbuilder which we then install inside of our container that inherits from
centos/nodejs-10-centos7:latest. The process boils down to:$ PACKAGE=zlib PACKAGE_VERSION=1.* ARCH=x86_64 TARGET=epel-7 OUTPUT_DIR=./rpm-packages ./build-rpm.sh