我正在将Netflix Zuul用作我的应用程序的API网关服务。但是我有时会从Zuul网关获取读取时间异常。我已经在application.properties中配置了超时,但是异常不会消失。可能是什么实际原因?有永久的解决办法吗?
zuul-gateway-service_1 |
zuul-gateway-service_1 | com.netflix.zuul.exception.ZuulException:
zuul-gateway-service_1 | at org.springframework.cloud.netflix.zuul.filters.post.SendErrorFilter.findZuulException(SendErrorFilter.java:114) ~[spring-cloud-netflix-zuul-2.1.0.RELEASE.jar!/:2.1.0.RELEASE]
zuul-gateway-service_1 | at org.springframework.cloud.netflix.zuul.filters.post.SendErrorFilter.run(SendErrorFilter.java:76) ~[spring-cloud-netflix-zuul-2.1.0.RELEASE.jar!/:2.1.0.RELEASE]
zuul-gateway-service_1 | at com.netflix.zuul.ZuulFilter.runFilter(ZuulFilter.java:117) [zuul-core-1.3.1.jar!/:1.3.1]
zuul-gateway-service_1 | at com.netflix.zuul.FilterProcessor.processZuulFilter(FilterProcessor.java:193) [zuul-core-1.3.1.jar!/:1.3.1]
zuul-gateway-service_1 | at com.netflix.zuul.FilterProcessor.runFilters(FilterProcessor.java:157) [zuul-core-1.3.1.jar!/:1.3.1]
zuul-gateway-service_1 | at com.netflix.zuul.FilterProcessor.error(FilterProcessor.java:105) [zuul-core-1.3.1.jar!/:1.3.1]
zuul-gateway-service_1 | at com.netflix.zuul.ZuulRunner.error(ZuulRunner.java:112) [zuul-core-1.3.1.jar!/:1.3.1]
zuul-gateway-service_1 | at com.netflix.zuul.http.ZuulServlet.error(ZuulServlet.java:145) [zuul-core-1.3.1.jar!/:1.3.1]
zuul-gateway-service_1 | at com.netflix.zuul.http.ZuulServlet.service(ZuulServlet.java:83) [zuul-core-1.3.1.jar!/:1.3.1]
zuul-gateway-service_1 | at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:165) [spring-webmvc-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
zuul-gateway-service_1 | at org.springframework.cloud.netflix.zuul.web.ZuulController.handleRequest(ZuulController.java:44) [spring-cloud-netflix-zuul-2.1.0.RELEASE.jar!/:2.1.0.RELEASE]
zuul-gateway-service_1 | at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:52) [spring-webmvc-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
zuul-gateway-service_1 | at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038) [spring-webmvc-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
zuul-gateway-service_1 | at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942) [spring-webmvc-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
zuul-gateway-service_1 | at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005) [spring-webmvc-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]```
Following is my application.properties file -
spring.application.name=${SERVICE_NAME}
server.port=${SERVICE_PORT}
eureka.instance.preferIpAddress=true
eureka.client.service-url.defaultZone=${EUREKA_SERVICE}
hystrix.command.default.execution.timeout.enabled=false
ribbon.ConnectTimeout=10000
ribbon.ReadTimeout=10000
zuul.ribbon.eager-load.enabled=true
zuul.host.socket-timeout-millis=60000
hystrix.command.default.execution.isolation.strategy=THREAD
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=60000```