spring-cloud-netflix

Unable to get /hystrix.stream in Spring Cloud

二次信任 提交于 2020-01-01 10:48:29
问题 I have created a microservice with following dependencies of Spring cloud version Camden.SR2 . Spring Boot 1.4.1. http://localhost:8080/hystrix.stream is not responding. If I make the Spring Cloud version as Brixton.* (RELEASE, SR1,...), I get only ping: as reply in browser. <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring

How to Set Request Headers Using a Feign Client?

两盒软妹~` 提交于 2020-01-01 03:29:12
问题 We are developing a suite of Microservices using Spring Cloud framework and one of the the things that we need to do is to set request headers. I know I can pass a parameter @RequestHeader to a Feign method but the value needs to come from another bean. I don't know if SPEL can be used for a Feign param value. I was thinking that this is a common enough use case for most clients so there'd be some examples, but so far I've not found any. Of course I can dig through the Spring course code and

Can't get config files when run ConfigServer and EurekaServer on docker container

北慕城南 提交于 2019-12-24 20:00:27
问题 [Spring boot Microservies] I have a microservices includes 2 services: ConfigService and DiscoveryService ConfigService is enabled ConfigServer, keep files config for microservice DiscoveryService is EurekaServer. It will get config file from ConfigService When run 2 service on local (not docker), everything is good Fetching config from server at: http://localhost:8088 Located environment: name=epl-discovery-service, profiles=[default], label=null, version

Interceptor not getting called when zuul.routes configured in gateway

雨燕双飞 提交于 2019-12-24 16:34:03
问题 When I configure zuul routes in bootstrap.properties, my TestHandlerInterceptor defined in gareway application is not getting invoked for all the request matching /registrations but it gets called for all other request TestHandlerInterceptor.preHandle is getting processed successfully bootstrap.properties zuul.routes.registration-service.path=**registrations** zuul.routes.registration-service.service=registration-service TestHandlerInterceptor.java public class TestHandlerInterceptor

Ribbon Retry properties not respected

南楼画角 提交于 2019-12-24 10:35:59
问题 I have a zuul gateway application, that receives requests from a client app and forwards the requests using load balanced rest template to a micro service with 2 endpoints, say endpoint1 and endpoint2 (load balancing between the two end points in round robbin which is okay for now, although I want it to be availability based). Here are the issues I am facing - I brought down one of the end points, say endpoint2 and tried calling the zuul route and I see that when the request is going to the

Fallback methods at Zuul server in Spring cloud

谁说胖子不能爱 提交于 2019-12-24 10:07:24
问题 I am new in Spring Cloud Netflix and have some questions concerning it. I am using the API Gateway together with Hystrix running at Zuul edge server and I would like to make sure if I understand the following behavior correctly: I kill a microservice running "behind" API Gateway then I force hystrix to open the circuit. After that (ca 10 seconds) I send a request to the non-running microservice and receive TIMEOUT error. However when I send many (tens) of requests in a very short time (up to

Register spring boot https application in eureka with specific port

余生长醉 提交于 2019-12-24 07:14:19
问题 I am trying to register an application available through https only. I have problem with correct configuration and links displayed in eureka's dashboard are not correct. I have tried some configurations but I can't get the right effect i.e. working dashboard links in Eureka. My base configuration. server: port: 9999 context-path: /ctx ssl: key-store: classpath:keystore.jks key-store-password: 'kspass' key-password: 'kpass' keyAlias: ssl spring: application: name: app-ctx cloud: loadbalancer:

Register spring boot https application in eureka with specific port

会有一股神秘感。 提交于 2019-12-24 07:14:16
问题 I am trying to register an application available through https only. I have problem with correct configuration and links displayed in eureka's dashboard are not correct. I have tried some configurations but I can't get the right effect i.e. working dashboard links in Eureka. My base configuration. server: port: 9999 context-path: /ctx ssl: key-store: classpath:keystore.jks key-store-password: 'kspass' key-password: 'kpass' keyAlias: ssl spring: application: name: app-ctx cloud: loadbalancer:

Redirecting calls using ZuulProxy

依然范特西╮ 提交于 2019-12-24 00:28:34
问题 What I want to do: I would like to have a server that will redirect some kind of calls this way: http://localhost:8080/myapp/api/rest/category/method in http://localhost:8090/category/api/method . What I've done: I've configured my Zuul Proxy like this: info: component: Simple Zuul Proxy Server cloud: conablefig: failFast: true discovery: end: true zuul: routes: api: /myapp/api/rest/** server: port: 8080 logging: level: ROOT: INFO org.springframework.web: INFO info.tcb: DEBUG I'm using a

Test drive Hystrix Circuit Breaker configuration

允我心安 提交于 2019-12-19 11:39:09
问题 Our application is written in anit-fragile manner by implementing circuit breaker pattern using Hystrix. The whole of the application is created using test driven practice but is stuck at the point where we need to implement the circuit breaker strategy by configuring the same on the methods. Below is the sample configuration used by us - @HystrixCommand(commandProperties = { @HystrixProperty(name = "circuitBreaker.enabled", value = "true"), @HystrixProperty(name = "circuitBreaker