错误:Caudby:org.ConnectTimeo。。。

更新时间:2023-07-12 18:23:21 阅读: 评论:0

错误:Caudby:org.ConnectTimeo。。。详细错误:
1 com.sun.jery.api.client.ClientHandlerException: org.ConnectTimeoutException: Connect to localhost:8761 timed out
2    at com.sun.jery.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:187) ~[jery-apache-client4-1.19.1.jar:1.19.1]
3    at comflix.eureka.cluster.DynamicGZIPContentEncodingFilter.handle(DynamicGZIPContentEncodingFilter.java:48) ~[eureka-core-1.7.2.jar:1.7.2]
4    at comflix.discovery.EurekaIdentityHeaderFilter.handle(EurekaIdentityHeaderFilter.java:27) ~[eureka-client-1.7.2.jar:1.7.2]
5    at com.sun.jery.api.client.Client.handle(Client.java:652) ~[jery-client-1.19.1.jar:1.19.1]
6    at com.sun.jery.api.client.WebResource.handle(WebResource.java:682) ~[jery-client-1.19.1.jar:1.19.1]
7    at com.sun.jery.api.client.WebResource.access$200(WebResource.java:74) ~[jery-client-1.19.1.jar:1.19.1]
8    at com.sun.jery.api.client.WebResource$Builder.post(WebResource.java:570) ~[jery-client-1.19.1.jar:1.19.1]
9    at ansport.JeryReplicationClient.submitBatchUpdates(JeryReplicationClient.java:116) ~[eureka-core-1.7.2.jar:1.7.2]
10    at comflix.eureka.cluster.ReplicationTaskProcessor.process(ReplicationTaskProcessor.java:71) ~[eureka-core-1.7.2.jar:1.7.2]法语培训班哪家好
11    at comflix.eureka.util.batcher.TaskExecutors$BatchWorkerRunnable.run(TaskExecutors.java:187) [eureka-core-1.7.2.jar:1.7.2]
12    at java.lang.Thread.run(Thread.java:748) [na:1.8.0_202]
13 Caud by: org.ConnectTimeoutException: Connect to localhost:8761 timed out
14    at org.tSocket(PlainSocketFactory.java:123) ~[httpclient-4.5.8.jar:4.5.8]
15    at org.apache.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180) ~[httpclient-4.5.8.jar:4.5.8]
16    at org.apache.AbstractPoolEntry.open(AbstractPoolEntry.java:144) ~[httpclient-4.5.8.jar:4.5.8]
17    at org.apache.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:134) ~[httpclient-4.5.8.jar:4.5.8]
18    at org.apache.http.impl.Connect(DefaultRequestDirector.java:6英语完形填空及答案
idleness
05) ~[httpclient-4.5.8.jar:4.5.8]
19    at org.apache.http.impl.ute(DefaultRequestDirector.java:440) ~[httpclient-4.5.8.jar:4.5.8]
20    at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835) ~[httpclient-4.5.8.jar:4.5.8]
21    at org.apache.http.impl.ute(CloableHttpClient.java:118) ~[httpclient-4.5.8.jar:4.5.8]
22    at org.apache.http.impl.ute(CloableHttpClient.java:56) ~[httpclient-4.5.8.jar:4.5.8]
23    at com.sun.jery.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:173) ~[jery-apache-client4-1.19.1.jar:1.19.1]
24    ... 10 common frames omitted
疑问:我哪⾥根本没有使⽤到端⼝为:8761  的应⽤,经过⼀番百度查阅,终于让我找到答案了。原来问题出在EurekaClientConfigBean 这个类,源码如下:
1package org.springframework.cloudflix.eureka;
first day of my life
2import ...
3 @ConfigurationProperties("eureka.client")急遽的意思
4public class EurekaClientConfigBean implements EurekaClientConfig {
你从哪里来 英文5public static final String PREFIX = "eureka.client";
6public static final String DEFAULT_URL = "localhost:8761/eureka/";  // 问题的所在,原来 springcloud 源码这⾥定义了
7public static final String DEFAULT_ZONE = "defaultZone";
8private static final int MINUTES = 60;
9    @Autowired(
10        required = fal
11    )
12    .....
13public EurekaClientConfigBean() {
14this.rviceUrl.put("defaultZone", "localhost:8761/eureka/");
15this.gZipContent = true;
16this.uDnsForFetchingServiceUrls = fal;
18this.preferSameZoneEureka = true;
你是哪里人英文19this.availabilityZones = new HashMap();
20this.filterOnlyUpInstances = true;
21this.fetchRegistry = true;
22this.dollarReplacement = "_-";
勇敢英文23this.escapeCharReplacement = "__";
24this.allowRedirects = fal;
26this.clientDataAccept = EurekaAccept.full.name();
南宁翻译公司
27this.shouldUnregisterOnShutdown = true;
28this.shouldEnforceRegistrationAtInit = fal;
29    }
30    ...
31 }
解决⽅案:使⽤你的端⼝号去覆盖⾥⾯的端⼝,即:
sauceeureka.client.rvice-url.defaultZone=eureka1:5121/eureka/  // 写你的ip及端⼝

本文发布于:2023-07-12 18:23:21,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/90/175320.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:答案   翻译   百度
相关文章
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图