• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

spring cloud zuul网关路由 报 500

互联网 diligentman 2周前 (10-15) 13次浏览

经过仔细检查,全部配置映射都没问题,springboot-admin 监控中心所有服务状态全部显示绿色正常

但就是通过 zuul 访问服务提示 500错误

这个情况,一般是请求超时所致

调整请求超时时间即可

zuul服务本地报错提示:com.netflix.zuul.exception.ZuulException: Forwarding error

原始配置示例:

hystrix:
  command:
    default:
      execution:
        isolation:
          thread:
            timeoutInMilliseconds: 12000
ribbon:
  ReadTimeout: 6000
  ConnectTimeout: 6000

zuul:
  host:
    socket-timeout-millis: 6000
    connect-timeout-millis: 6000
from www.1b23.com

全部改成:

hystrix:
  command:
    default:
      execution:
        isolation:
          thread:
            timeoutInMilliseconds: 12000
ribbon:
  ReadTimeout: 12000
  ConnectTimeout: 12000
  eureka:
     enabled: true
zuul:
  host:
    socket-timeout-millis: 12000
    connect-timeout-millis: 12000
 from www.1b23.com

就是把60000毫秒数都改大了


喜欢 (0)