title: Load balancer does not contain an instance for the service
body: <p>I want to use Eureka client with <code>spring-cloud-starter-loadbalancer</code>. But when I added configuration I get error. When I remove <code>@LoadBalancerClient(name = &quot;mail-service&quot;, configuration = LoadBalancerConfiguration.class)</code> and <code>LoadBalancerConfiguration</code> class configuration it's working fine. I tried this code:</p>
  <pre><code>    @FeignClient(name = &quot;mail-service&quot;)
      @LoadBalancerClient(name = &quot;mail-service&quot;, configuration = LoadBalancerConfiguration.class)
      public interface EmailClient {
      
          @RequestMapping(method = RequestMethod.POST, value = &quot;/engine/emails/register&quot;)
          void setUserRegistration(CreateUserDTO createUserDTO);
      }
  
  
  @Configuration
  public class LoadBalancerConfiguration {
  
      @Bean
      public ServiceInstanceListSupplier discoveryClientServiceInstanceListSupplier(ConfigurableApplicationContext context) {
          return ServiceInstanceListSupplier.builder()
                  .withBlockingDiscoveryClient()
                  .withSameInstancePreference()
                  .withHealthChecks()
                  .build(context);
      }
  }
  </code></pre>
  <p>application.yml:</p>
  <pre><code>feign:
      client:
          config:
              default:
                  connectTimeout: 5000
                  readTimeout: 5000
                  loggerLevel: basic
  eureka:
      client:
          serviceUrl:
              defaultZone: ${EUREKA_URI:http://localhost:8761/eureka}
          fetchRegistry: true
          healthcheck:
              enabled: true
      instance:
          preferIpAddress: true
          leaseRenewalIntervalInSeconds: 10
  </code></pre>
  <p><em><strong>POM.xml dependencies</strong></em></p>
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
          &lt;artifactId&gt;spring-cloud-starter-netflix-eureka-client&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.netflix.eureka&lt;/groupId&gt;
          &lt;artifactId&gt;eureka-core&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
          &lt;artifactId&gt;spring-cloud-starter-openfeign&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
          &lt;artifactId&gt;spring-cloud-starter-loadbalancer&lt;/artifactId&gt;
      &lt;/dependency&gt;
  </code></pre>
  <p>I get this error when I have only one target service.</p>
  <pre><code>[503] during [POST] to [http://mail-service/engine/emails/register] [EmailClient#setUserRegistration(CreateUserDTO)]: [Load balancer does not contain an instance for the service mail-service]
  </code></pre>
  <p>I use Release Train Version: 2020.0.3</p>
  <p>Do you know what could be the problem?</p>