title: Connection refused from Java feign client
body: <p>I have a simulator for one of the microservice  that I am consuming . Both my microservice and the simulator are deployed on local host and I am able to invoke the simulator from curl but when it is invoked from Java Feign client I am getting connection Refused from the Feign client .
  1)I have already checked that the simulator is up and running on the port </p>
  
  <pre><code>netstat -a
  Active Internet connections (servers and established)
  Proto Recv-Q Send-Q Local Address           Foreign Address         State
  tcp        0      0 0.0.0.0:http-alt        0.0.0.0:*               LISTEN
  tcp        0      0 0.0.0.0:19090           0.0.0.0:*               LISTEN
  tcp        0      0 0.0.0.0:19091           0.0.0.0:*               LISTEN
  tcp        0      0 0.0.0.0:19092           0.0.0.0:*               LISTEN
  </code></pre>
  
  <p>2) I am able to invoke the simulator from Curl </p>
  
  <pre><code>curl -v -X GET -H "X-B3-ParentSpanId:9b9c585fae4b6909" -H "X-B3-Sampled:1" -H "X-B3-TraceId:897aa305e5cd4a0e9b9c585fae4b6909"     http://127.0.0.1:19092/restservices/oda/v1/flow/partner/BBY/reference/29920299209700018540
  Note: Unnecessary use of -X or --request, GET is already inferred.
  *   Trying 127.0.0.1...
  * TCP_NODELAY set
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Connected to 127.0.0.1 (127.0.0.1) port 19092 (#0)
  &gt; GET /restservices/oda/v1/flow/partner/BBY/reference/29920299209700018540 HTTP/1.1
  &gt; Host: 127.0.0.1:19092
  &gt; User-Agent: curl/7.59.0
  &gt; Accept: */*
  &gt; X-B3-ParentSpanId:9b9c585fae4b6909
  &gt; X-B3-Sampled:1
  &gt; X-B3-TraceId:897aa305e5cd4a0e9b9c585fae4b6909
  &gt;
  {"cart":{"iccid":{"state":"xSEpJXbZHTieuwbEmkyw"},"imei":{"state":"qZqSNjyCRDcGtcNkkPuT"},"offer":{"state":"HepwvfrskMqCaIixZqdQ"},"phone":{"state":"IFjenviIgYSIxbTvxqgw"},"state":"TLNwJRHopqpUfIgpCOsL"},"customer":{"contactPhone":"LOfsPamSdUOAmBnGWHJU","customerId":"kwotSWtOKNCRcZTGwMWS","securityInfo":{"state":"cdQVsEhmmjdfacuptAdx"},"state":"uzjaUvZfUlwzlKBaKyri"},"id":"29920299209700018540","order":{" ":{"state":"ZorISJYWfCnCFDjwynQS"},"orderSubmit":{"state":"wxViwjAXJaKVbPlFjVCS"},"state":"mumvrXaOLqxYlobjWbDb"},"partnerReference":{"partnerId":"uklHdntzuiqVMDNkZTnm","referenceId":"UwXVOptxnakWMYdVaQrb"},"state":"elMbDlvjURDTlzvwddiO","validFor":{"endDateTime":"2018-03-08T23:27:56.213Z","startDateTime":"2017-12-08T23:27:56.213Z"}}&lt; HTTP/1.1 200 OK
  &lt; Access-Control-Allow-Origin: *
  &lt; Content-Type: application/json
  &lt; Content-Length: 769
  &lt; Date: Tue, 25 Sep 2018 07:07:54 GMT
  &lt;
  { [769 bytes data]
  </code></pre>
  
  <p><b> But when it is invoked from my microservice via Feign client it is giving me connection Refused error</b></p>
  
  <pre><code>"label" : "feign.RetryableException: Connect to  [localhost/127.0.0.1] failed: Connection refused executing GET http://127.0.0.1:19092/restservices/oda/v1/flow/partner/BBY/reference/29920299209700018540"
  </code></pre>