title: Zuul can't find instances on production
body: <p>I have the following services registered in Eureka</p>
  
  <p><a href="https://i.stack.imgur.com/7vfDS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7vfDS.png" alt="enter image description here"></a></p>
  
  <p>The <code>edge-server</code> is a Zuul proxy configured like this:</p>
  
  <pre><code>zuul:
    routes:
      contacts-service:
        path: /contacts/**
        stripPrefix: true
        serviceId: contacts-service
  
  ribbon:
    eureka:
      enabled: true
  
  eureka:
    client:
      serviceUrl:
        defaultZone: http://eureka:admin@127.0.0.1:8761/eureka/
    instance:
      preferIpAddress: true
  
  ---
  
  spring:
    profiles: docker
  
  eureka:
    client:
      serviceUrl:
        defaultZone: http://eureka:admin@discovery:8761/eureka/
  </code></pre>
  
  <p>In production, everything is dockerized (don't know if it matters for this question anyway).</p>
  
  <p>When I try to call the contacts service through zuul, I get this exception</p>
  
  <pre><code>{
    "timestamp": 1477595822755,
    "status": 500,
    "error": "Internal Server Error",
    "exception": "com.netflix.zuul.exception.ZuulException",
    "message": "NUMBEROF_RETRIES_NEXTSERVER_EXCEEDED"
  }
  </code></pre>
  
  <p>and the logs says</p>
  
  <pre><code>10/27/2016 9:21:10 PM[2m2016-10-27 19:21:10.921[0;39m [33m WARN[0;39m [35m1[0;39m [2m---[0;39m [2m[nio-8080-exec-3][0;39m [36mo.s.c.n.z.filters.post.SendErrorFilter  [0;39m [2m:[0;39m Error during filtering
  10/27/2016 9:21:10 PM
  10/27/2016 9:21:10 PMcom.netflix.zuul.exception.ZuulException: Forwarding error
  10/27/2016 9:21:10 PM   at org.springframework.cloud.netflix.zuul.filters.route.RibbonRoutingFilter.handleException(RibbonRoutingFilter.java:164) ~[spring-cloud-netflix-core-1.2.0.RELEASE.jar!/:1.2.0.RELEASE]
  10/27/2016 9:21:10 PM   at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1410) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
  10/27/2016 9:21:10 PM   at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
  10/27/2016 9:21:10 PM   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_92-internal]
  10/27/2016 9:21:10 PM   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_92-internal]
  10/27/2016 9:21:10 PM   at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
  10/27/2016 9:21:10 PM   at java.lang.Thread.run(Thread.java:745) [na:1.8.0_92-internal]
  10/27/2016 9:21:10 PMCaused by: com.netflix.client.ClientException: Number of retries on next server exceeded max 1 retries, while making a call for: a0821971c1d0:contacts-service:72887579
  10/27/2016 9:21:10 PM   at com.netflix.loadbalancer.reactive.LoadBalancerCommand$4.call(LoadBalancerCommand.java:350) ~[ribbon-loadbalancer-2.2.0.jar!/:2.2.0]
  10/27/2016 9:21:10 PM   at org.springframework.cloud.netflix.zuul.filters.route.RibbonRoutingFilter.forward(RibbonRoutingFilter.java:133) ~[spring-cloud-netflix-core-1.2.0.RELEASE.jar!/:1.2.0.RELEASE]
  10/27/2016 9:21:10 PM   ... 68 common frames omitted
  10/27/2016 9:21:10 PMCaused by: java.net.UnknownHostException: a0821971c1d0
  10/27/2016 9:21:10 PM   at java.net.InetAddress.getAllByName0(InetAddress.java:1280) ~[na:1.8.0_92-internal]
  10/27/2016 9:21:10 PM   at java.net.InetAddress.getAllByName(InetAddress.java:1192) ~[na:1.8.0_92-internal]
  10/27/2016 9:21:10 PM   at java.net.InetAddress.getAllByName(InetAddress.java:1126) ~[na:1.8.0_92-internal]
  10/27/2016 9:21:10 PM   at com.netflix.loadbalancer.reactive.LoadBalancerCommand$3$1.call(LoadBalancerCommand.java:287) ~[ribbon-loadbalancer-2.2.0.jar!/:2.2.0]
  10/27/2016 9:21:10 PM   at rx.internal.util.ScalarSynchronousObservable$3.call(ScalarSynchronousObservable.java:231) ~[rxjava-1.1.10.jar!/:1.1.10]
  10/27/2016 9:21:10 PM   ... 161 common frames omitted
  10/27/2016 9:21:10 PM
  </code></pre>
  
  <p>As you can see, in the logs it shows <code>java.net.UnknownHostException: a0821971c1d0</code>. Seems like Zuul can't resolve the instace address. I can post more info if needed.</p>