Elasticsearch:集群配置及异常解决

节点1
cluster.name: my-es

node.name: 154

transport.tcp.port: 9300

transport.tcp.compress: true

discovery.zen.ping.unicast.hosts: ["172.16.254.154:9300", "172.27.28.79:9300"] 

discovery.zen.minimum_master_nodes: 1

network.host: 172.16.254.154

http.port: 9200

http.cors.enabled: true 

http.cors.allow-origin: "*"
节点2
cluster.name: my-es

node.name: 79

transport.tcp.port: 9300

transport.tcp.compress: true

discovery.zen.ping.unicast.hosts: ["172.16.254.154:9300", "172.27.28.79:9300"] 

discovery.zen.minimum_master_nodes: 1

network.host: 172.27.28.79

http.port: 9200

http.cors.enabled: true 

http.cors.allow-origin: "*"

在这里插入图片描述

遇到的问题
rg.elasticsearch.transport.RemoteTransportException: [79][172.27.28.79:9300][internal:cluster/coordination/join]
Caused by: java.lang.IllegalStateException: failure when sending a validation request to node
	at org.elasticsearch.cluster.coordination.Coordinator$2.onFailure(Coordinator.java:514) ~[elasticsearch-7.7.0.jar:7.7.0]
	at org.elasticsearch.action.ActionListenerResponseHandler.handleException(ActionListenerResponseHandler.java:59) ~[elasticsearch-7.7.0.jar:7.7.0]
	at org.elasticsearch.transport.TransportService$ContextRestoreResponseHandler.handleException(TransportService.java:1139) ~[elasticsearch-7.7.0.jar:7.7.0]
	at org.elasticsearch.transport.TransportService$ContextRestoreResponseHandler.handleException(TransportService.java:1139) ~[elasticsearch-7.7.0.jar:7.7.0]
	at org.elasticsearch.transport.InboundHandler.lambda$handleException$2(InboundHandler.java:244) ~[elasticsearch-7.7.0.jar:7.7.0]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:633) ~[elasticsearch-7.7.0.jar:7.7.0]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[?:1.8.0_102]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[?:1.8.0_102]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_102]
Caused by: org.elasticsearch.transport.RemoteTransportException: [154][172.16.254.154:9300][internal:cluster/coordination/join/validate]
Caused by: org.elasticsearch.cluster.coordination.CoordinationStateRejectedException: join validation on cluster state with a different cluster uuid G060izKeRnuTDAW9hXbo9g than local cluster uuid 3WHAqO-IRI6wm3d0h8qfZA, rejecting
	at org.elasticsearch.cluster.coordination.JoinHelper.lambda$new$4(JoinHelper.java:153) ~[elasticsearch-7.7.0.jar:7.7.0]
	at org.elasticsearch.xpack.security.transport.SecurityServerTransportInterceptor$ProfileSecuredRequestHandler$1.doRun(SecurityServerTransportInterceptor.java:257) ~[?:?]
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) ~[elasticsearch-7.7.0.jar:7.7.0]
	at org.elasticsearch.xpack.security.transport.SecurityServerTransportInterceptor$ProfileSecuredRequestHandler.messageReceived(SecurityServerTransportInterceptor.java:315) ~[?:?]
	at org.elasticsearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:63) ~[elasticsearch-7.7.0.jar:7.7.0]
	at org.elasticsearch.transport.InboundHandler$RequestHandler.doRun(InboundHandler.java:264) ~[elasticsearch-7.7.0.jar:7.7.0]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:692) ~[elasticsearch-7.7.0.jar:7.7.0]
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) ~[elasticsearch-7.7.0.jar:7.7.0]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[?:1.8.0_102]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[?:1.8.0_102]
	at java.lang.Thread.run(Thread.java:745) ~[?:1.8.0_102]
[2020-06-04T11:29:14,178][INFO ][o.e.c.c.JoinHelper       ] [154] failed to join {79}{KaY5z8S6Sx26_0C_NAHCBA}{ynNMlEURQp2ULnw45t8pYw}{172.27.28.79}{172.27.28.79:9300}{dilmrt}{ml.machine_memory=4178505728, ml.max_open_jobs=20, xpack.installed=true, transform.node=true} with JoinRequest{sourceNode={154}{OFvixB0zQROD3DRCW92CPA}{VqSnY7qEQ5mwNQUgQvkjEA}{172.16.254.154}{172.16.254.154:9300}{dilmrt}{ml.machine_memory=4294500352, xpack.installed=true, transform.node=true, ml.max_open_jobs=20}, minimumTerm=10, optionalJoin=Optional.empty}
org.elasticsearch.transport.RemoteTransportException: [79][172.27.28.79:9300][internal:cluster/coordination/join]
Caused by: java.lang.IllegalStateException: failure when sending a validation request to node
	at org.elasticsearch.cluster.coordination.Coordinator$2.onFailure(Coordinator.java:514) ~[elasticsearch-7.7.0.jar:7.7.0]
	at org.elasticsearch.action.ActionListenerResponseHandler.handleException(ActionListenerResponseHandler.java:59) ~[elasticsearch-7.7.0.jar:7.7.0]
	at org.elasticsearch.transport.TransportService$ContextRestoreResponseHandler.handleException(TransportService.java:1139) ~[elasticsearch-7.7.0.jar:7.7.0]
	at org.elasticsearch.transport.TransportService$ContextRestoreResponseHandler.handleException(TransportService.java:1139) ~[elasticsearch-7.7.0.jar:7.7.0]
	at org.elasticsearch.transport.InboundHandler.lambda$handleException$2(InboundHandler.java:244) ~[elasticsearch-7.7.0.jar:7.7.0]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:633) ~[elasticsearch-7.7.0.jar:7.7.0]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[?:1.8.0_102]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[?:1.8.0_102]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_102]
Caused by: org.elasticsearch.transport.RemoteTransportException: [154][172.16.254.154:9300][internal:cluster/coordination/join/validate]
Caused by: org.elasticsearch.cluster.coordination.CoordinationStateRejectedException: join validation on cluster state with a different cluster uuid G060izKeRnuTDAW9hXbo9g than local cluster uuid 3WHAqO-IRI6wm3d0h8qfZA, rejecting
	at org.elasticsearch.cluster.coordination.JoinHelper.lambda$new$4(JoinHelper.java:153) ~[elasticsearch-7.7.0.jar:7.7.0]
	at org.elasticsearch.xpack.security.transport.SecurityServerTransportInterceptor$ProfileSecuredRequestHandler$1.doRun(SecurityServerTransportInterceptor.java:257) ~[?:?]
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) ~[elasticsearch-7.7.0.jar:7.7.0]
	at org.elasticsearch.xpack.security.transport.SecurityServerTransportInterceptor$ProfileSecuredRequestHandler.messageReceived(SecurityServerTransportInterceptor.java:315) ~[?:?]
	at org.elasticsearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:63) ~[elasticsearch-7.7.0.jar:7.7.0]
	at org.elasticsearch.transport.InboundHandler$RequestHandler.doRun(InboundHandler.java:264) ~[elasticsearch-7.7.0.jar:7.7.0]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:692) ~[elasticsearch-7.7.0.jar:7.7.0]
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) ~[elasticsearch-7.7.0.jar:7.7.0]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[?:1.8.0_102]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[?:1.8.0_102]
	at java.lang.Thread.run(Thread.java:745) ~[?:1.8.0_102]

因为该节点之前已经启动过,有历史数据没有清理,把该节点的data文件夹删了,再次启动就行。

  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 5
    评论
根据提供的引用内容,"org.elasticsearch.ElasticsearchStatusException: Elasticsearch exception Data too large"错误是由于数据大小超过了Elasticsearch的限制引起的[^1]。具体来说,错误信息中提到了"circuit_breaking_exception",这是Elasticsearch中的一种机制,用于防止节点过载。当数据大小超过了限制时,Elasticsearch会触发断路器并抛出此异常。 为了解决这个问题,可以尝试以下方法: 1. 增加Elasticsearch的限制:可以通过修改Elasticsearch配置文件来增加限制。具体来说,可以增加`indices.breaker.total.limit`和`indices.breaker.request.limit`的值,以适应更大的数据量。但是需要注意,增加限制可能会导致节点负载过高,因此需要根据实际情况进行调整。 2. 减少数据量:如果数据量超过了Elasticsearch的限制,可以考虑减少数据量。可以通过以下方法来减少数据量: - 分批处理数据:将大数据集分成多个较小的批次进行处理,以避免超过限制。 - 压缩数据:使用压缩算法对数据进行压缩,以减少数据的大小。 - 删除不必要的字段:如果数据中包含不必要的字段,可以考虑删除这些字段以减少数据量。 3. 增加Elasticsearch集群的规模:如果以上方法无法解决问题,可以考虑增加Elasticsearch集群的规模,以提供更多的资源来处理大数据量。 请注意,具体的解决方法可能因为你的具体情况而有所不同。建议根据实际情况选择适合的方法来解决问题。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值