2017-10-14 3 views
2

내 프로젝트는 graddlew 4.2.1을 사용하여 로컬로 빌드합니다. 그러나 GitLab에 밀어 넣을 때 오류가 발생합니다. Docker를 사용해야하므로 Docker Image를 사용하여이 기능을 사용할 수 있는지 알 수 없습니다. 여기에 오류OpenJDK9 (Docker), graddle 4.2.1, GitLab

# This file is a template, and might need editing before it works on your project. 
# This template uses the java:8 docker image because there isn't any 
# official Gradle image at this moment 
# 
# This is the Gradle build system for JVM applications 
# https://gradle.org/ 
# https://github.com/gradle/gradle 
image: openjdk:9-jdk 

# Disable the Gradle daemon for Continuous Integration servers as correctness 
# is usually a priority over speed in CI environments. Using a fresh 
# runtime for each build is more reliable since the runtime is completely 
# isolated from any previous builds. 
variables: 
    GRADLE_OPTS: "-Dorg.gradle.daemon=false" 

# Make the gradle wrapper executable. This essentially downloads a copy of 
# Gradle to build the project with. 
# https://docs.gradle.org/current/userguide/gradle_wrapper.html 
# It is expected that any modern gradle project has a wrapper 
before_script: 
    - chmod +x gradlew 

# We redirect the gradle user home using -g so that it caches the 
# wrapper and dependencies. 
# https://docs.gradle.org/current/userguide/gradle_command_line.html 
# 
# Unfortunately it also caches the build output so 
# cleaning removes reminants of any cached builds. 
# The assemble task actually builds the project. 
# If it fails here, the tests can't run. 
build: 
    stage: build 
    script: 
    - ./gradlew -g /cache/.gradle clean assemble 
    allow_failure: false 
    artifacts: 
    name: "AudioBot" 
    paths: 
     - build/libs/*.jar 

: 누군가가 나를 도울 수 있다면

Exception in thread "main" javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty at java.base/sun.security.ssl.Alerts.getSSLException(Alerts.java:214) at java.base/sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1969) at java.base/sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1921) at java.base/sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1904) at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1436) at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413) at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567) at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185) at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1563) at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1491) at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:236) at org.gradle.wrapper.Download.downloadInternal(Download.java:66) at org.gradle.wrapper.Download.download(Download.java:51) at org.gradle.wrapper.Install$1.call(Install.java:62) at org.gradle.wrapper.Install$1.call(Install.java:48) at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:69) at org.gradle.wrapper.Install.createDist(Install.java:48) at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61) Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty at java.base/sun.security.validator.PKIXValidator.(PKIXValidator.java:89) at java.base/sun.security.validator.Validator.getInstance(Validator.java:181) at java.base/sun.security.ssl.X509TrustManagerImpl.getValidator(X509TrustManagerImpl.java:330) at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrustedInit(X509TrustManagerImpl.java:180) at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:192) at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:133) at java.base/sun.security.ssl.ClientHandshaker.checkServerCerts(ClientHandshaker.java:1825) at java.base/sun.security.ssl.ClientHandshaker.certificateStatus(ClientHandshaker.java:1676) at java.base/sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:272) at java.base/sun.security.ssl.Handshaker.processLoop(Handshaker.java:1086) at java.base/sun.security.ssl.Handshaker.processRecord(Handshaker.java:1020) at java.base/sun.security.ssl.SSLSocketImpl.processInputRecord(SSLSocketImpl.java:1137) at java.base/sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1074) at java.base/sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973) at java.base/sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1402) at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1429) ... 14 more Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty at java.base/java.security.cert.PKIXParameters.setTrustAnchors(PKIXParameters.java:200) at java.base/java.security.cert.PKIXParameters.(PKIXParameters.java:120) at java.base/java.security.cert.PKIXBuilderParameters.(PKIXBuilderParameters.java:104) at java.base/sun.security.validator.PKIXValidator.(PKIXValidator.java:86) ... 29 more ERROR: Job failed: exit code 1

그것은 좋은 것 또한 이것은 gitlab-ci.yml입니다. 감사! :)

+0

[Error - trustAnchors 매개 변수가 비어 있어야 함] 가능한 복제본 (https://stackoverflow.com/questions/6784463/error-trustanchors-parameter-must-be-nonempty) – nullpointer

+0

나는 Docker를 사용하고있다. graddlew 및 java9에 필요한 certs를 제공 할 수있는 Docker 이미지가 있습니까? –

+0

빌드 도구는 ** gradle ** ** – Henry

답변

3

이것은 Docker 이미지의 Debian에서 가져온 버그 일 수 있습니다. 그들은 그것에 대해 생각하고 있습니다 : https://github.com/docker-library/openjdk/issues/145

지금 바로 고치려면 jdk-9-slim 이미지를 사용할 수 있습니다. 그냥 -slim을 추가하십시오.

+0

좋은 잡기. +1. 당신은 당신 자신의 대답을 받아 들일 수 있습니다. – VonC

1

테스트의 경우 docker-library/openjdk에 하나의베이스를 만들 수 있습니다.


ca-certificates-java.postinst configuredocker-library/openjdk issue 19PR 111 때문에이 있어야하는데 볼 수 있지만, "Error - trustAnchors parameter must be non-empty"에 언급 된 다른 접근 방식, 당신은 사용자 정의 이미지를 테스트 할 수 있습니다.

moby/moby issue 18180은 한 번 ca-certificates-java.postinst configure에 영향을 주지만 지금은 확인해야합니다.

+0

이 아니라 certs를 업데이트하기위한 명령을 추가하려고 시도했지만 ** 도움말은 http://paste.ubuntu.com/25737403/입니다. 다른 아이디어? :) –

+0

버그 보고서가 있습니다. https://github.com/docker-library/openjdk/issues/145 도움을 주셔서 감사합니다! :) –

관련 문제