启动时服务中的NoClassDefFoundError。 jce_policy-8.zip是安全的罪魁祸首吗?

问题描述 投票:1回答:1

我有一个使用JDK 8在docker容器中运行的Spring Boot应用程序。我有一个Maven目标,它构建了docker容器,它在构建映像之前从Oracle的网站上下载了jce_policy-8.zip。几周前,当试图下载jce_policy-8.zip时,构建突然破了。我什么都没改变,突然间它停止了工作。

我更改了将zip文件下载到wget而不是curl的命令,然后成功构建了图像,但是在服务启动时我遇到了异常。在jce_policy-8.zip中有什么变化破坏了我的构建吗?

这是构建映像的Dockerfile:

FROM openjdk:8-jdk-alpine
RUN  apk update && apk upgrade && apk add netcat-openbsd && apk add curl
RUN mkdir -p /usr/local/configserver
RUN cd /tmp/ && \
     curl -k -LO "http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip" -H 'Cookie: oraclelicense=accept-securebackup-cookie' && \
    unzip jce_policy-8.zip && \
    rm jce_policy-8.zip && \
    yes |cp -v /tmp/UnlimitedJCEPolicyJDK8/*.jar /usr/lib/jvm/java-1.8-openjdk/jre/lib/security/
ADD @[email protected] /usr/local/configserver/
ADD run.sh run.sh
RUN chmod +x run.sh
CMD ./run.sh

这是我正在启动的例外:

2019-03-25 19:16:49.971 ERROR 21 --- [nio-8888-exec-6] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class sun.security.ssl.SSLSessionImpl] with root cause   

我很困惑为什么一切都在2周前工作,但突然停止工作,没有我改变代码。

这是日志中可能有助于查明问题的另一行:

java.lang.NoClassDefFoundError: Could not initialize class sun.security.ssl.SSLSessionImpl

实际上,这是整个堆栈跟踪:

th path [] threw exception [Handler dispatch failed; nested exception is java.lang.ExceptionInInitializerError] with root cause
configserver_1         | 
configserver_1         | java.io.FileNotFoundException: /usr/lib/libnss3.so
configserver_1         |    at sun.security.pkcs11.Secmod.initialize(Secmod.java:193) ~[sunpkcs11.jar:1.8.0_191]
configserver_1         |    at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:218) ~[sunpkcs11.jar:1.8.0_191]
configserver_1         |    at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:103) ~[sunpkcs11.jar:1.8.0_191]
configserver_1         |    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_191]
configserver_1         |    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_191]
configserver_1         |    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_191]
configserver_1         |    at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_191]
configserver_1         |    at sun.security.jca.ProviderConfig$2.run(ProviderConfig.java:224) ~[na:1.8.0_191]
configserver_1         |    at sun.security.jca.ProviderConfig$2.run(ProviderConfig.java:206) ~[na:1.8.0_191]
configserver_1         |    at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_191]
configserver_1         |    at sun.security.jca.ProviderConfig.doLoadProvider(ProviderConfig.java:206) ~[na:1.8.0_191]
configserver_1         |    at sun.security.jca.ProviderConfig.getProvider(ProviderConfig.java:187) ~[na:1.8.0_191]
configserver_1         |    at sun.security.jca.ProviderList.getProvider(ProviderList.java:233) ~[na:1.8.0_191]
configserver_1         |    at sun.security.jca.ProviderList.getIndex(ProviderList.java:263) ~[na:1.8.0_191]
configserver_1         |    at sun.security.jca.ProviderList.getProviderConfig(ProviderList.java:247) ~[na:1.8.0_191]
configserver_1         |    at sun.security.jca.ProviderList.getProvider(ProviderList.java:253) ~[na:1.8.0_191]
configserver_1         |    at java.security.Security.getProvider(Security.java:503) ~[na:1.8.0_191]
configserver_1         |    at sun.security.ssl.SignatureAndHashAlgorithm.<clinit>(SignatureAndHashAlgorithm.java:415) ~[na:1.8.0_191]
configserver_1         |    at sun.security.ssl.SSLSessionImpl.<init>(SSLSessionImpl.java:188) ~[na:1.8.0_191]
configserver_1         |    at sun.security.ssl.SSLSessionImpl.<init>(SSLSessionImpl.java:152) ~[na:1.8.0_191]
configserver_1         |    at sun.security.ssl.SSLSessionImpl.<clinit>(SSLSessionImpl.java:79) ~[na:1.8.0_191]
configserver_1         |    at sun.security.ssl.SSLSocketImpl.init(SSLSocketImpl.java:598) ~[na:1.8.0_191]
configserver_1         |    at sun.security.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:536) ~[na:1.8.0_191]
configserver_1         |    at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:72) ~[na:1.8.0_191]
configserver_1         |    at sun.net.www.protocol.https.HttpsClient.createSocket(HttpsClient.java:405) ~[na:1.8.0_191]
configserver_1         |    at sun.net.NetworkClient.doConnect(NetworkClient.java:162) ~[na:1.8.0_191]
configserver_1         |    at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) ~[na:1.8.0_191]
configserver_1         |    at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) ~[na:1.8.0_191]
configserver_1         |    at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264) ~[na:1.8.0_191]
configserver_1         |    at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367) ~[na:1.8.0_191]
configserver_1         |    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191) ~[na:1.8.0_191]
configserver_1         |    at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1199) ~[na:1.8.0_191]
configserver_1         |    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1050) ~[na:1.8.0_191]
configserver_1         |    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177) ~[na:1.8.0_191]
configserver_1         |    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1564) ~[na:1.8.0_191]
configserver_1         |    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492) ~[na:1.8.0_191]
configserver_1         |    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480) ~[na:1.8.0_191]
configserver_1         |    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:347) ~[na:1.8.0_191]
configserver_1         |    at org.eclipse.jgit.transport.http.JDKHttpConnection.getResponseCode(JDKHttpConnection.java:98) ~[org.eclipse.jgit-3.5.3.201412180710-r.jar!/:3.5.3.201412180710-r]
configserver_1         |    at org.eclipse.jgit.util.HttpSupport.response(HttpSupport.java:168) ~[org.eclipse.jgit-3.5.3.201412180710-r.jar!/:3.5.3.201412180710-r]
configserver_1         |    at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:475) ~[org.eclipse.jgit-3.5.3.201412180710-r.jar!/:3.5.3.201412180710-r]
configserver_1         |    at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:309) ~[org.eclipse.jgit-3.5.3.201412180710-r.jar!/:3.5.3.201412180710-r]
configserver_1         |    at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:136) ~[org.eclipse.jgit-3.5.3.201412180710-r.jar!/:3.5.3.201412180710-r]
configserver_1         |    at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122) ~[org.eclipse.jgit-3.5.3.201412180710-r.jar!/:3.5.3.201412180710-r]
configserver_1         |    at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1115) ~[org.eclipse.jgit-3.5.3.201412180710-r.jar!/:3.5.3.201412180710-r]
configserver_1         |    at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:130) ~[org.eclipse.jgit-3.5.3.201412180710-r.jar!/:3.5.3.201412180710-r]
configserver_1         |    at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:178) ~[org.eclipse.jgit-3.5.3.201412180710-r.jar!/:3.5.3.201412180710-r]
configserver_1         |    at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:125) ~[org.eclipse.jgit-3.5.3.201412180710-r.jar!/:3.5.3.201412180710-r]
configserver_1         |    at org.springframework.cloud.config.server.environment.JGitEnvironmentRepository.cloneToBasedir(JGitEnvironmentRepository.java:391) ~[spring-cloud-config-server-1.2.2.RELEASE.jar!/:1.2.2.RELEASE]
configserver_1         |    at org.springframework.cloud.config.server.environment.JGitEnvironmentRepository.copyRepository(JGitEnvironmentRepository.java:364) ~[spring-cloud-config-server-1.2.2.RELEASE.jar!/:1.2.2.RELEASE]
configserver_1         |    at org.springframework.cloud.config.server.environment.JGitEnvironmentRepository.createGitClient(JGitEnvironmentRepository.java:349) ~[spring-cloud-config-server-1.2.2.RELEASE.jar!/:1.2.2.RELEASE]
configserver_1         |    at org.springframework.cloud.config.server.environment.JGitEnvironmentRepository.refresh(JGitEnvironmentRepository.java:165) ~[spring-cloud-config-server-1.2.2.RELEASE.jar!/:1.2.2.RELEASE]
configserver_1         |    at org.springframework.cloud.config.server.environment.JGitEnvironmentRepository.getLocations(JGitEnvironmentRepository.java:144) ~[spring-cloud-config-server-1.2.2.RELEASE.jar!/:1.2.2.RELEASE]
configserver_1         |    at org.springframework.cloud.config.server.environment.MultipleJGitEnvironmentRepository.getLocations(MultipleJGitEnvironmentRepository.java:116) ~[spring-cloud-config-server-1.2.2.RELEASE.jar!/:1.2.2.RELEASE]
configserver_1         |    at org.springframework.cloud.config.server.environment.AbstractScmEnvironmentRepository.findOne(AbstractScmEnvironmentRepository.java:40) ~[spring-cloud-config-server-1.2.2.RELEASE.jar!/:1.2.2.RELEASE]
configserver_1         |    at org.springframework.cloud.config.server.environment.MultipleJGitEnvironmentRepository.findOne(MultipleJGitEnvironmentRepository.java:154) ~[spring-cloud-config-server-1.2.2.RELEASE.jar!/:1.2.2.RELEASE]
configserver_1         |    at org.springframework.cloud.config.server.environment.EnvironmentEncryptorEnvironmentRepository.findOne(EnvironmentEncryptorEnvironmentRepository.java:53) ~[spring-cloud-config-server-1.2.2.RELEASE.jar!/:1.2.2.RELEASE]
configserver_1         |    at org.springframework.cloud.config.server.environment.EnvironmentController.labelled(EnvironmentController.java:112) ~[spring-cloud-config-server-1.2.2.RELEASE.jar!/:1.2.2.RELEASE]
configserver_1         |    at org.springframework.cloud.config.server.environment.EnvironmentController.defaultLabel(EnvironmentController.java:101) ~[spring-cloud-config-server-1.2.2.RELEASE.jar!/:1.2.2.RELEASE]
configserver_1         |    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_191]
configserver_1         |    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_191]
configserver_1         |    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_191]
configserver_1         |    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_191]
configserver_1         |    at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) ~[spring-web-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
configserver_1         |    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133) ~[spring-web-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
configserver_1         |    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:116) ~[spring-webmvc-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
configserver_1         |    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827) ~[spring-webmvc-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
configserver_1         |    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738) ~[spring-webmvc-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
configserver_1         |    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) ~[spring-webmvc-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
configserver_1         |    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963) ~[spring-webmvc-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
configserver_1         |    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897) ~[spring-webmvc-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
configserver_1         |    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) ~[spring-webmvc-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
configserver_1         |    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861) ~[spring-webmvc-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
configserver_1         |    at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) ~[tomcat-embed-core-8.5.11.jar!/:8.5.11]
configserver_1         |    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) ~[spring-webmvc-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
configserver_1         |    at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) ~[tomcat-embed-core-8.5.11.jar!/:8.5.11]
configserver_1         |    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) ~[tomcat-embed-core-8.5.11.jar!/:8.5.11]
configserver_1         |    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[tomcat-embed-core-8.5.11.jar!/:8.5.11]
configserver_1         |    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) ~[tomcat-embed-websocket-8.5.11.jar!/:8.5.11]
configserver_1         |    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) ~[tomcat-embed-core-8.5.11.jar!/:8.5.11]
configserver_1         |    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[tomcat-embed-core-8.5.11.jar!/:8.5.11]
configserver_1         |    at org.springframework.boot.web.filter.ApplicationContextHeaderFilter.doFilterInternal(ApplicationContextHeaderFilter.java:55) ~[spring-boot-1.4.4.RELEASE.jar!/:1.4.4.RELEASE]
configserver_1         |    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
configserver_1         |    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) ~[tomcat-embed-core-8.5.11.jar!/:8.5.11]
configserver_1         |    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[tomcat-embed-core-8.5.11.jar!/:8.5.11]
configserver_1         |    at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:105) ~[spring-boot-actuator-1.4.4.RELEASE.jar!/:1.4.4.RELEASE]
configserver_1         |    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
configserver_1         |    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) ~[tomcat-embed-core-8.5.11.jar!/:8.5.11]
configserver_1         |    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[tomcat-embed-core-8.5.11.jar!/:8.5.11]
configserver_1         |    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) ~[spring-web-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
configserver_1         |    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
configserver_1         |    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) ~[tomcat-embed-core-8.5.11.jar!/:8.5.11]
configserver_1         |    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[tomcat-embed-core-8.5.11.jar!/:8.5.11]
configserver_1         |    at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105) ~[spring-web-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
configserver_1         |    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
configserver_1         |    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) ~[tomcat-embed-core-8.5.11.jar!/:8.5.11]
configserver_1         |    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[tomcat-embed-core-8.5.11.jar!/:8.5.11]
configserver_1         |    at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81) ~[spring-web-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
configserver_1         |    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
configserver_1         |    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) ~[tomcat-embed-core-8.5.11.jar!/:8.5.11]
configserver_1         |    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[tomcat-embed-core-8.5.11.jar!/:8.5.11]
configserver_1         |    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) ~[spring-web-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
configserver_1         |    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
configserver_1         |    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) ~[tomcat-embed-core-8.5.11.jar!/:8.5.11]
configserver_1         |    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[tomcat-embed-core-8.5.11.jar!/:8.5.11]
configserver_1         |    at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:106) ~[spring-boot-actuator-1.4.4.RELEASE.jar!/:1.4.4.RELEASE]
configserver_1         |    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
configserver_1         |    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) ~[tomcat-embed-core-8.5.11.jar!/:8.5.11]
configserver_1         |    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[tomcat-embed-core-8.5.11.jar!/:8.5.11]
configserver_1         |    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) ~[tomcat-embed-core-8.5.11.jar!/:8.5.11]
configserver_1         |    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat-embed-core-8.5.11.jar!/:8.5.11]
configserver_1         |    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:474) [tomcat-embed-core-8.5.11.jar!/:8.5.11]
configserver_1         |    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [tomcat-embed-core-8.5.11.jar!/:8.5.11]
configserver_1         |    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-embed-core-8.5.11.jar!/:8.5.11]
configserver_1         |    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [tomcat-embed-core-8.5.11.jar!/:8.5.11]
configserver_1         |    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349) [tomcat-embed-core-8.5.11.jar!/:8.5.11]
configserver_1         |    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783) [tomcat-embed-core-8.5.11.jar!/:8.5.11]
configserver_1         |    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-8.5.11.jar!/:8.5.11]
configserver_1         |    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798) [tomcat-embed-core-8.5.11.jar!/:8.5.11]
configserver_1         |    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1434) [tomcat-embed-core-8.5.11.jar!/:8.5.11]
configserver_1         |    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-8.5.11.jar!/:8.5.11]
configserver_1         |    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_191]
configserver_1         |    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_191]
configserver_1         |    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.5.11.jar!/:8.5.11]
configserver_1         |    at java.lang.Thread.run(Thread.java:748) [na:1.8.0_191]
configserver_1         | 
configserver_1         | 2019-03-26 13:48:32.540 ERROR 22 --- [nio-8888-exec-6] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class sun.security.ssl.SSLSessionImpl] with root cause
configserver_1         | 
configserver_1         | java.lang.NoClassDefFoundError: Could not initialize class sun.security.ssl.SSLSessionImpl
configserver_1         |    at sun.security.ssl.SSLSocketImpl.init(SSLSocketImpl.java:598) ~[na:1.8.0_191]
configserver_1         |    at sun.security.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:536) ~[na:1.8.0_191]
configserver_1         |    at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:72) ~[na:1.8.0_191]
configserver_1         |    at sun.net.www.protocol.https.HttpsClient.createSocket(HttpsClient.java:405) ~[na:1.8.0_191]
configserver_1         |    at sun.net.NetworkClient.doConnect(NetworkClient.java:162) ~[na:1.8.0_191]
configserver_1         |    at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) ~[na:1.8.0_191]
configserver_1         |    at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) ~[na:1.8.0_191]
configserver_1         |    at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264) ~[na:1.8.0_191]
configserver_1         |    at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367) ~[na:1.8.0_191]
configserver_1         |    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191) ~[na:1.8.0_191]
configserver_1         |    at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1199) ~[na:1.8.0_191]
configserver_1         |    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1050) ~[na:1.8.0_191]
configserver_1         |    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177) ~[na:1.8.0_191]
configserver_1         |    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1564) ~[na:1.8.0_191]
configserver_1         |    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492) ~[na:1.8.0_191]
configserver_1         |    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480) ~[na:1.8.0_191]
configserver_1         |    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:347) ~[na:1.8.0_191]
configserver_1         |    at org.eclipse.jgit.transport.http.JDKHttpConnection.getResponseCode(JDKHttpConnection.java:98) ~[org.eclipse.jgit-3.5.3.201412180710-r.jar!/:3.5.3.201412180710-r]
configserver_1         |    at org.eclipse.jgit.util.HttpSupport.response(HttpSupport.java:168) ~[org.eclipse.jgit-3.5.3.201412180710-r.jar!/:3.5.3.201412180710-r]
configserver_1         |    at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:475) ~[org.eclipse.jgit-3.5.3.201412180710-r.jar!/:3.5.3.201412180710-r]
configserver_1         |    at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:309) ~[org.eclipse.jgit-3.5.3.201412180710-r.jar!/:3.5.3.201412180710-r]
configserver_1         |    at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:136) ~[org.eclipse.jgit-3.5.3.201412180710-r.jar!/:3.5.3.201412180710-r]
configserver_1         |    at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122) ~[org.eclipse.jgit-3.5.3.201412180710-r.jar!/:3.5.3.201412180710-r]
configserver_1         |    at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1115) ~[org.eclipse.jgit-3.5.3.201412180710-r.jar!/:3.5.3.201412180710-r]
configserver_1         |    at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:130) ~[org.eclipse.jgit-3.5.3.201412180710-r.jar!/:3.5.3.201412180710-r]
configserver_1         |    at org.springframework.cloud.config.server.environment.JGitEnvironmentRepository.fetch(JGitEnvironmentRepository.java:294) ~[spring-cloud-config-server-1.2.2.RELEASE.jar!/:1.2.2.RELEASE]
configserver_1         |    at org.springframework.cloud.config.server.environment.JGitEnvironmentRepository.refresh(JGitEnvironmentRepository.java:167) ~[spring-cloud-config-server-1.2.2.RELEASE.jar!/:1.2.2.RELEASE]
configserver_1         |    at org.springframework.cloud.config.server.environment.JGitEnvironmentRepository.getLocations(JGitEnvironmentRepository.java:144) ~[spring-cloud-config-server-1.2.2.RELEASE.jar!/:1.2.2.RELEASE]
configserver_1         |    at org.springframework.cloud.config.server.environment.MultipleJGitEnvironmentRepository.getLocations(MultipleJGitEnvironmentRepository.java:116) ~[spring-cloud-config-server-1.2.2.RELEASE.jar!/:1.2.2.RELEASE]
configserver_1         |    at org.springframework.cloud.config.server.environment.AbstractScmEnvironmentRepository.findOne(AbstractScmEnvironmentRepository.java:40) ~[spring-cloud-config-server-1.2.2.RELEASE.jar!/:1.2.2.RELEASE]
configserver_1         |    at org.springframework.cloud.config.server.environment.MultipleJGitEnvironmentRepository.findOne(MultipleJGitEnvironmentRepository.java:154) ~[spring-cloud-config-server-1.2.2.RELEASE.jar!/:1.2.2.RELEASE]
configserver_1         |    at org.springframework.cloud.config.server.environment.EnvironmentEncryptorEnvironmentRepository.findOne(EnvironmentEncryptorEnvironmentRepository.java:53) ~[spring-cloud-config-server-1.2.2.RELEASE.jar!/:1.2.2.RELEASE]
configserver_1         |    at org.springframework.cloud.config.server.environment.EnvironmentController.labelled(EnvironmentController.java:112) ~[spring-cloud-config-server-1.2.2.RELEASE.jar!/:1.2.2.RELEASE]
configserver_1         |    at org.springframework.cloud.config.server.environment.EnvironmentController.defaultLabel(EnvironmentController.java:101) ~[spring-cloud-config-server-1.2.2.RELEASE.jar!/:1.2.2.RELEASE]
configserver_1         |    at 
java maven docker docker-compose alpine
1个回答
2
投票

我找到了问题的解决方案!由于某种原因,图像中缺少一个文件:java.io.FileNotFoundException: /usr/lib/libnss3.so

我用了这个命令:RUN apk add --no-cache nss突然一切都运转了。不太清楚为什么。希望这有助于某人。

© www.soinside.com 2019 - 2024. All rights reserved.