com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server

registration failed cannot execute request on any known server docker
request execution failed with message: java.net.connectexception: connection refused: connect
request execution error. endpoint=defaultendpoint{ serviceurl='http://localhost:8761/eureka/}
docker eureka client connection refused
com netflix discovery shared transport transportexception(invalid redirect url)
com netflix discovery discoveryclient discoveryclient_unknown
eureka connection refused
eureka naming server

I am very new to the microservices and trying to run the code from link: https://dzone.com/articles/advanced-microservices-security-with-spring-and-oa . When I simply run the code I see the following error comes.

What is the issue ?

com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server
    at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:111) ~[eureka-client-1.4.12.jar:1.4.12]
    at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getApplications(EurekaHttpClientDecorator.java:134) ~[eureka-client-1.4.12.jar:1.4.12]
    at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$6.execute(EurekaHttpClientDecorator.java:137) ~[eureka-client-1.4.12.jar:1.4.12]
    at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77) ~[eureka-client-1.4.12.jar:1.4.12]
    at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getApplications(EurekaHttpClientDecorator.java:134) ~[eureka-client-1.4.12.jar:1.4.12]
    at com.netflix.discovery.DiscoveryClient.getAndStoreFullRegistry(DiscoveryClient.java:1030) [eureka-client-1.4.12.jar:1.4.12]
    at com.netflix.discovery.DiscoveryClient.fetchRegistry(DiscoveryClient.java:944) [eureka-client-1.4.12.jar:1.4.12]
    at com.netflix.discovery.DiscoveryClient.refreshRegistry(DiscoveryClient.java:1468) [eureka-client-1.4.12.jar:1.4.12]
    at com.netflix.discovery.DiscoveryClient$CacheRefreshThread.run(DiscoveryClient.java:1435) [eureka-client-1.4.12.jar:1.4.12]
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [na:1.8.0_144]
    at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.8.0_144]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_144]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_144]
    at java.lang.Thread.run(Unknown Source) [na:1.8.0_144]

2017-09-09 18:53:11.909 ERROR 16268 --- [tbeatExecutor-0] c.n.d.s.t.d.RedirectingEurekaHttpClient  : Request execution error

I have not installed anything special on to the system. Please let me know what do I need to install?

I find I have to add these two applications to the appllication.properties,it can work.Only one is not enough.

eureka.client.register-with-eureka=false

eureka.client.fetch-registry=false

com.netflix.discovery.shared.transport.TransportException , discovery.shared.transport.TransportException: Cannot execute request on any known server #1094. Closed. Spring Boot Docker com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server Ask Question Asked 1 year, 7 months ago

This particular message is just a warning. Your application is attempting to register with Eureka but Eureka is not responding. You can either start an instance of Eureka or disable the automatic registration by adding the following to your application.yml.

eureka:
  client:
    register-with-eureka: false

"Cannot execute request on any known server" when i set , TransportException: Cannot execute request on any known server at com.netflix.​discovery.shared.transport.decorator. Possible duplicate of com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server – Alexpandiyan Chokkan Aug 13 '19 at 11:38 @AlexpandiyanChokkan you are correct, but I also tried out the answers in the mentioned question.

You need to create Eureka Registry Server which is another microservice. It's main class incase of an SpringBoot application, should have @EnableEurekaServer annotation.

Then in your Eureka Client you will have to mention the Registry server URL in appliation.yml as below :

spring:
  application:
    name: stock-service

server:
  port: 8083


eureka:
  client:
    registerWithEureka: true
    fetchRegistry: true
    serviceUrl:
      defaultZone: http://localhost:8084/eureka/
  instance:
    hostname: localhost

where defaultzone should hold the value of your Eureka Registry.

Once you do all these configurations you need to Get the Eureka Registry microservice up and then you can get the Eureka client up. Once your Registry is up you will not face this exception.

Eureka Server not registering services when deployed on Pivotal , com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server; 2018-11-25T11:33:00.440-06:00  problem. c.n.discovery.InstanceInfoReplicator :There was a problem with the instance info replicator com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server at

This is happening because it is trying to connect to any known server, so to stop that error, a known server is eureka server on port 8761 which is its default port, you will have to update the application.properties with following

server.port=8761

To avoid eureka from registering itself, you add this to the application.properties

eureka.client.register-with-eureka=false

Ensure that EurekaServer is enabled, for example using spring boot you write the below on the main class.

@EnableEurekaServer

Please pardon me providing solution using .properties file but that is what i work with but .yml configurations shouldn't be too different.

Create a spring boot application via SPRING INITIALIZR, TransportException: Cannot execute request on any known server at com.netflix.​discovery.shared.transport.decorator. While running Eureka server we often run into exceptions like: com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server. Basically, this happens due to the wrong configuration in application.properties or application.yml. Eureka provides two properties for the client that can be configurable.

Make sure your ribbon client is correct

package com.in28minutes.microservices.currencyconversionservice;

import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(name="curreenter code herency-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); //mention correct pathvariables
}

Eureka Client, Ask questionsEureka Client - "Cannot execute request on any known server" Error. I have an issue with at com.netflix.discovery.shared.transport.decorator. "Cannot execute request on any known server" when i set up a Eureka cluster by skyDns Showing 1-1 of 1 messages

Cannot execute request on any known server, netflix.discovery.shared.transport.TransportExceptionCannot execute request on any known server. This crash was crawled  "Cannot execute request on any known server" when i set up a Eureka cluster by skyDns #777

Client registration eureka service failure registration failed Cannot , TransportException: Cannot execute request on any known server. at com.netflix.​discovery.shared.transport.decorator. Dismiss Join GitHub today. GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

Eureka client exception com.netflix.discovery.shared.transport , TransportException: Cannot execute request on any known server. at com.netflix.​discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(  com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server Request execution failed with message: java.net.ConnectException: Connection refused: connect. Can one please suggest what has to be changed Need help here

Comments
  • This helped me resolve my problem, thanks for this @xuezhongyu01
  • Thanks ... This is the correct answer ... eureka.client.fetch-registry=false included this line in my eureka microservice.
  • oh, I think I dont have Eureka installed on my windows box ? Is that the problem ? Do I need to installed that ?
  • You probably do not need it for what you are doing. Just disable it so you do not see a message every 5 seconds. If you would like to learn more about Eureka, start here (spring.io/guides/gs/service-registration-and-discovery)
  • this is the exact answer. thank you.