Elsticsearch 报错with the same id but is a different node instance解决办法
Posted 张志翔ۤ
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Elsticsearch 报错with the same id but is a different node instance解决办法相关的知识,希望对你有一定的参考价值。
搭建elsticsearch集群的时候,先用windows 10和 ubuntu 16.04试了一下,发现可以。然后将虚拟机里的ubunut复制一份,然后一直报错如下:
org.elasticsearch.transport.RemoteTransportException: [es-02-9200][192.168.181.133:9300][internal:cluster/coordination/join]
Caused by: java.lang.IllegalArgumentException: can't add node {es-03-9200}{u0OuBpikQu2rkkXTi1F17A}{XO55lVc_RTGiaPDUFJBSYw}{192.168.181.134}{192.168.181.134:9300}{cdhimrstw}{xpack.installed=true, transform.node=true}, found existing node {es-02-9200}{u0OuBpikQu2rkkXTi1F17A}{nr9-TzVhTQeRm5lvIXPAPQ}{192.168.181.133}{192.168.181.133:9300}{cdhimrstw}{xpack.installed=true, transform.node=true} with the same id but is a different node instance
at org.elasticsearch.cluster.node.DiscoveryNodes$Builder.add(DiscoveryNodes.java:621) ~[elasticsearch-7.11.1.jar:7.11.1]
at org.elasticsearch.cluster.coordination.JoinTaskExecutor.execute(JoinTaskExecutor.java:141) ~[elasticsearch-7.11.1.jar:7.11.1]
at org.elasticsearch.cluster.coordination.JoinHelper$1.execute(JoinHelper.java:122) ~[elasticsearch-7.11.1.jar:7.11.1]
at org.elasticsearch.cluster.service.MasterService.executeTasks(MasterService.java:691) ~[elasticsearch-7.11.1.jar:7.11.1]
at org.elasticsearch.cluster.service.MasterService.calculateTaskOutputs(MasterService.java:313) ~[elasticsearch-7.11.1.jar:7.11.1]
at org.elasticsearch.cluster.service.MasterService.runTasks(MasterService.java:208) ~[elasticsearch-7.11.1.jar:7.11.1]
at org.elasticsearch.cluster.service.MasterService.access$000(MasterService.java:62) ~[elasticsearch-7.11.1.jar:7.11.1]
at org.elasticsearch.cluster.service.MasterService$Batcher.run(MasterService.java:140) ~[elasticsearch-7.11.1.jar:7.11.1]
at org.elasticsearch.cluster.service.TaskBatcher.runIfNotProcessed(TaskBatcher.java:139) ~[elasticsearch-7.11.1.jar:7.11.1]
at org.elasticsearch.cluster.service.TaskBatcher$BatchedTask.run(TaskBatcher.java:177) ~[elasticsearch-7.11.1.jar:7.11.1]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:673) ~[elasticsearch-7.11.1.jar:7.11.1]
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:241) ~[elasticsearch-7.11.1.jar:7.11.1]
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:204) ~[elasticsearch-7.11.1.jar:7.11.1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) ~[?:?]
at java.lang.Thread.run(Thread.java:832) [?:?]
然后百度发现问题,是因为复制虚拟机时,elsticsearch时,将elsticsearch文件夹下的data文件夹一并复制了。而在前面测试时,data文件夹下已经产生了data数据,于是报上面的错误。
解决办法:删除elsticsearch文件夹下的data文件夹下的节点数据
binggo!
以上是关于Elsticsearch 报错with the same id but is a different node instance解决办法的主要内容,如果未能解决你的问题,请参考以下文章
SpringBoot报错“To display the auto-configuration report re-run your application with ‘debug‘ enabled.“
springboot启动报错退出,To display the conditions report re-run your application with 'debug' enabl
Hibernate更新数据报错:a different object with the same identifier value was already associated with the se
后台报错 No row with the given identifier exists
PHP Problem with the SSL CA cert (path? access rights?)
Vue报错:3 errors and 0 warnings potentially fixable with the `--fix` option.