elasticsearch 6.3 两个进程运行在两台机子上,有一台一直报错,failed to connect master
Elasticsearch | 作者 chiwei | 发布于2018年06月21日 | 阅读数:8864
elasticsearch 6.3 两个进程运行在两台机子上,有一台一直报错,failed to connect master
[2018-06-21T17:35:25,745][WARN ][o.e.d.z.ZenDiscovery ] [node-2] failed to connect to master [{node-1}{2NatnUW7TACr5yWDxpGUMQ}{XUw0TyukQKmks9XQLRxucw}{172.28.16.100}{172.28.16.100:9300}{ml.machine_memory=8254550016, ml.max_open_jobs=20, xpack.installed=true, ml.enabled=true}], retrying...
org.elasticsearch.transport.ConnectTransportException: [node-1][172.28.16.100:9300] connect_exception
at org.elasticsearch.transport.TcpChannel.awaitConnected(TcpChannel.java:165) ~[elasticsearch-6.3.0.jar:6.3.0]
at org.elasticsearch.transport.TcpTransport.openConnection(TcpTransport.java:631) ~[elasticsearch-6.3.0.jar:6.3.0]
at org.elasticsearch.transport.TcpTransport.connectToNode(TcpTransport.java:530) ~[elasticsearch-6.3.0.jar:6.3.0]
at org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:331) ~[elasticsearch-6.3.0.jar:6.3.0]
at org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:318) ~[elasticsearch-6.3.0.jar:6.3.0]
at org.elasticsearch.discovery.zen.ZenDiscovery.joinElectedMaster(ZenDiscovery.java:509) [elasticsearch-6.3.0.jar:6.3.0]
at org.elasticsearch.discovery.zen.ZenDiscovery.innerJoinCluster(ZenDiscovery.java:477) [elasticsearch-6.3.0.jar:6.3.0]
at org.elasticsearch.discovery.zen.ZenDiscovery.access$2500(ZenDiscovery.java:90) [elasticsearch-6.3.0.jar:6.3.0]
at org.elasticsearch.discovery.zen.ZenDiscovery$JoinThreadControl$1.run(ZenDiscovery.java:1247) [elasticsearch-6.3.0.jar:6.3.0]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:625) [elasticsearch-6.3.0.jar:6.3.0]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_151]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_151]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
Caused by: io.netty.channel.AbstractChannel$AnnotatedSocketException: Connection reset by peer: 172.28.16.100/172.28.16.100:9300
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[?:?]
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) ~[?:?]
at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:323) ~[?:?]
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:340) ~[?:?]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:633) ~[?:?]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:545) ~[?:?]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:499) ~[?:?]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459) ~[?:?]
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) ~[?:?]
... 1 more
Caused by: java.net.SocketException: Connection reset by peer
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[?:?]
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) ~[?:?]
at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:323) ~[?:?]
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:340) ~[?:?]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:633) ~[?:?]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:545) ~[?:?]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:499) ~[?:?]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459) ~[?:?]
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) ~[?:?]
... 1 more
配置已经改过N次了,两台始终有一台报这个错
cluster.name: cluster1
node.name: node-2
path.data: /home/chiwei/es/es_data
path.logs: /home/chiwei/es/es_log
network.host: 172.28.16.105
bootstrap.system_call_filter: false
discovery.zen.ping.unicast.hosts: ["172.28.16.100", "172.28.16.105"]
[2018-06-21T17:35:25,745][WARN ][o.e.d.z.ZenDiscovery ] [node-2] failed to connect to master [{node-1}{2NatnUW7TACr5yWDxpGUMQ}{XUw0TyukQKmks9XQLRxucw}{172.28.16.100}{172.28.16.100:9300}{ml.machine_memory=8254550016, ml.max_open_jobs=20, xpack.installed=true, ml.enabled=true}], retrying...
org.elasticsearch.transport.ConnectTransportException: [node-1][172.28.16.100:9300] connect_exception
at org.elasticsearch.transport.TcpChannel.awaitConnected(TcpChannel.java:165) ~[elasticsearch-6.3.0.jar:6.3.0]
at org.elasticsearch.transport.TcpTransport.openConnection(TcpTransport.java:631) ~[elasticsearch-6.3.0.jar:6.3.0]
at org.elasticsearch.transport.TcpTransport.connectToNode(TcpTransport.java:530) ~[elasticsearch-6.3.0.jar:6.3.0]
at org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:331) ~[elasticsearch-6.3.0.jar:6.3.0]
at org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:318) ~[elasticsearch-6.3.0.jar:6.3.0]
at org.elasticsearch.discovery.zen.ZenDiscovery.joinElectedMaster(ZenDiscovery.java:509) [elasticsearch-6.3.0.jar:6.3.0]
at org.elasticsearch.discovery.zen.ZenDiscovery.innerJoinCluster(ZenDiscovery.java:477) [elasticsearch-6.3.0.jar:6.3.0]
at org.elasticsearch.discovery.zen.ZenDiscovery.access$2500(ZenDiscovery.java:90) [elasticsearch-6.3.0.jar:6.3.0]
at org.elasticsearch.discovery.zen.ZenDiscovery$JoinThreadControl$1.run(ZenDiscovery.java:1247) [elasticsearch-6.3.0.jar:6.3.0]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:625) [elasticsearch-6.3.0.jar:6.3.0]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_151]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_151]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
Caused by: io.netty.channel.AbstractChannel$AnnotatedSocketException: Connection reset by peer: 172.28.16.100/172.28.16.100:9300
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[?:?]
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) ~[?:?]
at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:323) ~[?:?]
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:340) ~[?:?]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:633) ~[?:?]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:545) ~[?:?]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:499) ~[?:?]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459) ~[?:?]
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) ~[?:?]
... 1 more
Caused by: java.net.SocketException: Connection reset by peer
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[?:?]
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) ~[?:?]
at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:323) ~[?:?]
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:340) ~[?:?]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:633) ~[?:?]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:545) ~[?:?]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:499) ~[?:?]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459) ~[?:?]
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) ~[?:?]
... 1 more
配置已经改过N次了,两台始终有一台报这个错
cluster.name: cluster1
node.name: node-2
path.data: /home/chiwei/es/es_data
path.logs: /home/chiwei/es/es_log
network.host: 172.28.16.105
bootstrap.system_call_filter: false
discovery.zen.ping.unicast.hosts: ["172.28.16.100", "172.28.16.105"]
5 个回复
bellengao - 博客: https://www.jianshu.com/u/e0088e3e2127
赞同来自: chiwei
chiwei
赞同来自:
chiwei
赞同来自:
cluster.name: esCluster
node.name: node1
path.data: /home/es/data
path.logs: /home/es/log
network.host: 172.28.16.100
http.port: 9200
transport.tcp.port: 9300
script.allowed_types: inline
script.allowed_contexts: search, update
node.master: true
node.data: true
#禁用swapping
bootstrap.memory_lock: true
bootstrap.system_call_filter: false
#thread_pool.index.size: 15
thread_pool.index.queue_size: 500
#添加防脑裂配置
#discovery.zen.ping_timeout: 120s
discovery.zen.minimum_master_nodes: 2
discovery.zen.ping.unicast.hosts: ["172.28.16.100", "172.28.16.105", "172.28.16.72"]
#单机多实例设置,默认为1
#node.max_local_storage_nodes: 1
#单机多实例时需添加下面配置,表示允许检查防止同一主机多个实例分配同一分片
#cluster.routing.allocation.same_shard.host: true
#不启用x-pack安全认证
xpack.security.enabled: false
我用了这个配置还是一样的错,连不上,哎,感觉是不是我的操作系统问题啊,719259043 qq
交流下,大神
Leeeo - 90后IT男
赞同来自:
xiong
赞同来自:
network.host: 0.0.0.0下加一行
network.publish_host:你的ip地址