docker-ci-tool-stack
docker-ci-tool-stack copied to clipboard
FATAL: Failed to extract file server-jre-8u171-linux-x64.tar.gz! and Service 'nexus' failed to build
Building nexus Step 1/19 : FROM centos:centos7 ---> 49f7960eb7e4 Step 2/19 : MAINTAINER Sonatype [email protected] ---> Using cache ---> 473d299a1d10 Step 3/19 : LABEL vendor=Sonatype com.sonatype.license="Apache License, Version 2.0" com.sonatype.name="Nexus Repository Manager base image" ---> Using cache ---> f6106d9e4642 Step 4/19 : ARG NEXUS_VERSION=3.6.1-02 ---> Using cache ---> cf7d0464bb32 Step 5/19 : ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-unix.tar.gz ---> Using cache ---> ebf180a937a5 Step 6/19 : ARG NEXUS_DOWNLOAD_SHA256_HASH=4a658996cf29ca2d4f9c8b3d3cff11bfc358d88f03495812d7814268f0b1259b ---> Using cache ---> bbb556ae2672 Step 7/19 : ENV JAVA_HOME=/opt/java JAVA_VERSION_MAJOR=8 JAVA_VERSION_MINOR=171 JAVA_VERSION_BUILD=11 JAVA_DOWNLOAD_HASH=512cd62ec5174c3487ac17c61aaa89e8* ---> Running in 1b256e2fe29e Removing intermediate container 1b256e2fe29e ---> 26532717e919 Step 8/19 : ENV JAVA_URL=http://download.oracle.com/otn-pub/java/jdk/${JAVA_VERSION_MAJOR}u${JAVA_VERSION_MINOR}-b${JAVA_VERSION_BUILD}/${JAVA_DOWNLOAD_HASH}/server-jre-${JAVA_VERSION_MAJOR}u${JAVA_VERSION_MINOR}-linux-x64.tar.gz JAVA_DOWNLOAD_SHA256_HASH=e8a341ce566f32c3d06f6d0f0eeea9a0f434f538d22af949ae58bc86f2eeaae4 ---> Running in b1bf2bacd120 Removing intermediate container b1bf2bacd120 ---> c1e859a255ef Step 9/19 : ENV SONATYPE_DIR=/opt/sonatype ---> Running in 4364378d144f Removing intermediate container 4364378d144f ---> 1555871e7df9 Step 10/19 : ENV NEXUS_HOME=${SONATYPE_DIR}/nexus NEXUS_DATA=/nexus-data NEXUS_CONTEXT='' SONATYPE_WORK=${SONATYPE_DIR}/sonatype-work ---> Running in f4a711db505f Removing intermediate container f4a711db505f ---> b3e5a060c9e0 Step 11/19 : ARG NEXUS_REPOSITORY_MANAGER_COOKBOOK_VERSION="release-0.5.20171115-163526.03915d6" ---> Running in 988e0bf7e90a Removing intermediate container 988e0bf7e90a ---> 9ffeb1f797c4 Step 12/19 : ARG NEXUS_REPOSITORY_MANAGER_COOKBOOK_URL="https://github.com/sonatype/chef-nexus-repository-manager/releases/download/${NEXUS_REPOSITORY_MANAGER_COOKBOOK_VERSION}/chef-nexus-repository-manager.tar.gz" ---> Running in 818e7f4ad331 Removing intermediate container 818e7f4ad331 ---> 47dbacc6d2f6 Step 13/19 : ADD solo.json.erb /var/chef/solo.json.erb ---> 22497374f72a Step 14/19 : RUN curl -L https://www.getchef.com/chef/install.sh | bash && /opt/chef/embedded/bin/erb /var/chef/solo.json.erb > /var/chef/solo.json && chef-solo --recipe-url ${NEXUS_REPOSITORY_MANAGER_COOKBOOK_URL} --json-attributes /var/chef/solo.json && rpm -qa chef | xargs rpm -e && rpm --rebuilddb && rm -rf /etc/chef && rm -rf /opt/chefdk && rm -rf /var/cache/yum && rm -rf /var/chef ---> Running in ac318c11682c % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 23436 100 23436 0 0 39446 0 --:--:-- --:--:-- --:--:-- 39454 el 7 x86_64 Getting information for chef stable for el... downloading https://omnitruck-direct.chef.io/stable/chef/metadata?v=&p=el&pv=7&m=x86_64 to file /tmp/install.sh.6/metadata.txt trying curl... sha1 bf0bd662c5b46d81418c943ac4bc6b84c095aa9c sha256 abdb676a8d55fc9807b4eabe5313c54d3946977d7ae3eecd7303cd388b04042a url https://packages.chef.io/files/stable/chef/14.2.0/el/7/chef-14.2.0-1.el7.x86_64.rpm version 14.2.0 downloaded metadata file looks valid... downloading https://packages.chef.io/files/stable/chef/14.2.0/el/7/chef-14.2.0-1.el7.x86_64.rpm to file /tmp/install.sh.6/chef-14.2.0-1.el7.x86_64.rpm trying curl... Comparing checksum with sha256sum...
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
You are installing an omnibus package without a version pin. If you are installing on production servers via an automated process this is DANGEROUS and you will be upgraded without warning on new releases, even to new major releases. Letting the version float is only appropriate in desktop, test, development or CI/CD environments.
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
Installing chef installing with rpm... warning: /tmp/install.sh.6/chef-14.2.0-1.el7.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 83ef826a: NOKEY Preparing... ######################################## Updating / installing... chef-14.2.0-1.el7 ######################################## Thank you for installing Chef! [2018-06-24T02:27:06+00:00] WARN: No config file found or specified on command line, using command line options. [2018-06-24T02:27:06+00:00] WARN: No cookbooks directory found at or above current directory. Assuming /var/chef. [2018-06-24T02:27:06+00:00] WARN: No cookbooks directory found at or above current directory. Assuming /var/chef. [2018-06-24T02:27:06+00:00] WARN: ***************************************** [2018-06-24T02:27:06+00:00] WARN: ***************************************** [2018-06-24T02:27:06+00:00] WARN: Did not find config file: /etc/chef/client.rb, using command line options. [2018-06-24T02:27:06+00:00] WARN: Did not find config file: /etc/chef/client.rb, using command line options. [2018-06-24T02:27:06+00:00] WARN: ***************************************** [2018-06-24T02:27:06+00:00] WARN: ***************************************** Starting Chef Client, version 14.2.0 [2018-06-24T02:27:07+00:00] WARN: Plugin Network: unable to detect ipaddress [2018-06-24T02:27:07+00:00] WARN: Plugin Network: unable to detect ipaddress resolving cookbooks for run list: ["nexus_repository_manager::docker"] Synchronizing Cookbooks:
- nexus_repository_manager (0.1.0)
- java (1.50.0)
- tar (2.1.1)
- limits (1.0.0)
- poise-python (1.6.0)
- s3_file (2.8.5)
- apt (6.1.4)
- homebrew (4.2.0)
- windows (3.4.0)
- poise (2.8.1)
- poise-languages (2.1.1)
- ohai (5.2.0)
- poise-archive (1.5.0) Installing Cookbook Gems: Compiling Cookbooks... Converging 24 resources Recipe: java::notify
- log[jdk-version-changed] action nothing (skipped due to action :nothing) Recipe: java::oracle
- log[WARNING - Downloading directly from Oracle is unreliable. Change download url.] action write[2018-06-24T02:27:09+00:00] WARN: WARNING - Downloading directly from Oracle is unreliable. Change download url. [2018-06-24T02:27:09+00:00] WARN: WARNING - Downloading directly from Oracle is unreliable. Change download url.
Recipe: java::set_java_home
- directory[/etc/profile.d] action create (up to date)
- template[/etc/profile.d/jdk.sh] action create
- create new file /etc/profile.d/jdk.sh
- update content in file /etc/profile.d/jdk.sh from none to b2915a --- /etc/profile.d/jdk.sh 2018-06-24 02:27:09.525214000 +0000 +++ /etc/profile.d/.chef-jdk20180624-70-4jj40q.sh 2018-06-24 02:27:09.525214000 +0000 @@ -1 +1,2 @@ +export JAVA_HOME=/opt/java
- change mode from '' to '0755' Recipe: java::oracle
- yum_package[tar] action install (up to date)
- java_ark[jdk] action install
- yum_package[curl for download_direct_from_oracle] action install (up to date)
- download oracle tarball straight from the server[2018-06-24T02:28:10+00:00] FATAL: Failed to extract file server-jre-8u171-linux-x64.tar.gz! [2018-06-24T02:28:10+00:00] FATAL: Failed to extract file server-jre-8u171-linux-x64.tar.gz!
Running handlers: [2018-06-24T02:28:10+00:00] ERROR: Running exception handlers [2018-06-24T02:28:10+00:00] ERROR: Running exception handlers Running handlers complete [2018-06-24T02:28:10+00:00] ERROR: Exception handlers complete [2018-06-24T02:28:10+00:00] ERROR: Exception handlers complete Chef Client failed. 2 resources updated in 01 minutes 03 seconds [2018-06-24T02:28:10+00:00] FATAL: Stacktrace dumped to /etc/chef/local-mode-cache/cache/chef-stacktrace.out [2018-06-24T02:28:10+00:00] FATAL: Stacktrace dumped to /etc/chef/local-mode-cache/cache/chef-stacktrace.out [2018-06-24T02:28:10+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report [2018-06-24T02:28:10+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report ERROR: Service 'nexus' failed to build: The command '/bin/sh -c curl -L https://www.getchef.com/chef/install.sh | bash && /opt/chef/embedded/bin/erb /var/chef/solo.json.erb > /var/chef/solo.json && chef-solo --recipe-url ${NEXUS_REPOSITORY_MANAGER_COOKBOOK_URL} --json-attributes /var/chef/solo.json && rpm -qa chef | xargs rpm -e && rpm --rebuilddb && rm -rf /etc/chef && rm -rf /opt/chefdk && rm -rf /var/cache/yum && rm -rf /var/chef' returned a non-zero code: 1
I'm facing with this error also. Can someone help to resolve it ? Thanks
same error too
updating java url in docker-nexus3/Dockerfile as below worked for me
ENV JAVA_URL='http://download.oracle.com/otn-pub/java/jdk/8u192-b12/750e1c8617c5452694857ad95c3ee230/server-jre-8u192-linux-x64.tar.gz' \ JAVA_DOWNLOAD_SHA256_HASH='3d811a5ec65dc6fc261f488757bae86ecfe285a79992363b016f60cdb4dbe7e6'
relink the docker-nexus3 subproject and you are fine. This now uses openjdk. Downloading links from oracle tend to fail after some time.