Elasticse启动报错-java.lang.IllegalStateException: failure when sending a validation request to node

匆匆过客 提交于 2020-01-07 09:17:10

【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>>

  1. 报错问题描述:
[2019-09-04T17:51:32,265][INFO ][o.e.c.c.JoinHelper       ] [node18701] failed to join {node9701}{rh-c4DTFSsCr3fPYYAhGdQ}{UZxODZrbRey6NRl2gDBwiw}{192.168.1.97}{192.168.1.97:9301}{dim}{ml.machine_memory=8072921088, ml.max_open_jobs=20, xpack.installed=true} with JoinRequest{sourceNode={node18701}{Pj07gNlcRI6PVPZHBLYpkA}{14QtIqnJTVGXV7IyUbtyeA}{192.168.1.187}{192.168.1.187:9301}{di}{ml.machine_memory=8072921088, xpack.installed=true, ml.max_open_jobs=20}, optionalJoin=Optional[Join{term=6, lastAcceptedTerm=1, lastAcceptedVersion=1, sourceNode={node18701}{Pj07gNlcRI6PVPZHBLYpkA}{14QtIqnJTVGXV7IyUbtyeA}{192.168.1.187}{192.168.1.187:9301}{di}{ml.machine_memory=8072921088, xpack.installed=true, ml.max_open_jobs=20}, targetNode={node9701}{rh-c4DTFSsCr3fPYYAhGdQ}{UZxODZrbRey6NRl2gDBwiw}{192.168.1.97}{192.168.1.97:9301}{dim}{ml.machine_memory=8072921088, ml.max_open_jobs=20, xpack.installed=true}}]}
org.elasticsearch.transport.RemoteTransportException: [node9701][192.168.1.97:9301][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:506) ~[elasticsearch-7.3.0.jar:7.3.0]
	at org.elasticsearch.cluster.coordination.JoinHelper$5.handleException(JoinHelper.java:360) ~[elasticsearch-7.3.0.jar:7.3.0]
	at org.elasticsearch.transport.TransportService$ContextRestoreResponseHandler.handleException(TransportService.java:1111) ~[elasticsearch-7.3.0.jar:7.3.0]
	at org.elasticsearch.transport.TransportService$ContextRestoreResponseHandler.handleException(TransportService.java:1111) ~[elasticsearch-7.3.0.jar:7.3.0]
	at org.elasticsearch.transport.InboundHandler.lambda$handleException$2(InboundHandler.java:246) ~[elasticsearch-7.3.0.jar:7.3.0]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:688) ~[elasticsearch-7.3.0.jar:7.3.0]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
	at java.lang.Thread.run(Thread.java:835) [?:?]
Caused by: org.elasticsearch.transport.RemoteTransportException: [node18701][192.168.1.187:9301][internal:cluster/coordination/join/validate]
Caused by: org.elasticsearch.cluster.coordination.CoordinationStateRejectedException: join validation on cluster state with a different cluster uuid y9vTIlpmRo6FDJdktnL6lQ than local cluster uuid PQGXcj-NQ_K_GfIJlzu_0g, rejecting
	at org.elasticsearch.cluster.coordination.JoinHelper.lambda$new$4(JoinHelper.java:148) ~[elasticsearch-7.3.0.jar:7.3.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.3.0.jar:7.3.0]
	at org.elasticsearch.xpack.security.transport.SecurityServerTransportInterceptor$ProfileSecuredRequestHandler.messageReceived(SecurityServerTransportInterceptor.java:315) ~[?:?]
	at org.elasticsearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:63) ~[elasticsearch-7.3.0.jar:7.3.0]
	at org.elasticsearch.transport.InboundHandler$RequestHandler.doRun(InboundHandler.java:267) ~[elasticsearch-7.3.0.jar:7.3.0]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:758) ~[elasticsearch-7.3.0.jar:7.3.0]
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) ~[elasticsearch-7.3.0.jar:7.3.0]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
	at java.lang.Thread.run(Thread.java:835) ~[?:?]

  1. 原因

该节点之前已经启动过,有历史数据没有清理;

  1. 解决方法

查看/config/elasticsearch.yml文件中配置的path.data目录,进入该目录并删除。重新启动即可

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!