2018-08-02 21:47:49.142  INFO 1484 --- [           main] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at: http://DESKTOP-0UCFSUM:8888/
2018-08-02 21:47:49.247  WARN 1484 --- [           main] c.c.c.ConfigServicePropertySourceLocator : Could not locate PropertySource: 401 Unauthorized
2018-08-02 21:47:49.252  INFO 1484 --- [           main] c.g.lis.service.LisServiceApplication    : No active profile set, falling back to default profiles: default
2018-08-02 21:47:49.288  INFO 1484 --- [           main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@3ad6a6d7: startup date [Thu Aug 02 21:47:49 CST 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@12df38ea
2018-08-02 21:47:51.613  INFO 1484 --- [           main] o.s.i.config.IntegrationRegistrar        : No bean named 'integrationHeaderChannelRegistry' has been explicitly defined. Therefore, a default DefaultHeaderChannelRegistry will be created.
2018-08-02 21:47:51.851 ERROR 1484 --- [           main] o.s.boot.SpringApplication               : Application startup failedjava.lang.IllegalStateException: Error processing condition on org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfiguration$EndpointWebMvcConfiguration
at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:64)
at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:102)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader$TrackedConditionEvaluator.shouldSkip(ConfigurationClassBeanDefinitionReader.java:436)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader$TrackedConditionEvaluator.shouldSkip(ConfigurationClassBeanDefinitionReader.java:425)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:127)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:116)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:320)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:228)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:270)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:93)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:686)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:524)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:314)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1162)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1151)
at com.guobao.lis.service.LisServiceApplication.main(LisServiceApplication.java:15)
Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'usp.server.port' in value "${usp.server.port}"
at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:174)
at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:126)
at org.springframework.core.env.AbstractPropertyResolver.doResolvePlaceholders(AbstractPropertyResolver.java:236)
at org.springframework.core.env.AbstractPropertyResolver.resolveRequiredPlaceholders(AbstractPropertyResolver.java:210)
at org.springframework.core.env.AbstractPropertyResolver.resolveNestedPlaceholders(AbstractPropertyResolver.java:227)
at org.springframework.core.env.PropertySourcesPropertyResolver.getProperty(PropertySourcesPropertyResolver.java:83)
at org.springframework.core.env.PropertySourcesPropertyResolver.getProperty(PropertySourcesPropertyResolver.java:66)
at org.springframework.core.env.AbstractEnvironment.getProperty(AbstractEnvironment.java:540)
at org.springframework.boot.bind.RelaxedPropertyResolver.getProperty(RelaxedPropertyResolver.java:84)
at org.springframework.boot.bind.RelaxedPropertyResolver.getProperty(RelaxedPropertyResolver.java:74)
at org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfiguration$ManagementServerPort.getPortProperty(EndpointWebMvcAutoConfiguration.java:409)
at org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfiguration$ManagementServerPort.get(EndpointWebMvcAutoConfiguration.java:361)
at org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfiguration$OnManagementMvcCondition.getMatchOutcome(EndpointWebMvcAutoConfiguration.java:345)
at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:47)
... 18 common frames omitted2018-08-02 21:47:51.854  INFO 1484 --- [           main] ationConfigEmbeddedWebApplicationContext : Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@3ad6a6d7: startup date [Thu Aug 02 21:47:49 CST 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@12df38ea
2018-08-02 21:47:51.857  INFO 1484 --- [           main] c.n.e.EurekaDiscoveryClientConfiguration : Unregistering application bootstrap with eureka with status DOWN
2018-08-02 21:47:51.858  INFO 1484 --- [           main] com.netflix.discovery.DiscoveryClient    : Shutting down DiscoveryClient ...
2018-08-02 21:47:51.873  INFO 1484 --- [           main] com.netflix.discovery.DiscoveryClient    : Completed shut down of DiscoveryClient
2018-08-02 21:47:51.874  WARN 1484 --- [           main] ationConfigEmbeddedWebApplicationContext : Exception thrown from LifecycleProcessor on context closejava.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@3ad6a6d7: startup date [Thu Aug 02 21:47:49 CST 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@12df38ea
at org.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.java:417)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1002)
at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:961)
at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:794)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:325)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1162)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1151)
at com.guobao.lis.service.LisServiceApplication.main(LisServiceApplication.java:15)2018-08-02 21:47:51.875 ERROR 1484 --- [           main] o.s.b.f.s.DefaultListableBeanFactory     : Destroy method on bean with name 'org.springframework.boot.autoconfigure.internalCachingMetadataReaderFactory' threw an exceptionjava.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@3ad6a6d7: startup date [Thu Aug 02 21:47:49 CST 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@12df38ea
at org.springframework.context.support.AbstractApplicationContext.getApplicationEventMulticaster(AbstractApplicationContext.java:404)
at org.springframework.context.support.ApplicationListenerDetector.postProcessBeforeDestruction(ApplicationListenerDetector.java:97)
at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:253)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:578)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:554)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:961)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:523)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons(DefaultListableBeanFactory.java:968)
at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1033)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1009)
at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:961)
at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:794)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:325)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1162)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1151)
at com.guobao.lis.service.LisServiceApplication.main(LisServic

解决方案 »

  1.   

    config服务是启动起来了的。配置内容 :
    server.port=8888
    #\u6ce8\u518c\u4e2d\u5fc3\u9274\u6743
    security.user.name=****
    security.user.password=****
    #\u6ce8\u518c\u4e2d\u5fc3\u9274\u6743
    eureka.server.username=****
    eureka.server.password=****logging.config=classpath:logback.xml
    logging.path=/home/log/config
    management.security.enabled=false
    info.app.name="@project.name@"
    info.app.description="@project.description@" 
    info.app.version="@project.version@"
    info.app.spring-boot-version="@project.parent.version@"#LOCAL
    eureka.client.serviceUrl.defaultZone=http://${security.user.name}:${security.user.password}@localhost:8889/eureka/
    spring.cloud.config.server.git.uri=https://github.com/****
    spring.cloud.config.server.git.searchPaths=config-repo
    spring.cloud.config.git.default-label=master
    spring.cloud.config.label=master
    spring.cloud.config.server.git.username=*****
    spring.cloud.config.server.git.password=*****
      

  2.   

    Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'usp.server.port' in value "${usp.server.port}"
    你检查下代码,哪里有用这个变量不,他找不到这个变量对应的值
      

  3.   

    这个是从github上面的配置文件读取的,我猜测是spring-cloud-config哪里出了问题,导致读取github上面的配置文件没有读取成功,但是不知道具体哪儿有问题。
      

  4.   

    接个光,我这也有个springcloud问题,给看看呗
    启动正常,怀疑跟用的jar版本有关,但换了几个版本还这样
    现在引用的jar版本
    spring-boot-starter-test  2.0.3.RELEASE
    spring-cloud-starter-netflix-eureka-server Finchley.RELEASE(2.0.3.RELEASE)报错信息2018-08-07 17:23:50.202 ERROR 4932 --- [nio-8761-exec-4] freeer.runtime                       : Error executing FreeMarker templatefreeer.core.InvalidReferenceException: The following has evaluated to null or missing:
    ==> replica.key  [in template "eureka/navbar.ftl" at line 68, column 62]----
    Tip: It's the step after the last dot that caused this error, not those before it.
    ----
    Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
    --------
    FTL stack trace ("~" means nesting-related):
    - Failed at: ${replica.key}  [in template "eureka/navbar.ftl" at line 68, column 60]
    - Reached through: #include "navbar.ftl"  [in template "eureka/status.ftl" at line 22, column 7]
    ----
    at freeer.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:134) ~[freeer-2.3.28.jar:2.3.28]
    at freeer.core.EvalUtil.coerceModelToTextualCommon(EvalUtil.java:467) ~[freeer-2.3.28.jar:2.3.28]
    at freeer.core.EvalUtil.coerceModelToStringOrMarkup(EvalUtil.java:389) ~[freeer-2.3.28.jar:2.3.28]
    at freeer.core.EvalUtil.coerceModelToStringOrMarkup(EvalUtil.java:358) ~[freeer-2.3.28.jar:2.3.28]
    at freeer.core.DollarVariable.calculateInterpolatedStringOrMarkup(DollarVariable.java:100) ~[freeer-2.3.28.jar:2.3.28]
    at freeer.core.DollarVariable.accept(DollarVariable.java:63) ~[freeer-2.3.28.jar:2.3.28]
    at freeer.core.Environment.visit(Environment.java:366) [freeer-2.3.28.jar:2.3.28]
    at freeer.core.IteratorBlock$IterationContext.executedNestedContentForCollOrSeqListing(IteratorBlock.java:317) [freeer-2.3.28.jar:2.3.28]
    at freeer.core.IteratorBlock$IterationContext.executeNestedContent(IteratorBlock.java:271) [freeer-2.3.28.jar:2.3.28]
    at freeer.core.IteratorBlock$IterationContext.accept(IteratorBlock.java:242) [freeer-2.3.28.jar:2.3.28]
    at freeer.core.Environment.visitIteratorBlock(Environment.java:642) [freeer-2.3.28.jar:2.3.28]
    at freeer.core.IteratorBlock.acceptWithResult(IteratorBlock.java:107) [freeer-2.3.28.jar:2.3.28]
    at freeer.core.IteratorBlock.accept(IteratorBlock.java:93) [freeer-2.3.28.jar:2.3.28]