报错如下:
2019-12-16 11:35:09.926 INFO [bootstrap,] 1 — [get_localhost-1] o.a.http.impl.client.DefaultHttpClient : I/O exception (java.net.SocketException) caught when processing request to {}->http://localhost:8761: Broken pipe (Write failed)
2019-12-16 11:35:09.926 INFO [bootstrap,] 1 — [get_localhost-1] o.a.http.impl.client.DefaultHttpClient : Retrying request to {}->http://localhost:8761
2019-12-16 11:35:09.928 ERROR [bootstrap,] 1 — [get_localhost-1] c.n.e.cluster.ReplicationTaskProcessor : Network level connection to peer localhost; retrying after delay
com.sun.jersey.api.client.ClientHandlerException: org.apache.http.client.ClientProtocolException
at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:187)
at com.netflix.eureka.cluster.DynamicGZIPContentEncodingFilter.handle(DynamicGZIPContentEncodingFilter.java:48)
at com.netflix.discovery.EurekaIdentityHeaderFilter.handle(EurekaIdentityHeaderFilter.java:27)
at com.sun.jersey.api.client.Client.handle(Client.java:652)
at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682)
at com.sun.jersey.api.client.WebResource.accessBuilder.post(WebResource.java:570)
at com.netflix.eureka.transport.JerseyReplicationClient.submitBatchUpdates(JerseyReplicationClient.java:116)
at com.netflix.eureka.cluster.ReplicationTaskProcessor.process(ReplicationTaskProcessor.java:71)
at com.netflix.eureka.util.batcher.TaskExecutorsInstanceInfoSerializer.serialize(EurekaJacksonCodec.java:366)
at org.springframework.cloud.netflix.eureka.server.CloudJacksonJsonCloudInstanceInfoSerializer.serialize(CloudJacksonJson.java:127)
at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:704)
at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:689)
at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:155)
at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serializeContents(IndexedListSerializer.java:119)
at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serialize(IndexedListSerializer.java:79)
at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serialize(IndexedListSerializer.java:18)
at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:704)
at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:689)
at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:155)
at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:292)
at com.fasterxml.jackson.databind.ObjectMapper._configAndWriteValue(ObjectMapper.java:3697)
at com.fasterxml.jackson.databind.ObjectMapper.writeValue(ObjectMapper.java:3030)
at com.netflix.discovery.converters.EurekaJacksonCodec.writeTo(EurekaJacksonCodec.java:192)
at org.springframework.cloud.netflix.eureka.server.CloudJacksonJson.encode(CloudJacksonJson.java:57)
at com.netflix.discovery.provider.DiscoveryJerseyProvider.writeTo(DiscoveryJerseyProvider.java:135)
at com.sun.jersey.api.client.RequestWriter$RequestEntityWriterImpl.writeRequestEntity(RequestWriter.java:231)
at com.sun.jersey.client.apache4.ApacheHttpClient4HandlerEntityWrapper.writeTo(EntityEnclosingRequestWrapper.java:110)
at org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerializer.java:118)
at org.apache.http.impl.AbstractHttpClientConnection.sendRequestEntity(AbstractHttpClientConnection.java:266)
at org.apache.http.impl.conn.AbstractClientConnAdapter.sendRequestEntity(AbstractClientConnAdapter.java:239)
at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:238)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:684)
… 15 common frames omitted
Suppressed: java.net.SocketException: Broken pipe (Write failed)
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
at org.apache.http.impl.io.AbstractSessionOutputBuffer.flushBuffer(AbstractSessionOutputBuffer.java:160)
at org.apache.http.impl.io.AbstractSessionOutputBuffer.flush(AbstractSessionOutputBuffer.java:168)
at org.apache.http.impl.io.ChunkedOutputStream.close(ChunkedOutputStream.java:203)
at com.fasterxml.jackson.core.json.UTF8JsonGenerator.close(UTF8JsonGenerator.java:1092)
at com.fasterxml.jackson.databind.util.ClassUtil.closeOnFailAndThrowAsIAE(ClassUtil.java:499)
at com.fasterxml.jackson.databind.ObjectMapper._configAndWriteValue(ObjectMapper.java:3699)
… 29 common frames omitted
2019-12-16 11:35:15.925 INFO [bootstrap,] 1 — [get_localhost-0] o.a.http.impl.client.DefaultHttpClient : I/O exception (java.net.SocketException) caught when processing request to {}->http://localhost:8761: Connection reset
2019-12-16 11:35:15.926 INFO [bootstrap,] 1 — [get_localhost-0] o.a.http.impl.client.DefaultHttpClient : Retrying request to {}->http://localhost:8761
2019-12-16 11:35:16.036 INFO [bootstrap,] 1 — [get_localhost-2] o.a.http.impl.client.DefaultHttpClient : I/O exception (java.net.SocketException) caught when processing request to {}->http://localhost:8761: Broken pipe (Write failed)
2019-12-16 11:35:16.037 INFO [bootstrap,] 1 — [get_localhost-2] o.a.http.impl.client.DefaultHttpClient : Retrying request to {}->http://localhost:8761
2019-12-16 11:35:16.147 INFO [bootstrap,] 1 — [get_localhost-4] o.a.http.impl.client.DefaultHttpClient : I/O exception (java.net.SocketException) caught when processing request to {}->http://localhost:8761: Connection reset
2019-12-16 11:35:16.147 INFO [bootstrap,] 1 — [get_localhost-4] o.a.http.impl.client.DefaultHttpClient : Retrying request to {}->http://localhost:8761
2019-12-16 11:35:16.258 INFO [bootstrap,] 1 — [get_localhost-3] o.a.http.impl.client.DefaultHttpClient : I/O exception (java.net.SocketException) caught when processing request to {}->http://localhost:8761: Connection reset
2019-12-16 11:35:16.258 INFO [bootstrap,] 1 — [get_localhost-3] o.a.http.impl.client.DefaultHttpClient : Retrying request to {}->http://localhost:8761
2019-12-16 11:35:16.369 INFO [bootstrap,] 1 — [get_localhost-6] o.a.http.impl.client.DefaultHttpClient : I/O exception (java.net.SocketException) caught when processing request to {}->http://localhost:8761: Broken pipe (Write failed)
2019-12-16 11:35:16.369 INFO [bootstrap,] 1 — [get_localhost-6] o.a.http.impl.client.DefaultHttpClient : Retrying request to {}->http://localhost:8761
2019-12-16 11:35:16.479 INFO [bootstrap,] 1 — [get_localhost-8] o.a.http.impl.client.DefaultHttpClient : I/O exception (java.net.SocketException) caught when processing request to {}->http://localhost:8761: Connection reset
2019-12-16 11:35:16.479 INFO [bootstrap,] 1 — [get_localhost-8] o.a.http.impl.client.DefaultHttpClient : Retrying request to {}->http://localhost:8761
2019-12-16 11:35:16.590 INFO [bootstrap,] 1 — [et_localhost-10] o.a.http.impl.client.DefaultHttpClient : I/O exception (java.net.SocketException) caught when processing request to {}->http://localhost:8761: Connection reset
2019-12-16 11:35:16.590 INFO [bootstrap,] 1 — [et_localhost-10] o.a.http.impl.client.DefaultHttpClient : Retrying request to {}->http://localhost:8761
2019-12-16 11:35:16.700 INFO [bootstrap,] 1 — [et_localhost-12] o.a.http.impl.client.DefaultHttpClient : I/O exception (java.net.SocketException) caught when processing request to {}->http://localhost:8761: Connection reset
2019-12-16 11:35:16.701 INFO [bootstrap,] 1 — [et_localhost-12] o.a.http.impl.client.DefaultHttpClient : Retrying request to {}->http://localhost:8761
2019-12-16 11:35:16.811 INFO [bootstrap,] 1 — [get_localhost-1] o.a.http.impl.client.DefaultHttpClient : I/O exception (java.net.SocketException) caught when processing request to {}->http://localhost:8761: Connection reset
2019-12-16 11:35:16.811 INFO [bootstrap,] 1 — [get_localhost-1] o.a.http.impl.client.DefaultHttpClient : Retrying request to {}->http://localhost:8761
2019-12-16 11:35:16.922 INFO [bootstrap,] 1 — [get_localhost-0] o.a.http.impl.client.DefaultHttpClient : I/O exception (java.net.SocketException) caught when processing request to {}->http://localhost:8761: Connection reset
2019-12-16 11:35:16.922 INFO [bootstrap,] 1 — [get_localhost-0] o.a.http.impl.client.DefaultHttpClient : Retrying request to {}->http://localhost:8761
2019-12-16 11:39:41.707 ERROR [bootstrap,] 1 — [et_localhost-13] c.n.e.cluster.ReplicationTaskProcessor : Batch update failure with HTTP status code 400; discarding 2 replication tasks
2019-12-16 11:39:41.707 WARN [bootstrap,] 1 — [et_localhost-13] c.n.eureka.util.batcher.TaskExecutors : Discarding 2 tasks of TaskBatchingWorker-target_localhost-13 due to permanent error
解决方案:
1、获取当前容器部署的eureka包,排查下eureka的bootstrap.yaml配置文件
2、bootstrap.yaml配置文件中是否包含如下标黄配置: