Hello Team,
I have created Spring Boot Project with below version,
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.1.RELEASE</version>
and below are my application properties and trying to add ribbon.ReadTimeOut and Hystrix timeout, but its throwing a warning.
spring.application.name=zuul server.port=8011 eureka.client.service-url.defaultZone=http://localhost:8010/eureka ribbon.eureka.enabled=true ribbon.restclient.enabled=true zuul.host.connect-timeout-millis=60000 zuul.host.socket-timeout-millis=80000
Due to this i am getting below when i execute through postman and while connecting h2-console,
Comment From: spencergibb
Please post the rest of your configuration
Comment From: rbk111088
<properties>
<java.version>1.8</java.version>
<spring-cloud.version>Hoxton.SR5</spring-cloud.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-zuul</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
Comment From: rbk111088
Below is from my API class
server.port=${PORT:0} spring.application.name=users-ws eureka.client.service-url.defaultZone=http://localhost:8010/eureka spring.devtools.remote.restart.enabled= true eureka.instance.instance-id=${spring.application.name}:${spring.application.instance_id:${random.value}} spring.h2.console.enabled=true spring.h2.console.settings.web-allow-others=true spring.datasource.url= jdbc:h2:mem:testdb spring.datasource.driverClassName=org.h2.Driver spring.datasource.username=sa spring.datasource.password= spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
Comment From: rbk111088
I don't see any feedback here, i posted rest of the configuration which i had configured at my application
Comment From: spencergibb
I need your zuul configuration
Comment From: rbk111088
Below is my simple Zull Class
package com.rbarath.github.photoapp.api.gateway;
import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.netflix.eureka.EnableEurekaClient; import org.springframework.cloud.netflix.zuul.EnableZuulProxy; import org.springframework.web.bind.annotation.CrossOrigin;
@SpringBootApplication @EnableEurekaClient @EnableZuulProxy public class PhotoAppApiZuulApiGatewayApplication {
public static void main(String[] args) {
SpringApplication.run(PhotoAppApiZuulApiGatewayApplication.class, args);
}
}
pom.xml from Zuul
<properties>
<java.version>1.8</java.version>
<spring-cloud.version>Hoxton.SR5</spring-cloud.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-zuul</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
application.properties
spring.application.name=zuul server.port=8011 eureka.client.service-url.defaultZone=http://localhost:8010/eureka ribbon.eureka.enabled=true ribbon.restclient.enabled=true zuul.host.connect-timeout-millis=60000 zuul.host.socket-timeout-millis=80000 hystrix.command.default.execution.isolation.strategy=THREAD hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds= 212000 ribbon.readtimeout=60000 ribbon.ConnectTimeout=60000
I don't have any other configuration at my side, its simple app i am trying to execute
Comment From: rbk111088
Any updates ?
Comment From: franzisk
@rbk111088 did you manage to solve this problem? I am facing the same one here.
Here is some info about it: Using Spring Boot 2.3.1 and Spring Cloud Hoxton.SR6
As people suggest I put this 3 lines but Eclipse says it is "unknown property" for them:
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=11000
ribbon.ConnectTimeout=10000
ribbon.ReadTimeout: 10000
There rest of my application.properties is:
spring.application.name=zuul-server
eureka.instance.preferIpAddress=true
eureka.client.registerWithEureka=true
eureka.client.fetchRegistry=true
eureka.client.healthcheck.enabled=true
zuul.host.connect-timeout-millis=60000
zuul.host.max-per-route-connections=10000
zuul.host.max-total-connections=5000
zuul.host.socket-timeout-millis=60000
zuul.semaphore.max-semaphores=500
zuul.ribbon.eager-load.enabled= true
Comment From: holy12345
@rbk111088 @franzisk Try hystrix timeout larger than ribbon time (include default ribbon retry)
Comment From: OlgaMaciaszek
@rbk111088 @franzisk . Has the workaround proposed by @holy12345 worked for you?
Comment From: spring-cloud-issues
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Comment From: spring-cloud-issues
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.