linux-on-ibm-z / dockerfile-examples

A collection of examples to show how Dockerfiles could be created and used on Linux on IBM z Systems.
37 stars 62 forks source link

Elasticsearch - fails during gradle compile #13

Open caffreyj opened 3 years ago

caffreyj commented 3 years ago

The dockerfile for elastic search failed on anUbuntu 18.04.5 LTS (GNU/Linux 4.15.0-134-generic s390x) running on zVM with the following error message when command docker build . is issued

FAILURE: Build failed with an exception.

* Where:
Build file '/tmp/elasticsearch/benchmarks/build.gradle' line: 29

* What went wrong:
A problem occurred evaluating project ':benchmarks'.
> Could not create task ':benchmarks:test'.
   > Cannot set maxParallelForks to a value less than 1.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 22s
The command '/bin/sh -c apt-get install -y locales && rm -rf /var/lib/apt/lists/*  && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8  && cd $SOURCE_DIR && git clone https://github.com/elastic/elasticsearch && cd elasticsearch && git checkout v${ELASTICSEARCH_VER}  && wget $PATCH_URL/build.gradle  -P $SOURCE_DIR/elasticsearch/distribution/archives/linux-s390x-tar  && mkdir -p $SOURCE_DIR/elasticsearch/distribution/archives/oss-linux-s390x-tar && cp $SOURCE_DIR/elasticsearch/distribution/archives/linux-s390x-tar/build.gradle $SOURCE_DIR/elasticsearch/distribution/archives/oss-linux-s390x-tar  && mkdir -p $SOURCE_DIR/elasticsearch/distribution/packages/s390x-deb && cp $SOURCE_DIR/elasticsearch/distribution/archives/linux-s390x-tar/build.gradle $SOURCE_DIR/elasticsearch/distribution/packages/s390x-deb  && mkdir -p $SOURCE_DIR/elasticsearch/distribution/packages/s390x-oss-deb && cp $SOURCE_DIR/elasticsearch/distribution/archives/linux-s390x-tar/build.gradle $SOURCE_DIR/elasticsearch/distribution/packages/s390x-oss-deb  && mkdir -p $SOURCE_DIR/elasticsearch/distribution/packages/s390x-oss-rpm && cp $SOURCE_DIR/elasticsearch/distribution/archives/linux-s390x-tar/build.gradle $SOURCE_DIR/elasticsearch/distribution/packages/s390x-oss-rpm  && mkdir -p $SOURCE_DIR/elasticsearch/distribution/packages/s390x-rpm && cp $SOURCE_DIR/elasticsearch/distribution/archives/linux-s390x-tar/build.gradle $SOURCE_DIR/elasticsearch/distribution/packages/s390x-rpm  && mkdir -p $SOURCE_DIR/elasticsearch/distribution/docker/docker-s390x-export && cp $SOURCE_DIR/elasticsearch/distribution/archives/linux-s390x-tar/build.gradle $SOURCE_DIR/elasticsearch/distribution/docker/docker-s390x-export  && mkdir -p $SOURCE_DIR/elasticsearch/distribution/docker/oss-docker-s390x-export && cp $SOURCE_DIR/elasticsearch/distribution/archives/linux-s390x-tar/build.gradle $SOURCE_DIR/elasticsearch/distribution/docker/oss-docker-s390x-export  && wget $PATCH_URL/docker_build_context_build.gradle -P $SOURCE_DIR/elasticsearch/distribution/docker/docker-s390x-build-context  && mv $SOURCE_DIR/elasticsearch/distribution/docker/docker-s390x-build-context/docker_build_context_build.gradle $SOURCE_DIR/elasticsearch/distribution/docker/docker-s390x-build-context/build.gradle  && wget $PATCH_URL/oss_docker_build_context_build.gradle -P $SOURCE_DIR/elasticsearch/distribution/docker/oss-docker-s390x-build-context  && mv $SOURCE_DIR/elasticsearch/distribution/docker/oss-docker-s390x-build-context/oss_docker_build_context_build.gradle $SOURCE_DIR/elasticsearch/distribution/docker/oss-docker-s390x-build-context/build.gradle  && wget -O - $PATCH_URL/diff.patch | git apply  && ./gradlew :distribution:archives:oss-linux-s390x-tar:assemble --parallel --illegal-access=warn && ./gradlew :distribution:docker:oss-docker-s390x-build-context:assemble  && mkdir -p /usr/share/elasticsearch  && tar -xzf distribution/archives/oss-linux-s390x-tar/build/distributions/elasticsearch-oss-${ELASTICSEARCH_VER}-SNAPSHOT-linux-s390x.tar.gz -C /usr/share/elasticsearch --strip-components 1' returned a non-zero code: 1
cwsolee commented 3 years ago

This looks like an intermittent problem. We saw this before but not all the time, we run this today a few times and all passed. We just finish a round of currency and about to update the dockerfile but it has nothing to do with this problem, you can try the latest and see whether you still see problem constantly. Something like this could be environment related too.