Spring Cloud Config Server Can't locate PropertySource on startup

Brian Abston picture Brian Abston · Feb 6, 2015 · Viewed 40.3k times · Source

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

Answer

Dave Syer picture Dave Syer · Feb 7, 2015

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).