config部署容器无法启动
来源:12-3 部署eureka和config
huiduoduo
2018-07-07
eureka容器启动后,本地config服务能注册,但用rancher改成容器启动报错,不断重启
018/7/7 下午8:57:482018-07-07 12:57:48.159 INFO 1 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)2018/7/7 下午8:57:482018-07-07 12:57:48.209 INFO 1 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]2018/7/7 下午8:57:482018-07-07 12:57:48.210 INFO 1 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.312018/7/7 下午8:57:482018-07-07 12:57:48.227 INFO 1 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/server:/usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64:/usr/lib/jvm/java-1.8-openjdk/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib]2018/7/7 下午8:57:482018-07-07 12:57:48.380 INFO 1 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext2018/7/7 下午8:57:482018-07-07 12:57:48.381 INFO 1 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 4250 ms2018/7/7 下午8:57:482018-07-07 12:57:48.899 WARN 1 --- [ost-startStop-1] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources.2018/7/7 下午8:57:482018-07-07 12:57:48.900 INFO 1 --- [ost-startStop-1] c.n.c.sources.URLConfigurationSource : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.2018/7/7 下午8:57:482018-07-07 12:57:48.943 INFO 1 --- [ost-startStop-1] c.netflix.config.DynamicPropertyFactory : DynamicPropertyFactory is initialized with configuration sources: com.netflix.config.ConcurrentCompositeConfiguration@515417cb2018/7/7 下午8:57:502018-07-07 12:57:50.921 ERROR 1 --- [ost-startStop-1] o.s.b.web.embedded.tomcat.TomcatStarter : Error starting Tomcat context. Exception: org.springframework.beans.factory.BeanCreationException. Message: Error creating bean with name 'servletEndpointRegistrar' defined in class path resource [org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: Factory method 'servletEndpointRegistrar' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthEndpoint' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthEndpoint]: Factory method 'healthEndpoint' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'configServerHealthIndicator' defined in class path resource [org/springframework/cloud/config/server/config/EnvironmentRepositoryConfiguration.class]: Unsatisfied dependency expressed through method 'configServerHealthIndicator' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.cloud.config.server.config.CompositeConfiguration': Unsatisfied dependency expressed through method 'setEnvironmentRepos' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultEnvironmentRepository' defined in class path resource [org/springframework/cloud/config/server/config/DefaultRepositoryConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NullPointerException2018/7/7 下午8:57:502018-07-07 12:57:50.970 INFO 1 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]2018/7/7 下午8:57:502018-07-07 12:57:50.984 WARN 1 --- [ost-startStop-1] o.a.c.loader.WebappClassLoaderBase : The web application [ROOT] appears to have started a thread named [spring.cloud.inetutils] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:2018/7/7 下午8:57:50 sun.misc.Unsafe.park(Native Method)2018/7/7 下午8:57:50 java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)2018/7/7 下午8:57:50 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)2018/7/7 下午8:57:50 java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)2018/7/7 下午8:57:50 java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)2018/7/7 下午8:57:50 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)2018/7/7 下午8:57:50 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)2018/7/7 下午8:57:50 java.lang.Thread.run(Thread.java:745)2018/7/7 下午8:57:512018-07-07 12:57:50.999 WARN 1 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat2018/7/7 下午8:57:512018-07-07 12:57:51.040 INFO 1 --- [ main] ConditionEvaluationReportLoggingListener :2018/7/7 下午8:57:512018/7/7 下午8:57:51Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.2018/7/7 下午8:57:512018-07-07 12:57:51.061 ERROR 1 --- [ main] o.s.boot.SpringApplication : Application run failed2018/7/7 下午8:57:512018/7/7 下午8:57:51org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
4回答
-
这个是你程序都没启动起来,你应该先在本地制作镜像后在本地docker先跑一下如果没问题再放rancher跑,初步定位到你dockerfile指定镜像过程出错,先排查下这个
012018-07-21 -
端碗吹水
2018-09-02
你好,我也遇到了同样的问题,请问是怎么解决的?我在本地运行是正常的,放到docker里就报错
00 -
luomoyj
2018-07-31
这个怎么解决的, 我也遇到这个问题了
012018-07-31 -
wirechen
2018-07-08
这个是你程序都没启动起来,你应该先在本地制作镜像后在本地docker先跑一下如果没问题再放rancher跑,初步定位到你dockerfile指定镜像过程出错,先排查下这个
00
SpringCloud Finchley(M2+RELEASE+SR2)微服务实战
5668 学习 · 2489 问题
相似问题