ES自动创建索引的问题

ES集群共5个data-node节点,若索引设置的分片数为5,number_of_replaces为1。我手动停掉一个data-node节点后,集群会变为red。当我重启关掉的data-node节点后,查看集群状态,集群会出现一些pending_tasks任务,任务中出现了一个优先级为URGENT的任务---creat_index。而这个创建的索引为类似0a580aa00ffb的索引(这样命名的索引应该不是我建的),之后pending_tasks出现了delete_index的任务(删除了类似0a580aa00ffb的索引),之后出现了put-mapping的任务(查看master日志,也是在put-mapping类似0a580aa00ffb的索引)。
我想问的是:类似0a580aa00ffb的索引为什么会创建?有什么作用?
 
截图:
 creat_index的任务

8.png

put-mapping的截图

9.png

请教
已邀请:

medcl - Elastic 🇨🇳 !

赞同来自:

curl http://localhost:9200/_cat/indices
 贴一下看看

sterne vencel - 90

赞同来自:

1.png

红框中的索引断定不是我建的,并且,我删除后,还是会自动新建这些索引
@medcl

jianjianhe

赞同来自:

你是不是在创建索引的时候,有节点下线,我之前遇到的问题是在三节点的es集群,执行创建索引操作,然后,在创建索引的过程中,让主节点和其中一个master_eligible节点下线,再重新启动集群,集群无法启动,日志如下:
我的数据时分磁盘存储,然后,就报其他磁盘数据没有写入,集群无法启动,es的版本是5.x,6.x也尝试过,创建索引过程中,让集群下线,而没有下线的节点几个盘正常写入,而下线的节点,就是报这个异常,不知道是否和你的一样
org.elasticsearch.bootstrap.StartupException: org.elasticsearch.common.inject.CreationException: Guice creation errors:

1) Error injecting constructor, ElasticsearchException[java.io.IOException: failed to read [id:1, legacy:false, file:/mnt/ssd2/data/elasticsearch5.6.4/nodes/0/indices/kxISsBneSLi_iVS2-_KPpA/_state/state-1.st]]; nested: IOException[failed to read [id:1, legacy:false, file:/mnt/ssd2/data/elasticsearch5.6.4/nodes/0/indices/kxISsBneSLi_iVS2-_KPpA/_state/state-1.st]]; nested: CorruptStateException[org.apache.lucene.index.CorruptIndexException: misplaced codec footer (file truncated?): length=0 but footerLength==16 (resource=SimpleFSIndexInput(path="/mnt/ssd2/data/elasticsearch5.6.4/nodes/0/indices/kxISsBneSLi_iVS2-_KPpA/_state/state-1.st"))]; nested: CorruptIndexException[misplaced codec footer (file truncated?): length=0 but footerLength==16 (resource=SimpleFSIndexInput(path="/mnt/ssd2/data/elasticsearch5.6.4/nodes/0/indices/kxISsBneSLi_iVS2-_KPpA/_state/state-1.st"))];
at org.elasticsearch.gateway.GatewayMetaState.<init>(Unknown Source)
while locating org.elasticsearch.gateway.GatewayMetaState
for parameter 4 at org.elasticsearch.gateway.GatewayService.<init>(Unknown Source)
while locating org.elasticsearch.gateway.GatewayService
Caused by: ElasticsearchException[java.io.IOException: failed to read [id:1, legacy:false, file:/mnt/ssd2/data/elasticsearch5.6.4/nodes/0/indices/kxISsBneSLi_iVS2-_KPpA/_state/state-1.st]]; nested: IOException[failed to read [id:1, legacy:false, file:/mnt/ssd2/data/elasticsearch5.6.4/nodes/0/indices/kxISsBneSLi_iVS2-_KPpA/_state/state-1.st]]; nested: CorruptStateException[org.apache.lucene.index.CorruptIndexException: misplaced codec footer (file truncated?): length=0 but footerLength==16 (resource=SimpleFSIndexInput(path="/mnt/ssd2/data/elasticsearch5.6.4/nodes/0/indices/kxISsBneSLi_iVS2-_KPpA/_state/state-1.st"))]; nested: CorruptIndexException[misplaced codec footer (file truncated?): length=0 but footerLength==16 (resource=SimpleFSIndexInput(path="/mnt/ssd2/data/elasticsearch5.6.4/nodes/0/indices/kxISsBneSLi_iVS2-_KPpA/_state/state-1.st"))];
at org.elasticsearch.ExceptionsHelper.maybeThrowRuntimeAndSuppress(ExceptionsHelper.java:150)
at org.elasticsearch.gateway.MetaDataStateFormat.loadLatestState(MetaDataStateFormat.java:334)
at org.elasticsearch.common.util.IndexFolderUpgrader.upgrade(IndexFolderUpgrader.java:90)
at org.elasticsearch.common.util.IndexFolderUpgrader.upgradeIndicesIfNeeded(IndexFolderUpgrader.java:128)
at org.elasticsearch.gateway.GatewayMetaState.<init>(GatewayMetaState.java:91)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.elasticsearch.common.inject.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:49)
at org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:86)
at org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:116)
at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:47)
at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:825)
at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:43)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:59)
at org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:50)
at org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
at org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)
at org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:116)
at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:47)
at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:825)
 at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:43)
at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:59)
at org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:50)
at org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:191)
at org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:183)
at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:818)
at org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:183)
at org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:173)
at org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:161)
at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:96)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:96)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:70)
at org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:42)
at org.elasticsearch.node.Node.<init>(Node.java:499)
at org.elasticsearch.node.Node.<init>(Node.java:245)
at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:233)
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:233)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:342)
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:132)
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:123)
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:70)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:134)
at org.elasticsearch.cli.Command.main(Command.java:90)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84)

medcl - Elastic 🇨🇳 !

赞同来自:

索引里面的数据拉出来看看,不可能无缘无故有新索引产生的。

zhangg7723

赞同来自:

这些自动创建的索引可能跟action.auto_create_index有关,有没有设置为false,我遇到过自动创建索引,生成的索引名称也很奇怪,好像是各种文件名。

要回复问题请先登录注册