3

I've generated jhipster monolithic application with registry. How can I turn the registry off? I can start application in DEV profile but it crashes in PROD profile with errors:

java.lang.IllegalStateException: Could not locate PropertySource and the fail fast property is set, failing at org.springframework.cloud.config.client.ConfigServicePropertySourceLocator.locate(ConfigServicePropertySourceLocator.java:132) at org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration.initialize(PropertySourceBootstrapConfiguration.java:93) at org.springframework.boot.SpringApplication.applyInitializers(SpringApplication.java:567) at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:338) at org.springframework.boot.SpringApplication.run(SpringApplication.java:301) at com.qitsoftware.arch3d.Arch3DApp.main(Arch3DApp.java:68) Caused by: org.springframework.web.client.ResourceAccessException: I/O error on GET request for "http://localhost:8761/config/Arch3D/prod/master": Connection refused (Connection refused); nested exception is java.net.ConnectException: Connection refused (Connection refused) at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:666) at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:613)at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:531) at org.springframework.cloud.config.client.ConfigServicePropertySourceLocator.getRemoteEnvironment(ConfigServicePropertySourceLocator.java:172) at org.springframework.cloud.config.client.ConfigServicePropertySourceLocator.locate(ConfigServicePropertySourceLocator.java:93) ... 5 common frames omitted

John Salazar
  • 373
  • 1
  • 5
  • 13
  • If you want to get completely rid of registry, you could re-generate your app without it by editing .yo-rc.json, re-generating and merging changes into your git repo. Otherwise you may try https://stackoverflow.com/questions/35142105/eureka-discovery-client-selective-disable – Gaël Marziou Aug 16 '17 at 17:36

1 Answers1

7

Found a solution by disabling cloud discovery and setting fail-fast to false in bootstrap-prod.yml

spring:
    cloud:
        discovery:
            enabled: false
        config:
            fail-fast: false
John Salazar
  • 373
  • 1
  • 5
  • 13