netflix-eureka

Feign/Eureka client not passing X-Forwarded-For header

守給你的承諾、 提交于 2020-02-26 10:17:25
问题 I use Spring boot + Eureka + Feign client to forward requests from one discovered server to another and it works fine. In my server I need to get the IP of the original user. I can't seem to find how to configure Feign client to automatically edit the 'X-Forwarded-For' header so I could be able to extract the original user's IP address. When I use getRemoteAddr() I get the proxy IP address (As expected). When Trying to extract the request.getHeader("X-Forwarded-For") I always get null. Where

Feign/Eureka client not passing X-Forwarded-For header

*爱你&永不变心* 提交于 2020-02-26 10:16:49
问题 I use Spring boot + Eureka + Feign client to forward requests from one discovered server to another and it works fine. In my server I need to get the IP of the original user. I can't seem to find how to configure Feign client to automatically edit the 'X-Forwarded-For' header so I could be able to extract the original user's IP address. When I use getRemoteAddr() I get the proxy IP address (As expected). When Trying to extract the request.getHeader("X-Forwarded-For") I always get null. Where

Using Eureka as a registry using REST APIs

杀马特。学长 韩版系。学妹 提交于 2020-02-19 12:39:15
问题 We have been using Eureka with our Spring Boot applications for few months now. We have enabled service lookup between applications using @DiscoveryClient annotations. The registrations, lease renewals and deregistration works as expected. Recently, we have encountered a scenario where we have non-Java application component (written in C++), which is exposes 3 REST service endpoints that many of our Spring Boot Java applications would use. We are trying to see if the C++ component can make

Using Eureka as a registry using REST APIs

江枫思渺然 提交于 2020-02-19 12:36:08
问题 We have been using Eureka with our Spring Boot applications for few months now. We have enabled service lookup between applications using @DiscoveryClient annotations. The registrations, lease renewals and deregistration works as expected. Recently, we have encountered a scenario where we have non-Java application component (written in C++), which is exposes 3 REST service endpoints that many of our Spring Boot Java applications would use. We are trying to see if the C++ component can make

Error registering service to eureka server

给你一囗甜甜゛ 提交于 2020-02-05 06:59:51
问题 I am trying to register a client to spring-eureka-server, client deregisters just after registering eureka-server logs: 2018-05-13 16:02:47.290 INFO 25557 --- [io-9091-exec-10] c.n.e.registry.AbstractInstanceRegistry : Registered instance HELLO-CLIENT/192.168.43.96:hello-client:8072 with status UP (replication=false) 2018-05-13 16:02:47.438 INFO 25557 --- [nio-9091-exec-3] c.n.e.registry.AbstractInstanceRegistry : Registered instance HELLO-CLIENT/192.168.43.96:hello-client:8072 with status

Error registering service to eureka server

点点圈 提交于 2020-02-05 06:59:08
问题 I am trying to register a client to spring-eureka-server, client deregisters just after registering eureka-server logs: 2018-05-13 16:02:47.290 INFO 25557 --- [io-9091-exec-10] c.n.e.registry.AbstractInstanceRegistry : Registered instance HELLO-CLIENT/192.168.43.96:hello-client:8072 with status UP (replication=false) 2018-05-13 16:02:47.438 INFO 25557 --- [nio-9091-exec-3] c.n.e.registry.AbstractInstanceRegistry : Registered instance HELLO-CLIENT/192.168.43.96:hello-client:8072 with status

Spring Cloud Zuul/Eureka dynamic route

一笑奈何 提交于 2020-01-28 21:00:02
问题 I am using spring cloud eureka and spring cloud zuul proxy and i was wondering if there is any way to add dymanic zuul routes when a new service is register in eureka server or the only way to add a route is edit the application.yml file and restart the spring zuul application zuul: ignoredPatterns: /**/admin/** routes: users: /myusers/** 回答1: If your Zuul server is also EurekaClient (use @EnableDiscoveryClient annotation) it will discover all the services and automatically will create routes

Spring Cloud Zuul/Eureka dynamic route

假如想象 提交于 2020-01-28 20:59:31
问题 I am using spring cloud eureka and spring cloud zuul proxy and i was wondering if there is any way to add dymanic zuul routes when a new service is register in eureka server or the only way to add a route is edit the application.yml file and restart the spring zuul application zuul: ignoredPatterns: /**/admin/** routes: users: /myusers/** 回答1: If your Zuul server is also EurekaClient (use @EnableDiscoveryClient annotation) it will discover all the services and automatically will create routes

Failed to start bean 'eurekaAutoServiceRegistration'; casued by No Scope registered for scope name 'refresh'

本秂侑毒 提交于 2020-01-25 07:53:47
问题 Failed to start bean eurekaAutoServiceRegistration caused by No Scope registered for scope name 'refresh' @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class }) @EnableDiscoveryClient public class WebRun extends SpringBootServletInitializer { public SpringApplicationBuilder configure(SpringApplicationBuilder application) { return application.sources(WebRun.class); } public static void main(String[] args) { SpringApplication.run(WebRun

Eureka services giving Request execution error?

坚强是说给别人听的谎言 提交于 2020-01-25 03:05:41
问题 Request execution error. endpoint=DefaultEndpoint{ serviceUrl='http://localhost:8761/eureka/} is giving when I am running in docker windows but It is registering with eureka server when I am running in spring boot app in STS. for server i run in docker docker run -p 8761:8080 serverimagename for services I run in docker docker run -p 8762:8080 servicesimagename server app.properties DOCKER_HOST=tcp://127.0.0.1:2375 eureka.instance.hostname=localhost eureka.instance.secure-port-enabled= true