You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's impossible to register a new service with healthcheck if spring.cloud.consul.discovery.port property is set. Service is registered fine but without check. My spring boot application (service) run in docker container (bridge mode) with random external port managed by Mesos. The port inside container is set to 8080. The service is registered to Consul Service Registry with external IP and PORT with properties spring.cloud.consul.discovery.ip-address and spring.cloud.consul.discovery.port. Everything works as expected except healthcheck. If I comment out the spring.cloud.consul.discovery.port property - healthcheck is registered but with port 8080. I solved my problem with overriding org.springframework.cloud.consul.serviceregistry.ConsulAutoRegistration class where I modified registration() method:
It's impossible to register a new service with healthcheck if
spring.cloud.consul.discovery.port
property is set. Service is registered fine but without check. My spring boot application (service) run in docker container (bridge mode) with random external port managed by Mesos. The port inside container is set to 8080. The service is registered to Consul Service Registry with external IP and PORT with propertiesspring.cloud.consul.discovery.ip-address
andspring.cloud.consul.discovery.port
. Everything works as expected except healthcheck. If I comment out thespring.cloud.consul.discovery.port
property - healthcheck is registered but with port 8080. I solved my problem with overridingorg.springframework.cloud.consul.serviceregistry.ConsulAutoRegistration
class where I modified registration() method:After that everything works fine. I'd like to ask you if I missed something in configuration.
Snippet of my bootstrap.yml:
Thank you very much.
Regards,
Peter
The text was updated successfully, but these errors were encountered: