netflix-ribbon

Ribbon with Spring Cloud and Eureka java.lang.IllegalStateException: No instances available for localhost

左心房为你撑大大i 提交于 2021-02-07 04:15:45
问题 I am using <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-netflix</artifactId> <version>1.2.3.RELEASE</version> <type>pom</type> <scope>import</scope> </dependency> My main class: @SpringBootApplication //@Configuration @ComponentScan(basePackages = "com.mypackage") @EnableAutoConfiguration @EnableEurekaClient @EnableSwagger2 public class App { public static void main( String[] args ) { SpringApplication.run(App.class, args); } @LoadBalanced @Bean(name=

Ribbon with Spring Cloud and Eureka java.lang.IllegalStateException: No instances available for localhost

核能气质少年 提交于 2021-02-07 04:13:28
问题 I am using <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-netflix</artifactId> <version>1.2.3.RELEASE</version> <type>pom</type> <scope>import</scope> </dependency> My main class: @SpringBootApplication //@Configuration @ComponentScan(basePackages = "com.mypackage") @EnableAutoConfiguration @EnableEurekaClient @EnableSwagger2 public class App { public static void main( String[] args ) { SpringApplication.run(App.class, args); } @LoadBalanced @Bean(name=

Spring cloud gateway gives connection closed prematurely

喜夏-厌秋 提交于 2021-01-27 05:45:10
问题 I am using spring cloud gateway as API gateway in my micro service setup with consul as service discovery. In some case when API of some microservice take more then 2 minutes, gateway throws below error: java.io.IOException: Connection closed prematurely at reactor.ipc.netty.http.client.HttpClientOperations.onInboundClose(HttpClientOperations.java:269) at reactor.ipc.netty.channel.ChannelOperationsHandler.channelInactive(ChannelOperationsHandler.java:113) at io.netty.channel

Spring cloud gateway gives connection closed prematurely

匆匆过客 提交于 2021-01-27 05:44:11
问题 I am using spring cloud gateway as API gateway in my micro service setup with consul as service discovery. In some case when API of some microservice take more then 2 minutes, gateway throws below error: java.io.IOException: Connection closed prematurely at reactor.ipc.netty.http.client.HttpClientOperations.onInboundClose(HttpClientOperations.java:269) at reactor.ipc.netty.channel.ChannelOperationsHandler.channelInactive(ChannelOperationsHandler.java:113) at io.netty.channel

Spring cloud gateway gives connection closed prematurely

放肆的年华 提交于 2021-01-27 05:43:31
问题 I am using spring cloud gateway as API gateway in my micro service setup with consul as service discovery. In some case when API of some microservice take more then 2 minutes, gateway throws below error: java.io.IOException: Connection closed prematurely at reactor.ipc.netty.http.client.HttpClientOperations.onInboundClose(HttpClientOperations.java:269) at reactor.ipc.netty.channel.ChannelOperationsHandler.channelInactive(ChannelOperationsHandler.java:113) at io.netty.channel

Spring cloud gateway gives connection closed prematurely

僤鯓⒐⒋嵵緔 提交于 2021-01-27 05:42:15
问题 I am using spring cloud gateway as API gateway in my micro service setup with consul as service discovery. In some case when API of some microservice take more then 2 minutes, gateway throws below error: java.io.IOException: Connection closed prematurely at reactor.ipc.netty.http.client.HttpClientOperations.onInboundClose(HttpClientOperations.java:269) at reactor.ipc.netty.channel.ChannelOperationsHandler.channelInactive(ChannelOperationsHandler.java:113) at io.netty.channel

OAuth2RestTemplate with Ribbon + Eureka

旧城冷巷雨未停 提交于 2020-07-30 04:21:12
问题 I am working on microservices with Spring Cloud and Netflix OSS Eureka and Ribbon. I have another service running as oauth-server which provides OAuth2 token. All my microservices are registered with Eureka including oauth-server. My whole solution works if I use hardcoded url of oauth-server as "clientCredentialsResourceDetails.setAccessTokenUri("http://localhost:9000/oauth/token");" but when I try to use Eureka Discovered url of oauth-server like "clientCredentialsResourceDetails

OAuth2RestTemplate with Ribbon + Eureka

ⅰ亾dé卋堺 提交于 2020-07-30 04:18:13
问题 I am working on microservices with Spring Cloud and Netflix OSS Eureka and Ribbon. I have another service running as oauth-server which provides OAuth2 token. All my microservices are registered with Eureka including oauth-server. My whole solution works if I use hardcoded url of oauth-server as "clientCredentialsResourceDetails.setAccessTokenUri("http://localhost:9000/oauth/token");" but when I try to use Eureka Discovered url of oauth-server like "clientCredentialsResourceDetails

spring boot 2 + feign + eureka client wont resolve service-name to URL

时间秒杀一切 提交于 2020-01-24 17:03:37
问题 I am trying spring-boot (2.0.5) with spring-cloud (Finchley.SR1) and trying to setup communication between two services using Eureka as discovery server and Feign/Ribbon as clients. The setup is quite straightforward (although a bit muddied by the various things and other answers I tried): Eureka's application.yml spring: application: name: eureka-service server: port: 8761 eureka: instance: hostname: localhost preferIpAddress: true client: registerWithEureka: false fetchRegistry: false