四個(gè)節(jié)點(diǎn)兔跌,有兩個(gè)是新增加的節(jié)點(diǎn)座享,兩個(gè)老節(jié)點(diǎn)間組成集群沒(méi)有問(wèn)題,新增加了兩個(gè)節(jié)點(diǎn)龄减,無(wú)論是四個(gè)組成集群
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when new node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
discovery.zen.ping.unicast.hosts: ["10.96.91.208","10.96.91.209","10.96.91.210","10.96.91.211"]
#
# Prevent the "split brain" by configuring the majority of nodes (total number of master-eligible nodes / 2 + 1):
#
discovery.zen.minimum_master_nodes: 3
#
# For more information, consult the zen discovery module documentation.
#
---------------------
還是兩個(gè)節(jié)點(diǎn)集群(新舊搭配)
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when new node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
discovery.zen.ping.unicast.hosts: ["10.96.91.208","10.96.91.210"]
#
# Prevent the "split brain" by configuring the majority of nodes (total number of master-eligible nodes / 2 + 1):
#
discovery.zen.minimum_master_nodes: 2
#
# For more information, consult the zen discovery module documentation.
---------------------
都是有問(wèn)題项钮,報(bào)錯(cuò)內(nèi)容如下
[2017-10-11T13:30:38,240][WARN ][o.e.n.Node ] [node-03] timed out while waiting for initial discovery state - timeout: 30s
[2017-10-11T13:30:38,254][INFO ][o.e.h.n.Netty4HttpServerTransport] [node-03] publish_address {10.96.91.210:9200}, bound_addresses {10.96.91.210:9200}
[2017-10-11T13:30:38,259][INFO ][o.e.n.Node? ? ? ? ? ? ? ] [node-03] started
[2017-10-11T13:30:41,301][WARN ][o.e.d.z.ZenDiscovery? ? ] [node-03] failed to connect to master [{node-01}{VwK2Mm2hSDy4avASCpZt5w}{PMslvo9XSRWYESBXqPwz1w}{10.96.91.208}{10.96.91.208:9300}], retrying...
org.elasticsearch.transport.ConnectTransportException: [node-01][10.96.91.208:9300] connect_timeout[30s]
? ? at org.elasticsearch.transport.netty4.Netty4Transport.connectToChannels(Netty4Transport.java:361) ~[?:?]
? ? at org.elasticsearch.transport.TcpTransport.openConnection(TcpTransport.java:549) ~[elasticsearch-5.4.3.jar:5.4.3]
? ? at org.elasticsearch.transport.TcpTransport.connectToNode(TcpTransport.java:473) ~[elasticsearch-5.4.3.jar:5.4.3]
? ? at org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:315) ~[elasticsearch-5.4.3.jar:5.4.3]
? ? at org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:302) ~[elasticsearch-5.4.3.jar:5.4.3]
? ? at org.elasticsearch.discovery.zen.ZenDiscovery.joinElectedMaster(ZenDiscovery.java:468) [elasticsearch-5.4.3.jar:5.4.3]
? ? at org.elasticsearch.discovery.zen.ZenDiscovery.innerJoinCluster(ZenDiscovery.java:420) [elasticsearch-5.4.3.jar:5.4.3]
? ? at org.elasticsearch.discovery.zen.ZenDiscovery.access$4100(ZenDiscovery.java:83) [elasticsearch-5.4.3.jar:5.4.3]
? ? at org.elasticsearch.discovery.zen.ZenDiscovery$JoinThreadControl$1.run(ZenDiscovery.java:1197) [elasticsearch-5.4.3.jar:5.4.3]
? ? at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:569) [elasticsearch-5.4.3.jar:5.4.3]
? ? at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_101]
? ? at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_101]
? ? at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101]
Caused by: io.netty.channel.ConnectTimeoutException: connection timed out: 10.96.91.208/10.96.91.208:9300
? ? at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe$1.run(AbstractNioChannel.java:267) ~[?:?]
? ? at io.netty.util.concurrent.PromiseTask$RunnableAdapter.call(PromiseTask.java:38) ~[?:?]
? ? at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:120) ~[?:?]
? ? at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) ~[?:?]
? ? at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:403) ~[?:?]
? ? at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:462) ~[?:?]
? ? at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) ~[?:?]
? ? ... 1 more
查看日志,可以發(fā)現(xiàn)是網(wǎng)絡(luò)問(wèn)題希停。
排查網(wǎng)絡(luò)
網(wǎng)卡的網(wǎng)絡(luò)配置
cd /etc/sysconfig/network/
more ifcfg-eth0
網(wǎng)絡(luò)路由配置
more routes
網(wǎng)關(guān)配置
more /etc/resolv.conf
這些配置四臺(tái)服務(wù)器基本都是一樣的烁巫。所以不是配置問(wèn)題
繼續(xù)檢查ping 和 traceroute
ping沒(méi)有問(wèn)題
traceroute顯示不一樣,發(fā)現(xiàn)有了一個(gè)空跳宠能。懷疑是防火墻的問(wèn)題
查看防火墻的狀態(tài)
chkconfig --list|grep fire
關(guān)閉防火墻
cd /etc/init.d/
./SuSEfirewall2_setup stop
./SuSEfirewall2_init stop
開機(jī)關(guān)閉防火墻
chkconfig SuSEfirewall2_setup off
chkconfig SuSEfirewall2_init off
至此亚隙,解決問(wèn)題