Search code examples
spring-cloudservice-discoveryconsul

Microservice: consul couldn't check health of service when enabling https


I'm trying to use Consul in microservice application based on Spring cloud. But when I enable HTTPS in tomcat server, consul couldn't check health of service (because they try to check the health with http). I got this error:

 ani got this error: gent: http request failed 'xxxxxxxxxxxx.dsk.eur.msd.world.xxxxxx:1235/health'

Solution

  • Try setting spring.cloud.consul.discovery.scheme=https.