title: Spring boot consul health check is failing
body: <p>I have a consul server running on my local machine in dev mode with ACL enabled. Here is my ACL policy for service named web:</p>
  <pre><code>service &quot;web&quot; {
     policy = &quot;write&quot;
  }
  </code></pre>
  <p>And I have a token where I have attached this policy.</p>
  <p><a href="https://i.stack.imgur.com/D5zAi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/D5zAi.png" alt="enter image description here" /></a></p>
  <p>I am trying to register the service named &quot;web&quot; written using spring boot V2.6.1 and the service is getting registered but the health check is failing.</p>
  <p><a href="https://i.stack.imgur.com/W53rS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/W53rS.png" alt="enter image description here" /></a></p>
  <p>Here are the details of spring boot application:</p>
  <p>pom.xml</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
      xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;parent&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
          &lt;version&gt;2.6.1&lt;/version&gt;
          &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt;
      &lt;/parent&gt;
      &lt;groupId&gt;com.ms&lt;/groupId&gt;
      &lt;artifactId&gt;web&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;name&gt;web&lt;/name&gt;
      &lt;description&gt;Demo project for Spring Boot&lt;/description&gt;
      &lt;packaging&gt;jar&lt;/packaging&gt;
      &lt;properties&gt;
          &lt;java.version&gt;11&lt;/java.version&gt;
          &lt;spring-cloud.version&gt;2021.0.0&lt;/spring-cloud.version&gt;
      &lt;/properties&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-actuator&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
              &lt;artifactId&gt;spring-cloud-starter-consul-config&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
              &lt;artifactId&gt;spring-cloud-starter-consul-discovery&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-devtools&lt;/artifactId&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
              &lt;optional&gt;true&lt;/optional&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
      &lt;dependencyManagement&gt;
          &lt;dependencies&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-cloud-dependencies&lt;/artifactId&gt;
                  &lt;version&gt;${spring-cloud.version}&lt;/version&gt;
                  &lt;type&gt;pom&lt;/type&gt;
                  &lt;scope&gt;import&lt;/scope&gt;
              &lt;/dependency&gt;
          &lt;/dependencies&gt;
      &lt;/dependencyManagement&gt;
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
  &lt;/project&gt;
  
  </code></pre>
  <p>application.yml</p>
  <pre><code>server:
    port: 8080
  
  spring:
    application:
      name: web
    cloud:
      consul:
        config:
          enabled: false
          
        host: localhost
        port: 8500  
        discovery:
          instance-id: &quot;${spring.application.name}-${server.port}&quot; 
          prefer-ip-address: true
          health-check-critical-timeout: &quot;1m&quot;
          health-check-path: /actuator/health
          health-check-interval: 10s
          acl-token: &quot;8a0a8090-08df-2cae-cb5d-9b6f91f34933&quot;
  </code></pre>
  <p>Am I missing any configuration around health check?</p>