现有集群新增加一个node节点,无法分片到新节点,一直是RELOCATING 状态。
环境信息:
es 1.7.2
java 1.8.0-45
centos 6.5 x86
已做的检查:
iptables 和selinux 已关闭
master和new node之间的网络没有问题,可以ping通,9200和9300 Telnet都没问题。
master日志里也能看到added 日志,但是就是分片无法同步。
确认分片功能是开着的。
es 的配置文件
cluster.name: data-cluster
node.name: "data-es-05"
#node.data: false
# Indexing & Cache config
index.number_of_shards: 5
index.number_of_replicas: 1
index.cache.field.type: soft
index.cache.field.expire: 10m
index.cache.query.enable: true
indices.cache.query.size: 2%
indices.fielddata.cache.size: 35%
indices.fielddata.cache.expire: 10m
index.search.slowlog.level: INFO
#indices.recovery.max_size_per_sec: 1gb
index.merge.scheduler.max_thread_count: 2 # Only for spinning media.
# Refresh config
index.refresh_interval: 300s
# Translog config
index.translog.flush_threshold_ops: 100000
# Paths config
path.data: /data/esData
path.plugins: /usr/share/elasticsearch/plugins
# Network And HTTP
network.bind_host: 10.0.126.203
network.publish_host: 10.0.126.203
transport.tcp.port: 9300
transport.tcp.compress: true
http.port: 9200
# Discovery
discovery.zen.minimum_master_nodes: 1
discovery.zen.ping.timeout: 10s
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["10.0.32.3:9300", "10.0.4.37:9300", "10.0.40.159:9300", "10.0.107.116:9300" , "10.0.126.203:9300"]
新节点的日志:
[2015-10-27 09:18:20,565][DEBUG][action.admin.cluster.state] [data-es-05] observer: timeout notification from cluster service. timeout setting [30s], time since start [30s]
[2015-10-27 09:18:20,589][DEBUG][action.admin.cluster.health] [data-es-05] observer: timeout notification from cluster service. timeout setting [30s], time since start [30s]
[2015-10-27 09:18:40,583][DEBUG][action.admin.cluster.state] [data-es-05] observer: timeout notification from cluster service. timeout setting [30s], time since start [30s]
[2015-10-27 09:18:40,583][DEBUG][action.admin.cluster.health] [data-es-05] observer: timeout notification from cluster service. timeout setting [30s], time since start [30s]
[2015-10-27 09:19:00,530][DEBUG][action.admin.indices.get ] [data-es-05] no known master node, scheduling a retry
[2015-10-27 09:19:03,962][DEBUG][action.admin.cluster.state] [data-es-05] no known master node, scheduling a retry
[2015-10-27 09:19:30,531][DEBUG][action.admin.indices.get ] [data-es-05] observer: timeout notification from cluster service. timeout setting [30s], time since start [30s]
[2015-10-27 09:19:33,963][DEBUG][action.admin.cluster.state] [data-es-05] observer: timeout notification from cluster service. timeout setting [30s], time since start [30s]
[2015-10-27 09:19:34,178][DEBUG][action.admin.indices.get ] [data-es-05] no known master node, scheduling a retry
[2015-10-27 09:20:04,178][DEBUG][action.admin.indices.get ] [data-es-05] observer: timeout notification from cluster service. timeout setting [30s], time since start [30s]
Master 节点日志
[2015-10-27 08:55:40,689][INFO ][cluster.service ] [data-es-01] added {[data-es-05][K1ffqB4zRCuufso-VrD9EA][data-es-05][inet[/10.0.126.203:9300]],}, reason: zen-disco-receive(join from node[[data-es-05][K1ffqB4zRCuufso-VrD9EA][data-es-05][inet[/10.0.126.203:9300]]])
确认Shard allocation是否successfully enabled
{
"acknowledged": true,
"persistent": {},
"transient": {
"cluster": {
"routing": {
"allocation": {
"enable": "all",
"disable_allocation": "false"
}
}
}
}
}