netflix-eureka

Spring Cloud Netflix Eureka doesn't find eureka-js instances

女生的网名这么多〃 提交于 2019-12-11 06:56:04
问题 I have 3 microservices in Spring: Netflix Eureka A Producer A Consumer And another microservice written in NodeJs with Eureka-js-client node-microservice Spring Eureka dashboard lists all of them Until now everything looks OK, but the problem is when I try to read my node-microservice instance in eureka server. While I successfully find employee-producer instance in this way List<ServiceInstance> instances=discoveryClient.getInstances("employee-producer"); ServiceInstance serviceInstance

How to register spring boot microservices on spring cloud Netflix eureka?

眉间皱痕 提交于 2019-12-11 06:18:01
问题 We were planning to use spring cloud Netflix oss components. So I was doing a small sample project. I developed 2 spring microservices and those services runs well on http://localhost:9000/microsvc-one http://localhost:9001/microsvc-two And also wrote a sample spring cloud etflix eureka maven project which runs well on http://localhost:8761 I used annotations @EurekaDiscoveryClient and @SpringBootApplication on both the spring boot microservices main class I used annotation

com.netflix.zuul.exception.ZuulException: Hystrix Readed time out

假装没事ソ 提交于 2019-12-11 04:57:24
问题 I am trying microservices with eureka and zuul. And there is a problem with all requests, which take more then 1 second. As I have understood, 1 second is default hystrix timeout, and for configuring timeouts in Zuul, I have to configure these properties: hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds ribbon.ConnectTimeout ribbon.ReadTimeout but when I set them, there is "Cannot resolve configuration property ..." warning on each of them in the Intelije Idea. And, it

Seeking advice on proper approach to development on Netflix Eureka discoverable Spring Boot services with minimal overheads

早过忘川 提交于 2019-12-11 03:08:42
问题 We are running a Spring Boot-based environment with about 15 microservices and a Zuul edge gateway registered with Eureka. Currently, I have set up all microservices to call other microservices through the Zuul gateway (e.g. if serviceA needs to call serviceB, the URL configuration property would be serviceB.baseUrl=http://zuul.mydomain.com:7001 where zuul.mydomain.com is our development server on AWS with all other microservices running behind it). Zuul in turn proxies to the microservices

Spring Cloud Zuul: how to add route without restart

萝らか妹 提交于 2019-12-10 17:13:14
问题 I am writing microservices with Spring Cloud. I'm also using Zuul as the API Gateway which routes some URLs to destination services which are not registered into Eureka. When a new route needed to be added to Zuul, we often edit the application.yml file and then restart the Zuul server. I was wondering is there a way to add new route into Zuul without restarting the Zuul server? I found this link useful but it only works for services registed in Erueka. 来源: https://stackoverflow.com/questions

Spring Eureka App doesn't show dashboard

◇◆丶佛笑我妖孽 提交于 2019-12-10 15:59:09
问题 There is a Eureka Server application: @EnableEurekaServer @SpringBootApplication public class RegistrationModulesServiceApplication { public static void main(String[] args) { SpringApplication.run(RegistrationModulesServiceApplication.class, args); } } With applicaton.yml config (be default): eureka: instance: hostname: localhost client: registerWithEureka: false fetchRegistry: false server: port: 1111 On the first run - I saw dashboard with statuses. Like in documentation: Then - after

Disadvantages of using eureka for Service Discovery with kubernetes

穿精又带淫゛_ 提交于 2019-12-10 13:48:08
问题 Context I am deploying a set of services that are containerised using Docker into AWS. No matter which deployment solution is chosen (e.g. raw EC2/ECS/Elastic Beanstalk/Fargate) we will face the issue of "service discovery". To name just a few of the options for service discovery that I've considered: AWS Route 53 Service Registry Kubernetes Hashicorp Consul Spring Cloud Netflix Eureka Specifics Of My Stack I am developing Java Spring Boot applications using Spring Cloud with the target

Working With Eureka Clients Programmatically issue - Completed shut down of DiscoveryClient

六眼飞鱼酱① 提交于 2019-12-10 11:35:28
问题 I've createde Eureka server with the replication and now trying to start the client. When I'm trying to start the spring-microservices-eureka-client , I get the below error. Using Spring Boot Version 2.1.1.RELEASE . The same error is coming with the Boot Version 2.0.7.RELEASE and Finchley.SR2 . 2018-12-28 13:52:16.741 INFO 20236 --- [ main] o.s.c.n.e.s.EurekaServiceRegistry : Registering application UNKNOWN with eureka with status UP 2018-12-28 13:52:16.742 INFO 20236 --- [ main] com.netflix

Spring-cloud Zuul retry when instance is down

别来无恙 提交于 2019-12-09 22:38:05
问题 Using Spring-cloud Angel.SR6: Here is the configuration of my Spring-boot app with @EnableZuulProxy: server.port=8765 ribbon.ConnectTimeout=500 ribbon.ReadTimeout=5000 ribbon.MaxAutoRetries=1 ribbon.MaxAutoRetriesNextServer=1 ribbon.OkToRetryOnAllOperations=true zuul.routes.service-id.retryable=true I have 2 instances of service-id running on random ports. These instances, as well as the Zuul instance, successfully register with Eureka, and I can access RESTful endpoints on the 2 service-id

How to mock Eureka when doing Integration Tests in Spring?

心不动则不痛 提交于 2019-12-09 16:26:36
问题 I am running a simple Junit Testing a Controller in Spring Boot. The test code looks like this: @RunWith(SpringJUnit4ClassRunner.class) @SpringApplicationConfiguration(classes = {FrontControllerApplication.class}) @WebAppConfiguration @ComponentScan @IntegrationTest({"server.port:0", "eureka.client.registerWithEureka:false", "eureka.client.fetchRegistry:false"}) @ActiveProfiles("integrationTest") public class MyControllerIT { In the application-integrationTest.properties I have the following