springcloud zuul 配置都正确,但提示 500 错误代码 什么原因
作者:互联网
经过仔细检查,全部配置映射都没问题,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毫秒数都改大了
标签:zuul,6000,错误代码,springcloud,millis,12000,timeout,com 来源: https://blog.51cto.com/14622073/2476925