你可以的,加油

ElasticSearch的错误:java.io.IOException: 远程主机强迫关闭了一个现有的连接。

Elasticsearch | 作者 xiaohei | 发布于2016年05月20日 | 阅读数:16926

过程描述:正在往ES中写数据,一台电脑启动了三个节点;
发现了这个错误;
节点0和节点1的日志显示
[2016-05-20 10:50:03,003][WARN ][transport.netty          ] [node1] exception caught on transport layer [[id: 0x031bfd13, /127.0.0.1:2582 => /127.0.0.1:9301]], closing connection
java.io.IOException: 远程主机强迫关闭了一个现有的连接。
    at sun.nio.ch.SocketDispatcher.read0(Native Method)
    at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)
    at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
    at sun.nio.ch.IOUtil.read(IOUtil.java:192)
    at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:384)
    at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:64)
    at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)
    at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)
    at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)
    at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
    at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
    at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
[2016-05-20 10:58:55,940][INFO ][cluster.service          ] [node1] removed {[node2][P9bsD9ktRt2D1uLl6nUK8Q][server2][inet[/127.0.0.1:9302]]{master=true},}, reason: zen-disco-node_left([node2][P9bsD9ktRt2D1uLl6nUK8Q][server2][inet[/127.0.0.1:9302]]{master=true})
[2016-05-20 10:58:58,362][INFO ][bootstrap                ] running graceful exit on windows
[2016-05-20 10:58:58,362][INFO ][node                     ] [node1] stopping ...
[2016-05-20 10:58:58,440][INFO ][node                     ] [node1] stopped
[2016-05-20 10:58:58,440][INFO ][node                     ] [node1] closing ...
[2016-05-20 10:58:58,440][INFO ][node                     ] [node1] closed

节点2的日志显示
[2016-05-20 10:50:03,003][WARN ][transport.netty          ] [node2] exception caught on transport layer [[id: 0x927fc9e5, /127.0.0.1:2566 => /127.0.0.1:9302]], closing connection
java.io.IOException: 远程主机强迫关闭了一个现有的连接。
    at sun.nio.ch.SocketDispatcher.read0(Native Method)
    at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)
    at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
    at sun.nio.ch.IOUtil.read(IOUtil.java:192)
    at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:384)
    at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:64)
    at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)
    at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)
    at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)
    at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
    at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
    at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
[2016-05-20 10:58:55,925][INFO ][bootstrap                ] running graceful exit on windows
[2016-05-20 10:58:55,925][INFO ][node                     ] [node2] stopping ...
[2016-05-20 10:58:56,003][INFO ][node                     ] [node2] stopped
[2016-05-20 10:58:56,003][INFO ][node                     ] [node2] closing ...
[2016-05-20 10:58:56,018][INFO ][node                     ] [node2] closed

 
之前,节点2被踢出集群,很快能连接上;接下来一直有这么个错误,导致真个集群不能继续存储数据;
 
 
已邀请:

medcl - 今晚打老虎。

赞同来自:

服务器内存和es的内存配置各是多少,es的配置要不贴一下吧

要回复问题请先登录注册