2017-10-06 14 views
0

다음 속성 세트로 스프링 부트 응용 프로그램을 실행하려고하는데 구성 서버에서 구성 서버의 속성을 6 초 동안 대기하도록 계속 시도 할 것으로 예상됩니다 어떤 두 시도 사이에서 그리고 그것 후에도 설정 서버에 연결할 수 없으며, 시작 또는 종료를 재개해야합니다 (재시작 후 봄 부팅이 가능하더라도 무관심). 그러나 예상대로 행동하지 않는 것처럼 보입니다.스프링 클라우드 구성 서버가 가동 될 때까지 스프링 부트 응용 프로그램 시작을 중단합니다.

내 시작 명령 -

java -jar -Dspring.application.name=maas-gateway -Dspring.cloud.config.uri=http://localhost:8888 -Dspring.cloud.config.failFast=false -Dspring.cloud.config.retry.initialInterval=5000 -Dspring.cloud.config.retry.maxInterval=7000 -Dspring.cloud.config.retry.maxAttempts=50 maas-gateway-1.0-SNAPSHOT.jar 

그러나 하나 개의 시도 후 시작을 재개 나는이 오류 다음 얻고있다.

2017-10-06 09:55:05.881 INFO [] 3598 --- [    main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.spring[email protected]53e25b76: startup date [Fri Oct 06 09:55:05 EDT 2017]; root of context hierarchy 
    2017-10-06 09:55:06.136 INFO [] 3598 --- [    main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring 
    2017-10-06 09:55:06.166 INFO [] 3598 --- [    main] trationDelegate$BeanPostProcessorChecker : Bean 'configurationPropertiesRebinderAutoConfiguration' of type [class org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$bbc9d7cf] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 
     __ __    _____  _____  _ 
    | \/ |   /____| /____|  | | 
    | \/| __ _ __ _| (___ ______| | __ __ _| |_ _____  ____ _ _ _ 
    | |\/| |/ _` |/ _` |\___ \______| | |_ |/ _` | __/ _ \ \ /\// _` | | | | 
    | | | | (_| | (_| |____) |  | |__| | (_| | || __/\ V V/(_| | |_| | 
    |_| |_|\__,_|\__,_|_____/  \_____|\__,_|\__\___| \_/\_/ \__,_|\__, | 
                      __/ | 
                     |___/ 
    2017-10-06 09:55:06.494 INFO [] 3598 --- [    main] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at: http://localhost:8888 
    2017-10-06 09:55:06.579 WARN [] 3598 --- [    main] c.c.c.ConfigServicePropertySourceLocator : Could not locate PropertySource: I/O error on GET request for "http://localhost:8888/maas-gateway/default": Connection refused; nested exception is java.net.ConnectException: Connection refused 
    2017-10-06 09:55:06.580 INFO [] 3598 --- [    main] com.solace.maas.Application    : No active profile set, falling back to default profiles: default 
    2017-10-06 09:55:06.601 INFO [] 3598 --- [    main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot[email protected]2ed94a8b: startup date [Fri Oct 06 09:55:06 EDT 2017]; parent: org.spring[email protected]53e25b76 
    2017-10-06 09:55:08.889 INFO [] 3598 --- [    main] o.s.b.f.s.DefaultListableBeanFactory  : Overriding bean definition for bean 'getManagerExecutorService' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=gatewayServiceConfiguration; factoryMethodName=getManagerExecutorService; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/solace/maas/gateway/configuration/GatewayServiceConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=iamServiceConfiguration; factoryMethodName=getManagerExecutorService; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/solace/maas/iam/configuration/IamServiceConfiguration.class]] 
    2017-10-06 09:55:08.890 INFO [] 3598 --- [    main] o.s.b.f.s.DefaultListableBeanFactory  : Overriding bean definition for bean 'getMaasProperties' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=gatewayServiceConfiguration; factoryMethodName=getMaasProperties; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/solace/maas/gateway/configuration/GatewayServiceConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=iamServiceConfiguration; factoryMethodName=getMaasProperties; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/solace/maas/iam/configuration/IamServiceConfiguration.class]] 
    2017-10-06 09:55:08.898 INFO [] 3598 --- [    main] o.s.b.f.s.DefaultListableBeanFactory  : Overriding bean definition for bean 'getManagerExecutorService' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=iamServiceConfiguration; factoryMethodName=getManagerExecutorService; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/solace/maas/iam/configuration/IamServiceConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=signupManagerConfiguration; factoryMethodName=getManagerExecutorService; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/solace/maas/signupManager/configuration/SignupManagerConfiguration.class]] 
    2017-10-06 09:55:09.126 INFO [] 3598 --- [    main] o.s.b.f.s.DefaultListableBeanFactory  : Overriding bean definition for bean 'managementServletContext' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.actuate.autoconfigure.EndpointWebMvcHypermediaManagementContextConfiguration; factoryMethodName=managementServletContext; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/actuate/autoconfigure/EndpointWebMvcHypermediaManagementContextConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfiguration; factoryMethodName=managementServletContext; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/actuate/autoconfigure/EndpointWebMvcAutoConfiguration.class]] 
    2017-10-06 09:55:09.750 WARN [] 3598 --- [    main] o.s.c.a.ConfigurationClassPostProcessor : Cannot enhance @Configuration bean definition 'refreshScope' since its singleton instance has been created too early. The typical cause is a non-static @Bean method with a BeanDefinitionRegistryPostProcessor return type: Consider declaring such methods as 'static'. 
    2017-10-06 09:55:09.992 INFO [] 3598 --- [    main] o.s.cloud.context.scope.GenericScope  : BeanFactory id=27bcc9d7-c3a9-3801-b696-3f3650ee7946 
    2017-10-06 09:55:10.038 INFO [] 3598 --- [    main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring 
    2017-10-06 09:55:10.137 INFO [] 3598 --- [    main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.sleuth.instrument.async.AsyncDefaultAutoConfiguration$DefaultAsyncConfigurerSupport' of type [class org.springframework.cloud.sleuth.instrument.async.AsyncDefaultAutoConfiguration$DefaultAsyncConfigurerSupport$$EnhancerBySpringCGLIB$$dcf17295] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 
    2017-10-06 09:55:10.237 INFO [] 3598 --- [    main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [class org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$9fafd4d2] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 
    2017-10-06 09:55:10.467 INFO [] 3598 --- [    main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration' of type [class org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration$$EnhancerBySpringCGLIB$$385d9d0c] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 
    2017-10-06 09:55:10.486 INFO [] 3598 --- [    main] trationDelegate$BeanPostProcessorChecker : Bean 'objectPostProcessor' of type [class org.springframework.security.config.annotation.configuration.AutowireBeanFactoryObjectPostProcessor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 
    2017-10-06 09:55:10.494 INFO [] 3598 --- [    main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.security.[email protected]736d6a5c' of type [class org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 
    2017-10-06 09:55:10.506 INFO [] 3598 --- [    main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration' of type [class org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration$$EnhancerBySpringCGLIB$$5d323fbe] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 
    2017-10-06 09:55:10.571 INFO [] 3598 --- [    main] trationDelegate$BeanPostProcessorChecker : Bean 'methodSecurityMetadataSource' of type [class org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 
    2017-10-06 09:55:10.606 INFO [] 3598 --- [    main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.netflix.metrics.MetricsInterceptorConfiguration$MetricsRestTemplateConfiguration' of type [class org.springframework.cloud.netflix.metrics.MetricsInterceptorConfiguration$MetricsRestTemplateConfiguration$$EnhancerBySpringCGLIB$$d1dc7b13] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 
    2017-10-06 09:55:10.659 INFO [] 3598 --- [    main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [class org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$bbc9d7cf] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 
    2017-10-06 09:55:11.342 INFO [] 3598 --- [    main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http) 
    2017-10-06 09:55:11.353 INFO [] 3598 --- [    main] o.apache.catalina.core.StandardService : Starting service Tomcat 
    2017-10-06 09:55:11.354 INFO [] 3598 --- [    main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.6 
    2017-10-06 09:55:11.429 INFO [] 3598 --- [ocalhost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]  : Initializing Spring embedded WebApplicationContext 
    2017-10-06 09:55:11.429 INFO [] 3598 --- [ocalhost-startStop-1] o.s.web.context.ContextLoader   : Root WebApplicationContext: initialization completed in 4828 ms 
    2017-10-06 09:55:12.903 ERROR [] 3598 --- [ocalhost-startStop-1] o.s.b.c.embedded.tomcat.TomcatStarter : Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyException. Message: Error creating bean with name 'iamServiceConfiguration': Unsatisfied dependency expressed through method 'setContentNegotationStrategy' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$EnableWebMvcConfiguration': Unsatisfied dependency expressed through method 'setConfigurers' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter': Unsatisfied dependency expressed through constructor parameter 3; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.autoconfigure.web.HttpMessageConvertersAutoConfiguration': Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.autoconfigure.web.HttpMessageConvertersAutoConfiguration$$EnhancerBySpringCGLIB$$3067f332]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jacksonHttpMessageConverter' defined in class path resource [org/springframework/data/rest/webmvc/config/RepositoryRestMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.hateoas.mvc.TypeConstrainedMappingJackson2HttpMessageConverter]: Factory method 'jacksonHttpMessageConverter' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'config' defined in class path resource [org/springframework/data/rest/webmvc/config/RepositoryRestMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.rest.core.config.RepositoryRestConfiguration]: Factory method 'config' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'repositories' defined in class path resource [org/springframework/data/rest/webmvc/config/RepositoryRestMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.repository.support.Repositories]: Factory method 'repositories' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userAttributeDAO': Cannot create inner bean '(inner bean)#60b53b0c' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#60b53b0c': Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Tomcat.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.tomcat.jdbc.pool.DataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Cannot determine embedded database driver class for database type NONE. If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (no profiles are currently active). 
    2017-10-06 09:55:12.932 WARN [] 3598 --- [    main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat 
    2017-10-06 09:55:12.940 ERROR [] 3598 --- [    main] o.s.b.d.LoggingFailureAnalysisReporter : 

*************************** 
APPLICATION FAILED TO START 
*************************** 

설명 :

수 없습니다 데이터베이스 유형 NONE 임베디드 데이터베이스 드라이버 클래스를 결정

액션 :

당신은 임베디드 데이터베이스가에 대한 지원에 1 점을 추가하는 듯 바랍니다하려는 경우 classpath. 특정 프로파일에서로드 할 데이터베이스 설정이있는 경우 활성화해야 할 수도 있습니다 (프로파일이 현재 활성 상태가 아닙니다).

+0

빌드 파일을 표시 할 수 있습니까? – pan

+0

의존 관계로 스프링 재시도 하시겠습니까? – spencergibb

+0

어떤 버전을 사용하고 있습니까? – spencergibb

답변

0

종속성으로 spring-retry을 추가하십시오.