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
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.
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.
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With