I have a 3 nodes cluster with 1 primary shards on 1 node and 1 replica on each other node.
My index has a name and an alias "current".
I am bulk inserting into the master only via the alias name "current".
That's working just fine. When my test kills the master in order to check failover,
the next time I try to bulk insert I get Invalid index name [current], already exists as alias:
ERROR 2017-12-11 11:22:23,310 [EventPublisher~i58] :
ElasticManagementClient(ElasticManagementClient.create:290) - failure in bulk
execution:
[0]: index [current], type [events], id [349], message
[RemoteTransportException[[node-1][172.16.65.157:9300][indices:admin/create]];
nested: InvalidIndexNameException[Invalid index name [current], already exists as
alias];]
OK. Do you set the minimum_master_node setting? I'm curious why the node that received an indexing command for the current index/alias decided it needs to reach out to the master to create the index. Normally it should know the alias exist because it's part of the cluster.
Thanks @Alex_Davidovich. This is a two layered bug. First there should not be an attempt to create an index before the node fully joined the cluster. On top of that, once such an attempt fails, it shouldn't fail the indexing operation. We will open an issue and fix this. Thanks for bringing it up!
Thank you but I think that I don't fully understand.
First of all, I am trying to index a document and not create an index. So why is ES trying to create one? In addition, do you think that a sleep + retry will be enough yo bypass the problem? Is there a way to figure out that ES is failing over via API?
This is a bug. I presume you restart the master? When the node starts up it forgets what it had and needs to rejoin the cluster. Any indexing during that period will run into this problem
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.