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

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

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

调整请求超时时间即可

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

原始配置示例:

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

全部改成:

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

就是把60000毫秒数都改大了