栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > .Net

Spring boot使用zuul网关超时解决方法:com.netflix.zuul.exception.ZuulException: Forwarding error

.Net 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Spring boot使用zuul网关超时解决方法:com.netflix.zuul.exception.ZuulException: Forwarding error

报错内容如下:

2020-08-29 00:26:51.232  WARN 43067 --- [io-20000-exec-6] o.s.c.n.z.filters.post.SendErrorFilter   : Error during filtering

com.netflix.zuul.exception.ZuulException: Forwarding error
Caused by: com.netflix.client.ClientException: null


Caused by: java.lang.RuntimeException: org.apache.http.conn.HttpHostConnectException: Connect to 192.168.1.104:10003 [/192.168.1.104] failed: Connection refused (Connection refused)

实际IP地址为:192.168.1.100,但是因为服务启动时间在几天前,电脑IP地址变更后,没有重启discovery服务,IP地址未更新导致gateway服务不可用。

 

直接报错:500 Internal Server Error

 

2020-08-29 00:53:09.703  INFO 44383 --- [io-20000-exec-4] c.n.l.DynamicServerListLoadBalancer      : DynamicServerListLoadBalancer for client order initialized: DynamicServerListLoadBalancer:{NFLoadBalancer:name=order,current list of Servers=[192.168.1.100:10004],Load balancer stats=Zone stats: {defaultzone=[Zone:defaultzone;    Instance count:1;    Active connections count: 0;    Circuit breaker tripped count: 0;    Active connections per server: 0.0;]
},Server stats: [[Server:192.168.1.100:10004;    Zone:defaultZone;    Total Requests:0;    Successive connection failure:0;    Total blackout seconds:0;    Last connection made:Thu Jan 01 08:00:00 CST 1970;    First connection made: Thu Jan 01 08:00:00 CST 1970;    Active Connections:0;    total failure count in last (1000) msecs:0;    average resp time:0.0;    90 percentile resp time:0.0;    95 percentile resp time:0.0;    min resp time:0.0;    max resp time:0.0;    stddev resp time:0.0]
]}ServerList:org.springframework.cloud.netflix.ribbon.eureka.DomainExtractingServerList@1ff7d948
2020-08-29 00:53:10.704  INFO 44383 --- [erListUpdater-1] c.netflix.config.ChainedDynamicProperty  : Flipping property: order.ribbon.ActiveConnectionsLimit to use NEXT property: niws.loadbalancer.availabilityFilteringRule.activeConnectionsLimit = 2147483647
2020-08-29 00:53:56.369  WARN 44383 --- [io-20000-exec-5] o.s.c.n.z.filters.post.SendErrorFilter   : Error during filtering com.netflix.zuul.exception.ZuulException: 

 

报错:Gateway Timeout:

{
    "timestamp": "2020-08-28T16:53:56.374+00:00",
    "status": 504,
    "error": "Gateway Timeout",
    "message": ""
 

加入超时时间设置:

bootstrap.yml

ribbon:
  ReadTimeOut: 30000
  ConnectTimeOut: 30000
hystrix:
  command:
    default:
      execution:
        isolation:
          thread:
            timeoutInMilliseconds: 30000

configure中加入超时设置

zuul:
  host:
    socket-timeout-millis: 60000
    connect-timeout-millis: 60000
  sensitive-headers: true
  add-host-header: true
  prefix: /api/v1.0
  routes:

 

报错:java.lang.IllegalStateException: Could not locate PropertySource and the fail fast property is set, failing: None of labels [master] found

原因:git仓库地址连接错误导致,重试即可。
org.eclipse.jgit.api.errors.TransportException: https://github.com/test/configures: authentication not supported

 

 

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/911237.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号