Questions tagged [spring-cloud-consul]

Spring Cloud Consul provides Consul integrations for Spring Boot apps through autoconfiguration and binding to the Spring Environment and other Spring programming model idioms.

Spring Cloud Consul features:

  • Service Discovery: instances can be registered with the Consul agent and clients can discover the instances using Spring-managed beans
  • Supports Ribbon, the client side load-balancer via Spring Cloud Netflix
  • Supports Zuul, a dynamic router and filter via Spring Cloud Netflix
  • Distributed Configuration: using the Consul Key/Value store
  • Control Bus: Distributed control events using Consul Events

https://cloud.spring.io/spring-cloud-consul/

154 questions
10
votes
1 answer

Why is the SSL connection between a Spring Boot app and Consul failing after a few minutes?

I'm in the process of upgrading an environment with new versions of Ubuntu, Consul and Spring Boot. At first glance, everything seems to be working just fine. The app connects to Consul, requests its configuration and boots up. After a few minutes…
jhkuperus
  • 1,439
  • 11
  • 15
10
votes
1 answer

Remove dead services from Consul

We have a number of Spring Boot applications that register themselves with Consul (via Spring Cloud Consul). If I stop those applications via docker-compose stop myservice then they de-register themselves correctly and disappear from Consul. If I…
nickcodefresh
  • 887
  • 2
  • 10
  • 25
6
votes
2 answers

Eureka and Consul

I am implementing a service discovery and I evaluating two options: Eureka and Consul. Help me decide! I am leaning towards Eureka, but I need to clear a main tech problem. My infrastructure is based on openshift. I can have multiple containers…
6
votes
1 answer

Can "spring.cloud.consul.host" config value have multiple Consul agents?

I'm a bit confused with this configuration. My Spring Boot app with @EnableDiscoveryClient has spring.cloud.consul.host set to localhost. I'm running a Consul Agent on the host where my Boot app is running, but I've a few questions (can't seem to…
Srikanth
  • 11,780
  • 23
  • 72
  • 92
5
votes
5 answers

@RefreshScope stops @Scheduled task

I have a monitoring app wherein I am running a fixedRate task. This is pulling in a config parameter configured with Consul. I want to pull in updated configuration, so I added @RefreshScope. But as soon as I update the config value on Consul, the…
ZCode
  • 560
  • 2
  • 6
  • 11
5
votes
1 answer

Not able to read configuration from Consul in spring-boot application

I am creating a Spring Boot application, which will read configuration like DB properties from Consul. But I am not able to read the key value from Consul using my application. Following is, what I am trying to do. **pom.xml**
5
votes
1 answer

Spring boot Get properties from consul server

I have a spring boot application and I would like to get properties that I have on a consul agent. @EnableDiscoveryClient @SpringBootApplication(scanBasePackages={"com.commons"}) public class MainAppProxy implements CommandLineRunner { …
The Strong Programmer
  • 627
  • 2
  • 10
  • 29
4
votes
2 answers

Spring Cloud Consul health check and status configuration on GCP

We are trying to register a spring-cloud-consul application with consul on GCP compute engine, where it is able to register the application with the consul, but there are two problems we are facing with the application. Below is bootstrap.yaml and…
4
votes
0 answers

@RefreshScope not working. Properties are not updated after being modified the second time in Consul

I am working with Consul using spring-cloud-consul and currently have this problem. I create a key in consul as config/ConsulServer/my/username with value as "bob". In my controller, i return this value if a API call "/foo" is made. When i modified…
Steven
  • 415
  • 1
  • 4
  • 12
4
votes
1 answer

Unable to get logback-spring.xml property file using Spring Cloud Config and Discovery

I'm using Discovery first bootstrap feature and Consul as a Discovery Server, url to Config Server is located during start-up and I was able to get application.properties. I need also to get logback-spring.xml configuration from Config server and I…
4
votes
0 answers

How do I configure Spring Cloud Consul to not de-register on shutdown

I have a microservice which is automatically registered with Consul using Spring Cloud however when the service shuts down it's de-registered which means alerting we have configured using Prometheus fires once and then auto-resolves. How can I…
Jon Freedman
  • 9,469
  • 4
  • 39
  • 58
4
votes
4 answers

The /health endpoint of my Spring Boot app is emitting all info about the Consul server running on the same machine. How to disable this?

I've the /health endpoint enabled, but I just don't want it to list all services monitored by Consul on the same machine. This is my application.properties: # Enable just the health endpoint. endpoints.health.enabled=true # Disable all default…
3
votes
2 answers

Consul share network from docker

There is consul server in docker. vote-consul-server: image: consul:1.7.2 environment: CONSUL_BIND_INTERFACE: eth0 ports: - "${CONSUL_PORT}:8500" It generates hosts for registred applications. The main problem is that…
3
votes
2 answers

Start Consul as windows service

I'm trying to run consul on windows, my steps: Download consul.exe Install nssm like 2.1.iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')) 2.2.choco install -y nssm Create config file for consul: { …
Kadzhaev Marat
  • 1,278
  • 1
  • 19
  • 33
3
votes
0 answers

Unable to discover SpringBoot 2.1.1 with Consul (SpringCloud Finchley)

I am trying to register a sample SpringBoot service to consul with the help of SpringCloud, but without success when using latest versions. Versions with success : SpringBoot : 2.0.0.RELEASE Cloud : Finchley.RELEASE Consul : 1.4.0 Versions…
OlivierTerrien
  • 2,451
  • 1
  • 19
  • 31
1
2 3
10 11