2019-11-29 13:35:09.182  INFO 30188 --- [nio-8100-exec-1] s.c.a.AnnotationConfigApplicationContext : Refreshing SpringClientFactory-currency-exchange-service: startup date [Fri Nov 29 13:35:09 IST 2019]; parent: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@6a2eebaf
2019-11-29 13:35:09.231  INFO 30188 --- [nio-8100-exec-1] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2019-11-29 13:35:09.448  INFO 30188 --- [nio-8100-exec-1] c.netflix.config.ChainedDynamicProperty  : Flipping property: currency-exchange-service.ribbon.ActiveConnectionsLimit to use NEXT property: niws.loadbalancer.availabilityFilteringRule.activeConnectionsLimit = 2147483647
2019-11-29 13:35:09.470  INFO 30188 --- [nio-8100-exec-1] c.n.u.concurrent.ShutdownEnabledTimer    : Shutdown hook installed for: NFLoadBalancer-PingTimer-currency-exchange-service
2019-11-29 13:35:09.493  INFO 30188 --- [nio-8100-exec-1] c.netflix.loadbalancer.BaseLoadBalancer  : Client: currency-exchange-service instantiated a LoadBalancer: DynamicServerListLoadBalancer:{NFLoadBalancer:name=currency-exchange-service,current list of Servers=[],Load balancer stats=Zone stats: {},Server stats: []}ServerList:null
2019-11-29 13:35:09.500  INFO 30188 --- [nio-8100-exec-1] c.n.l.DynamicServerListLoadBalancer      : Using serverListUpdater PollingServerListUpdater
2019-11-29 13:35:09.533  INFO 30188 --- [nio-8100-exec-1] c.netflix.config.ChainedDynamicProperty  : Flipping property: currency-exchange-service.ribbon.ActiveConnectionsLimit to use NEXT property: niws.loadbalancer.availabilityFilteringRule.activeConnectionsLimit = 2147483647
2019-11-29 13:35:09.535  INFO 30188 --- [nio-8100-exec-1] c.n.l.DynamicServerListLoadBalancer      : DynamicServerListLoadBalancer for client currency-exchange-service initialized: DynamicServerListLoadBalancer:{NFLoadBalancer:name=currency-exchange-service,current list of Servers=[host.docker.internal:8000],Load balancer stats=Zone stats: {defaultzone=[Zone:defaultzone;   Instance count:1;   Active connections count: 0;    Circuit breaker tripped count: 0;   Active connections per server: 0.0;]
},Server stats: [[Server:host.docker.internal:8000; Zone:defaultZone;   Total Requests:0;   Successive connection failure:0;    Total blackout seconds:0;   Last connection made:Thu Jan 01 05:30:00 IST 1970;  First connection made: Thu Jan 01 05:30:00 IST 1970;    Active Connections:0;   total failure count in last (1000) msecs:0; average resp time:0.0;  90 percentile resp time:0.0;    95 percentile resp time:0.0;    min resp time:0.0;  max resp time:0.0;  stddev resp time:0.0]
]}ServerList:org.springframework.cloud.netflix.ribbon.eureka.DomainExtractingServerList@8179449
2019-11-29 13:35:10.505  INFO 30188 --- [erListUpdater-0] c.netflix.config.ChainedDynamicProperty  : Flipping property: currency-exchange-service.ribbon.ActiveConnectionsLimit to use NEXT property: niws.loadbalancer.availabilityFilteringRule.activeConnectionsLimit = 2147483647
2019-11-29 13:35:11.859 ERROR 30188 --- [nio-8100-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is feign.RetryableException: connect timed out executing GET http://currency-exchange-service/currency-exchange/from/AUD/to/INR] with root cause

java.net.SocketTimeoutException: connect timed out
    at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) ~[na:1.8.0_212]
    at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) ~[na:1.8.0_212]
    at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) ~[na:1.8.0_212]
    at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) ~[na:1.8.0_212]
    at java.net.AbstractPlainSocketImpl.connect(Unknown Source) ~[na:1.8.0_212]
    at java.net.PlainSocketImpl.connect(Unknown Source) ~[na:1.8.0_212]
    at java.net.SocksSocketImpl.connect(Unknown Source) ~[na:1.8.0_212]
    at java.net.Socket.connect(Unknown Source) ~[na:1.8.0_212]
    at sun.net.NetworkClient.doConnect(Unknown Source) ~[na:1.8.0_212]
    at sun.net.www.http.HttpClient.openServer(Unknown Source) ~[na:1.8.0_212]
    at sun.net.www.http.HttpClient.openServer(Unknown Source) ~[na:1.8.0_212]
    at sun.net.www.http.HttpClient.<init>(Unknown Source) ~[na:1.8.0_212]
    at sun.net.www.http.HttpClient.New(Unknown Source) ~[na:1.8.0_212]
    at sun.net.www.http.HttpClient.New(Unknown Source) ~[na:1.8.0_212]
    at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source) ~[na:1.8.0_212]
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Source) ~[na:1.8.0_212]
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source) ~[na:1.8.0_212]
    at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source) ~[na:1.8.0_212]
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source) ~[na:1.8.0_212]
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) ~[na:1.8.0_212]
    at java.net.HttpURLConnection.getResponseCode(Unknown Source) ~[na:1.8.0_212]
    at feign.Client$Default.convertResponse(Client.java:152) ~[feign-core-9.5.1.jar:na]
    at feign.Client$Default.execute(Client.java:74) ~[feign-core-9.5.1.jar:na]
    at org.springframework.cloud.openfeign.ribbon.FeignLoadBalancer.execute(FeignLoadBalancer.java:89) ~[spring-cloud-openfeign-core-2.0.0.M1.jar:2.0.0.M1]
    at org.springframework.cloud.openfeign.ribbon.FeignLoadBalancer.execute(FeignLoadBalancer.java:55) ~[spring-cloud-openfeign-core-2.0.0.M1.jar:2.0.0.M1]
    at com.netflix.client.AbstractLoadBalancerAwareClient$1.call(AbstractLoadBalancerAwareClient.java:104) ~[ribbon-loadbalancer-2.2.4.jar:2.2.4]
    at com.netflix.loadbalancer.reactive.LoadBalancerCommand$3$1.call(LoadBalancerCommand.java:303) ~[ribbon-loadbalancer-2.2.4.jar:2.2.4]
    at com.netflix.loadbalancer.reactive.LoadBalancerCommand$3$1.call(LoadBalancerCommand.java:287) ~[ribbon-loadbalancer-2.2.4.jar:2.2.4]
    at rx.internal.util.ScalarSynchronousObservable$3.call(ScalarSynchronousObservable.java:231) ~[rxjava-1.3.6.jar:1.3.6]
    at rx.internal.util.ScalarSynchronousObservable$3.call(ScalarSynchronousObservable.java:228) ~[rxjava-1.3.6.jar:1.3.6]
    at rx.Observable.unsafeSubscribe(Observable.java:10256) ~[rxjava-1.3.6.jar:1.3.6]
    at rx.internal.operators.OnSubscribeConcatMap$ConcatMapSubscriber.drain(OnSubscribeConcatMap.java:286) ~[rxjava-1.3.6.jar:1.3.6]
    at rx.internal.operators.OnSubscribeConcatMap$ConcatMapSubscriber.onNext(OnSubscribeConcatMap.java:144) ~[rxjava-1.3.6.jar:1.3.6]
    at com.netflix.loadbalancer.reactive.LoadBalancerCommand$1.call(LoadBalancerCommand.java:185) ~[ribbon-loadbalancer-2.2.4.jar:2.2.4]
    at com.netflix.loadbalancer.reactive.LoadBalancerCommand$1.call(LoadBalancerCommand.java:180) ~[ribbon-loadbalancer-2.2.4.jar:2.2.4]
    at rx.Observable.unsafeSubscribe(Observable.java:10256) ~[rxjava-1.3.6.jar:1.3.6]
    at rx.internal.operators.OnSubscribeConcatMap.call(OnSubscribeConcatMap.java:94) ~[rxjava-1.3.6.jar:1.3.6]
    at rx.internal.operators.OnSubscribeConcatMap.call(OnSubscribeConcatMap.java:42) ~[rxjava-1.3.6.jar:1.3.6]
    at rx.Observable.unsafeSubscribe(Observable.java:10256) ~[rxjava-1.3.6.jar:1.3.6]
    at rx.internal.operators.OperatorRetryWithPredicate$SourceSubscriber$1.call(OperatorRetryWithPredicate.java:127) ~[rxjava-1.3.6.jar:1.3.6]
    at rx.internal.schedulers.TrampolineScheduler$InnerCurrentThreadScheduler.enqueue(TrampolineScheduler.java:73) ~[rxjava-1.3.6.jar:1.3.6]
    at rx.internal.schedulers.TrampolineScheduler$InnerCurrentThreadScheduler.schedule(TrampolineScheduler.java:52) ~[rxjava-1.3.6.jar:1.3.6]
    at rx.internal.operators.OperatorRetryWithPredicate$SourceSubscriber.onNext(OperatorRetryWithPredicate.java:79) ~[rxjava-1.3.6.jar:1.3.6]
    at rx.internal.operators.OperatorRetryWithPredicate$SourceSubscriber.onNext(OperatorRetryWithPredicate.java:45) ~[rxjava-1.3.6.jar:1.3.6]
    at rx.internal.util.ScalarSynchronousObservable$WeakSingleProducer.request(ScalarSynchronousObservable.java:276) ~[rxjava-1.3.6.jar:1.3.6]
    at rx.Subscriber.setProducer(Subscriber.java:209) ~[rxjava-1.3.6.jar:1.3.6]
    at rx.internal.util.ScalarSynchronousObservable$JustOnSubscribe.call(ScalarSynchronousObservable.java:138) ~[rxjava-1.3.6.jar:1.3.6]
    at rx.internal.util.ScalarSynchronousObservable$JustOnSubscribe.call(ScalarSynchronousObservable.java:129) ~[rxjava-1.3.6.jar:1.3.6]
    at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48) ~[rxjava-1.3.6.jar:1.3.6]
    at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30) ~[rxjava-1.3.6.jar:1.3.6]
    at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48) ~[rxjava-1.3.6.jar:1.3.6]
    at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30) ~[rxjava-1.3.6.jar:1.3.6]
    at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48) ~[rxjava-1.3.6.jar:1.3.6]
    at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30) ~[rxjava-1.3.6.jar:1.3.6]
    at rx.Observable.subscribe(Observable.java:10352) ~[rxjava-1.3.6.jar:1.3.6]
    at rx.Observable.subscribe(Observable.java:10319) ~[rxjava-1.3.6.jar:1.3.6]
    at rx.observables.BlockingObservable.blockForSingle(BlockingObservable.java:443) ~[rxjava-1.3.6.jar:1.3.6]
    at rx.observables.BlockingObservable.single(BlockingObservable.java:340) ~[rxjava-1.3.6.jar:1.3.6]
    at com.netflix.client.AbstractLoadBalancerAwareClient.executeWithLoadBalancer(AbstractLoadBalancerAwareClient.java:112) ~[ribbon-loadbalancer-2.2.4.jar:2.2.4]
    at org.springframework.cloud.openfeign.ribbon.LoadBalancerFeignClient.execute(LoadBalancerFeignClient.java:63) ~[spring-cloud-openfeign-core-2.0.0.M1.jar:2.0.0.M1]
    at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:97) ~[feign-core-9.5.1.jar:na]
    at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:76) ~[feign-core-9.5.1.jar:na]
    at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:103) ~[feign-core-9.5.1.jar:na]
    at com.sun.proxy.$Proxy117.retrieveExchangeValue(Unknown Source) ~[na:na]
    at com.poc.microservices.currencyconversionservice.CurrencyConversionController.convertCurrencyFeign(CurrencyConversionController.java:43) ~[classes/:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_212]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_212]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_212]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_212]
    at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:209) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102) ~[spring-webmvc-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:870) ~[spring-webmvc-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:776) ~[spring-webmvc-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991) ~[spring-webmvc-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925) ~[spring-webmvc-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:978) ~[spring-webmvc-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:870) ~[spring-webmvc-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:635) ~[tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:855) ~[spring-webmvc-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) ~[tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) ~[tomcat-embed-websocket-8.5.28.jar:8.5.28]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.filterAndRecordMetrics(WebMvcMetricsFilter.java:158) ~[spring-boot-actuator-2.0.0.RELEASE.jar:2.0.0.RELEASE]
    at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.filterAndRecordMetrics(WebMvcMetricsFilter.java:126) ~[spring-boot-actuator-2.0.0.RELEASE.jar:2.0.0.RELEASE]
    at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:111) ~[spring-boot-actuator-2.0.0.RELEASE.jar:2.0.0.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.springframework.boot.actuate.web.trace.servlet.HttpTraceFilter.doFilterInternal(HttpTraceFilter.java:84) ~[spring-boot-actuator-2.0.0.RELEASE.jar:2.0.0.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) ~[tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_212]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_212]
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.5.28.jar:8.5.28]
    at java.lang.Thread.run(Unknown Source) [na:1.8.0_212]
  1. Main Service: import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.openfeign.EnableFeignClients;

        @SpringBootApplication
        @EnableFeignClients("com.poc.microservices.currencyconversionservice")
        @EnableDiscoveryClient
        public class CurrencyConversionServiceApplication {
    
            public static void main(String[] args) {
                SpringApplication.run(CurrencyConversionServiceApplication.class, args);
            }
        }
    
        import java.math.BigDecimal;
        import java.util.HashMap;
        import java.util.Map;
    
        import org.springframework.beans.factory.annotation.Autowired;
        import org.springframework.http.ResponseEntity;
        import org.springframework.web.bind.annotation.GetMapping;
        import org.springframework.web.bind.annotation.PathVariable;
        import org.springframework.web.bind.annotation.RestController;
    
        @RestController
        public class CurrencyConversionController {
    
            @Autowired
            private CurrencyExchangeServiceProxy proxy;
    
            @GetMapping("/currency-converter-feign/from/{from}/to/{to}/quantity/{quantity}")
            public CurrencyConversionBean convertCurrencyFeign(@PathVariable String from, @PathVariable String to,
                    @PathVariable BigDecimal quantity) {
    
                CurrencyConversionBean response = proxy.retrieveExchangeValue(from, to);
    
                return new CurrencyConversionBean(response.getId(), from, to, response.getConversionMultiple(), quantity,
                        quantity.multiply(response.getConversionMultiple()), response.getPort());
            }
    
        }
    
        import org.springframework.cloud.openfeign.FeignClient;
        import org.springframework.cloud.netflix.ribbon.RibbonClient;
        import org.springframework.web.bind.annotation.GetMapping;
        import org.springframework.web.bind.annotation.PathVariable;
    
        @FeignClient(name="currency-exchange-service")
        @RibbonClient(name="currency-exchange-service")
        public interface CurrencyExchangeServiceProxy {
            @GetMapping("/currency-exchange/from/{from}/to/{to}")
            public CurrencyConversionBean retrieveExchangeValue
                (@PathVariable("from") String from, @PathVariable("to") String to);
        }
    
        Application properties:
            spring.application.name=currency-conversion-service
            server.port=8100
            eureka.client.service-url.default-zone=http://localhost:8761/eureka
    
        Dependencies:
            <spring-cloud.version>Finchley.M8</spring-cloud.version>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-starter-openfeign</artifactId>
            </dependency>
    
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
            </dependency>
    
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
            </dependency>
    
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-web</artifactId>
            </dependency>
    
  2. Sub Service:

        import org.springframework.boot.SpringApplication;
        import org.springframework.boot.autoconfigure.SpringBootApplication;
        import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
    
        @SpringBootApplication
        @EnableDiscoveryClient
        public class CurrencyExchangeServiceApplication {
    
            public static void main(String[] args) {
                SpringApplication.run(CurrencyExchangeServiceApplication.class, args);
            }
        }
    
        import org.springframework.beans.factory.annotation.Autowired;
        import org.springframework.core.env.Environment;
        import org.springframework.web.bind.annotation.GetMapping;
        import org.springframework.web.bind.annotation.PathVariable;
        import org.springframework.web.bind.annotation.RestController;
    
        @RestController
        public class CurrencyExchangeController {
    
            @Autowired
            private Environment environment;
    
            @Autowired
            private ExchangeValueRepository repository;
    
            @GetMapping("/currency-exchange/from/{from}/to/{to}")
            public ExchangeValue retrieveExchangeValue
                (@PathVariable String from, @PathVariable String to){
    
                ExchangeValue exchangeValue = 
                        repository.findByFromAndTo(from, to);
    
                exchangeValue.setPort(
                        Integer.parseInt(environment.getProperty("local.server.port")));
    
                return exchangeValue;
            }
        }
    
        Application Properties:
            spring.application.name=currency-exchange-service
            server.port=8000
    
            spring.jpa.show-sql=true
            spring.h2.console.enabled=true
    
            eureka.client.service-url.default-zone=http://localhost:8761/eureka
    
        Dependencies:
            <spring-cloud.version>Finchley.M8</spring-cloud.version>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
            </dependency>
    
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-web</artifactId>
            </dependency>
    
  3. Eureka Server:

        @SpringBootApplication
        @EnableEurekaServer
        public class NetflixEurekaNamingServerApplication {
    
            public static void main(String[] args) {
                SpringApplication.run(NetflixEurekaNamingServerApplication.class, args);
            }
        }
    
        Application Properties:
    
            spring.application.name=netflix-eureka-naming-server
            server.port=8761
    
            eureka.client.register-with-eureka=false
            eureka.client.fetch-registry=false
    
        Dependencies:
    
            <spring-cloud.version>Finchley.M8</spring-cloud.version>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
            </dependency>
    

Spring Cloud Netflix Feign throws connect timed out when calling the registered service in Eureka

URL for triggering: http://localhost:8100/currency-converter-feign/from/AUD/to/INR/quantity/100001 Response:

Spring Cloud Netflix Feign throws connect timed out when calling the registered service in Eureka

Comment From: spencergibb

Please learn how to properly format code and logs.

Finchley.M8 is a milestone, not a release. Also, Finchley is no longer supported, please upgrade to Greenwich.SR4 and boot 2.1.10 and try again.

Comment From: spencergibb

Also, please don't cross post to stack overflow and issues.

Comment From: radhakrishna67

Also, please don't cross post to stack overflow and issues.

Yes, i have deleted this from stack overflow. Thanks for letting me know.

Comment From: radhakrishna67

Please learn how to properly format code and logs.

Finchley.M8 is a milestone, not a release. Also, Finchley is no longer supported, please upgrade to Greenwich.SR4 and boot 2.1.10 and try again.

Hi, i have tried with given versions and have same issue as stated. connect timed out executing GET http://currency-exchange-service/currency-exchange/from/AUD/to/INR feign.RetryableException: connect timed out executing GET http://currency-exchange-service/currency-exchange/from/AUD/to/INR

Comment From: spencergibb

Something's not configured right because it is trying to connect to your service is rather than a host and port.

Can you provide a complete, minimal, verifiable sample that reproduces the problem? It should be available as a GitHub (or similar) project or attached to this issue as a zip file.

Comment From: radhakrishna67

Something's not configured right because it is trying to connect to your service is rather than a host and port.

Can you provide a complete, minimal, verifiable sample that reproduces the problem? It should be available as a GitHub (or similar) project or attached to this issue as a zip file.

Thanks for quick response. Please find the project at Git Hub repo 1. Run netflix-eureka-naming-server and access it using Naming server 2. Run currency-exchange-service and access it using Currency Exchange Service 3. Run currency-conversion-service and access it using Currency Conversion Service

Comment From: radhakrishna67

Can someone suggest how to resolve this issue?

Comment From: spencergibb

http :8100/currency-converter-feign/from/USD/to/INR/quantity/1 work fine for me

Comment From: radhakrishna67

Is it working without any changes in the given codebase?

Comment From: spencergibb

Yes, I'm unable to reproduce the problem with the project you provided.

Comment From: radhakrishna67

Oh, ok. What is the response you see, when you hit http :8100/currency-converter-feign/from/USD/to/INR/quantity/1

Comment From: spencergibb

A normal response with appropriate json

Comment From: radhakrishna67

For me, it seems Feign could not identify the service from Eureka service. It is not working.

Comment From: OlgaMaciaszek

@radhakrishna67 is the issue still present?

Comment From: radhakrishna67

Yes, it is not resolved.

Comment From: OlgaMaciaszek

@radhakrishna67 I also am not getting any errors. A request at :8100/currency-converter-feign/from/USD/to/INR/quantity/1 returns: {"id":10001,"from":"USD","to":"INR","conversionMultiple":65.00,"quantity":1,"totalCalculatedAmount":65.00,"port":8000}`, so the issue seems not to be with the code but with your environment. Can any of your colleagues/ teammates replicate the issue with the code you've provided?

Comment From: spring-projects-issues

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Comment From: spring-projects-issues

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.

Comment From: priyankabhale

@radhakrishna67 i am facing the same problem . Did you manage to resolve the issue ?

Comment From: ayushbaheti16

@priyankabhale - I had the same issue and I resolved it by using spring version in all my pom.xml - 2.3.1.RELEASE

Earlier I was using 2.4.0 (M1).

Comment From: ananthakrishkk

@radhakrishna67 I am facing the same issue for this project. Are u able to figure out what's the issue? Please share the solution if you have solved it.

@ayushbaheti16 I am using 2.3.1.RELEASE spring version, but it didn't work for me

Comment From: ankush953

@radhakrishna67 @ananthakrishkk did you guys resolve it?

Comment From: Shona2708

@radhakrishna67 I am also facing the same problem. Did you guys resolve it ?

Comment From: mersecate

Solucionado....

@Configuration public class RestTemplateConfiguration {

@Bean
@LoadBalanced
RestTemplate loadBalancedRestTemplate() {
    return new RestTemplate();
}

}

Comment From: spencergibb

@mersecate that can not be the solution as feign doesn't use rest template

Comment From: Anuja09

I am also facing same issue.

After few subsequent calls to external service, the calling service(spring boot micro service) getting connection timeout. Connection timeout and read timeout is set to 5s. The usual calls takes ~50ms. And, then intermittently the microservice throws - SocketTimeoutException: connect timed out (5006ms), which in turn throws feign.RetryableException.

Not sure, why it is taking 5006ms for TLS handshake

@priyankabhale Does using 2.3.1.RELEASE version solved issue, on top of that, did you change any feign configuration in your case.

Comment From: OlgaMaciaszek

Hello, @Anuja09, @mersecate @Shona2708 @ankush953 @ananthakrishkk @priyankabhale @ayushbaheti16 , the 2.x line is not supported anymore - please upgrade to 3.1.x (2021.0.x) release train. If the problem still persists, provide a minimal, complete, verifiable example that reproduces the issue.

Comment From: Anuja09

@OlgaMaciaszek Can you please elaborate more on "the 2.x line is not supported anymore"? what exactly not supported in 2.x anymore but available in 3.1.x?

Comment From: OlgaMaciaszek

@Anuja09 Both Spring Cloud Netflix and Spring Cloud OpenFeign projects 2.x are no longer supported - there's no work being done on it. Any bugs other than critical security issues won't be addressed or verified. If the issue also persists in 3.1.x, for example, Spring Cloud OpenFeign 3.1.1, Spring Cloud Eureka server 3.1.1 (Spring Cloud Dependencies bom 2021.0.1), we will verify it. If you are having issues with dependency versioning, the best place to get a correct sample build file for Spring Boot projects is start.spring.io. Any samples that reproduce the issue, should also be built with current GA versions.

Comment From: Anuja09

@OlgaMaciaszek Can you please help understand - Does the upgrade [3.1.x] apply to OpenFeign only or needs upgrade for other spring dependencies version also. Currently I use spring boot version 2.1.12.RELEASE and OpenFeign 2.1.3.RELEASE version

Comment From: OlgaMaciaszek

Hello @Anuja09 - these versions are not supported anymore (both Boot and OF). We suggest using dependency management with Spring Cloud dependencies bom rather than specifying versions for separate Spring Cloud projects. Please use start.spring.io to review the correct dependencies setup.

Comment From: spring-cloud-issues

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Comment From: Anuja09

@spring-cloud-issues Below is the issue In my service (spring boot micro service), an API (e.g. /api/xyz) calls an external service API (e.g. /external/abc). After few subsequent calls to external service, the calling service gets connection timeout.

The usual API call to the external service takes ~50ms.

Feign Config:

okhttp: enabled: true
httpclient:  enabled: false
connectTimeout: 5000
readTimeout: 5000

Scenario: Executed a batch of 5k requests to e.g. /api/xyz

Issue: After ~50[updated as per latest observation] requests to external service (/api/xyz) are processed, feign client starts throwing connection timeout SocketTimeoutException: connect timed out (5006ms)

Please mention if anymore information is required, Thank you!

Comment From: dhananjay-ng

Using @EnableDiscoveryClient instead of @EnableEurekaClient worked for me.

Comment From: OlgaMaciaszek

Thanks for the details @Anuja09 , however, as requested below, could you please confirm the version the issue is on?

Comment From: spring-cloud-issues

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Comment From: spring-cloud-issues

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.