Bambus
Bambus

Reputation: 1583

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

Upvotes: 9

Views: 11579

Answers (1)

Manish
Manish

Reputation: 1791

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

Upvotes: 6

Related Questions