Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eureka netflix - cluster server list is empty

I want to make service discovery without spring boot. So I have downloaded the netflix project example and because its gradle project I want to make it maven.

So i created maven project, imported the classes and configuration and i added dependency.

I placed the eureka.war in Tomcat webapps folder and i started the eureka server.

But when i run the application in eclipse i am getting an error.

ERROR c.netflix.discovery.DiscoveryClient - DiscoveryClient_UNKNOWN/DESKTOP-B997GFD - was unable to refresh its cache! status = There is no known eureka server; cluster server list is empty com.netflix.discovery.shared.transport.TransportException: There is no known eureka server; cluster server list is empty

and Cannot get an instance of example service to talk to from eureka

like image 686
Bambus Avatar asked Sep 22 '17 10:09

Bambus


People also ask

Is Netflix Eureka deprecated?

According to the Eureka wiki (https://github.com/Netflix/eureka/wiki), the Eureka 2.0 has been discontinued. The open source work on eureka 2.0 has been discontinued.

What will happen if one of the Eureka service discovery server in a cluster goes down?

When Eureka server instances will boot up they will look for each other. All microservices will register with them automatically, so if one goes down the other server instance will be always there. On both Eureka instances you will be able to see all the registered microservices.

What is Netflix Eureka naming server?

Eureka naming server is a REST-based server that is used in the AWS Cloud services for load balancing and failover of middle-tier services. Eureka naming server is an application that holds information about all client service applications. Each microservice registers itself with the Eureka naming server.

How do I know if my Eureka server is running?

Test the ApplicationVisit the eureka-client in the browser, at http://localhost:8080/service-instances/a-bootiful-client . There, you should see the ServiceInstance for the eureka-client reflected in the response.


1 Answers

From log looks like Service name is not getting picked up from properties file and DiscoveryClient is looking for UNKNOWN

Got into similar error even while running it from gradle. Make sure host and port of eureka server is correct, most probably its correct if you have not changed any property. In my case I was connecting to our existing eureka.

eureka.region=us-east-2
eureka.us-east-2.availabilityZones=us-east-1a,us-east-1b,us-east-1c,us-east-1d
eureka.serviceUrl.us-east-1a=http://localhost:port/eureka/
eureka.serviceUrl.us-east-1b=http://localhost:port/eureka/

Below properties will help your Service to get register with eureka, keep it in file name eureka-client.properties

eureka.registration.enabled=true
eureka.name=sampleservice.mydomain.net
eureka.vipAddress=sampleservice.mydomain.net
like image 143
Manish Avatar answered Sep 27 '22 20:09

Manish