apache / druid

Apache Druid: a high performance real-time analytics database.
https://druid.apache.org/
Apache License 2.0
13.41k stars 3.69k forks source link

Docker Build is failing for 0.16.0-incubating-rc3 #8868

Closed bibekjoshisrijan closed 1 year ago

bibekjoshisrijan commented 4 years ago

Docker build fails when running as instructed in the repository.

Version

0.16.0-incubating-rc3

Description

docker build -t apache/incubator-druid:stable -f distribution/docker/Dockerfile . Sending build context to Docker daemon 61.02MB Step 1/18 : FROM maven:3-jdk-8-slim as builder ---> 61bd282dfdbc Step 2/18 : RUN export DEBIAN_FRONTEND=noninteractive && apt-get -qq update && apt-get -qq -y install --no-install-recommends python3 python3-yaml ---> Using cache ---> 7965a9296990 Step 3/18 : COPY . /src ---> 1f051baf92be Step 4/18 : WORKDIR /src ---> Running in 66d8b3728a8a Removing intermediate container 66d8b3728a8a ---> 3f964b49fa05 Step 5/18 : RUN mvn -B -ff -q dependency:go-offline install -Pdist,bundle-contrib-exts -DskipTests -Danimal.sniffer.skip=true -Dcheckstyle.skip=true -Denforcer.skip=true -Dforbiddenapis.skip=true -Dmaven.javadoc.skip=true -Dpmd.skip=true -Dspotbugs.skip=true ---> Running in 4edd7073d8bf Copying legacy consoles in... Adding SQL docs... Transpiling ReactTable CSS... compiled lib/react-table.css Webpacking everything... Webpack running in production mode [BABEL] Note: The code generator has deoptimised the styling of /src/web-console/node_modules/brace/index.js as it exceeds the max of 500KB. Hash: 64bdfbd029709b2c02c8 Version: webpack 4.39.2 Time: 79981ms Built at: 11/14/2019 7:53:13 AM Asset Size Chunks Chunk Names web-console-0.16.0.js 2.47 MiB 0 [emitted] [big] web-console web-console-0.16.0.js.map 7.1 MiB 0 [emitted] web-console Entrypoint web-console [big] = web-console-0.16.0.js web-console-0.16.0.js.map [10] ./node_modules/@blueprintjs/core/lib/esm/index.js + 93 modules 353 KiB {0} [built] | 94 modules [12] ./src/utils/index.tsx 399 bytes {0} [built] [13] ./node_modules/@blueprintjs/icons/lib/esm/index.js + 2 modules 34.4 KiB {0} [built] | 3 modules [38] ./src/singletons/toaster.ts 237 bytes {0} [built] [39] ./node_modules/react-table/es/index.js + 6 modules 99.2 KiB {0} [built] | 7 modules [72] ./src/singletons/url-baser.ts 363 bytes {0} [built] [121] ./src/variables.ts 930 bytes {0} [built] [149] (webpack)/buildin/module.js 552 bytes {0} [built] [150] ./lib/sql-docs.js 22.6 KiB {0} [built] [259] ./src/entry.ts 2.29 KiB {0} [built] [502] ./src/ace-modes/dsql.js 4.16 KiB {0} [built] [503] ./src/ace-modes/hjson.js 5.82 KiB {0} [built] [504] ./src/bootstrap/react-table-defaults.tsx 1.85 KiB {0} [built] [597] ./src/console-application.tsx 12.4 KiB {0} [built] [751] ./src/entry.scss 497 bytes {0} [built]

ewheeler commented 4 years ago

I had a different Maven error- seems like it ran out of memory, perhaps due to configuring additional druid extensions

...
Adding org.apache.maven.settings.io.SettingsReaderdefault
Adding org.apache.maven.settings.io.SettingsWriterdefault
Adding org.apache.maven.settings.validation.SettingsValidatordefault
Cleaning up unclosed ZipFile for archive /root/.m2/repository/com/ibm/icu/icu4j/55.1/icu4j-55.1.jar
[ERROR] GC overhead limit exceeded -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/OutOfMemoryError
The command '/bin/sh -c mvn -B -ff -q dependency:go-offline       install       -Pdist,bundle-contrib-exts       -DskipTests       -Danimal.sniffer.skip=true       -Dcheckstyle.skip=true       -Denforcer.skip=true       -Dforbiddenapis.skip=true       -Dmaven.javadoc.skip=true       -Dpmd.skip=true       -Dspotbugs.skip=true' returned a non-zero code: 1

I was able to resolve by adding the following line to the included Dockerfile

RUN export MAVEN_OPTS="-Xmx1g -XX:+UseCGroupMemoryLimitForHeap"

I suspect only one of the two options I added did the trick, but that might depend on your version of java.

Sorry for the slightly tangential comment, but might be useful to look at other possible MAVEN_OPTS- and might help in case anyone else has the same issue I encountered

mitchlloyd commented 3 years ago

I got the error that @bibekjoshisrijan reported when trying to build 0.20.0:

Adding org.apache.maven.settings.io.SettingsWriterdefault
Adding org.apache.maven.settings.validation.SettingsValidatordefault
Cleaning up unclosed ZipFile for archive /root/.m2/repository/org/roaringbitmap/RoaringBitmap/0.9.0/RoaringBitmap-0.9.0.jar
[ERROR] GC overhead limit exceeded -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.

I increased my Docker memory from 2GB to 8GB for the build and then it worked.

github-actions[bot] commented 1 year ago

This issue has been marked as stale due to 280 days of inactivity. It will be closed in 4 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@druid.apache.org list. Thank you for your contributions.

github-actions[bot] commented 1 year ago

This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.