Spring Cloud Config Server Can't locate PropertySource on startup

岁酱吖の 提交于 2019-11-30 01:58:02

问题


When I start my Spring Cloud Config Server I get the following error.

Could not locate PropertySource: I/O error on GET request for "http://localhost:8888/configserver/default/master":Connection refused; nested exception is java.net.ConnectException: Connection refused

However when I hit that URL in my browser it exists and the config server is working. What is going on?

application.yml

server:
  port: 8888
management:
  context-path: /admin
logging:
  level:
    com.netflix.discovery: 'OFF'
    org.springframework.cloud: 'DEBUG'
spring:
  cloud:
    config:
      server:
        git:
          uri: file:/home/dev/configs     

bootstrap.yml

spring:
  application:
    name: configserver

回答1:


If your config server is not intended to be a config client as well you need to set spring.cloud.config.enabled=false to avoid that log entry (it's harmless though).




回答2:


The eureka.client.serviceUrl.defaultZone and spring.cloud.config.* configuration in the bootstrap yml file



来源:https://stackoverflow.com/questions/28375416/spring-cloud-config-server-cant-locate-propertysource-on-startup

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!