# Action.admin.indices.create failed to create

**URL:** <https://discuss.elastic.co/t/action-admin-indices-create-failed-to-create/17113>\
**Category:** Elasticsearch\
**Created:** [April 21, 2014, 5:37pm UTC](https://discuss.elastic.co/t/action-admin-indices-create-failed-to-create/17113 "2014-04-21T17:37:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![miki\_haiat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/miki_haiat/32/83361_2.png) [@miki\_haiat](https://discuss.elastic.co/u/miki_haiat)\
**Post date:** [April 21, 2014, 5:37pm UTC](https://discuss.elastic.co/t/action-admin-indices-create-failed-to-create/17113/1 "2014-04-21T17:37:39Z")

</div>

HI ,

I using elastic4s for an api client , i cant index anything  
im getting this error

[2014-04-21 20:34:02,735][DEBUG][action.admin.indices.create] [Captain UK]  
[] failed to create  
java.lang.StringIndexOutOfBoundsException: String index out of range: 0  
at java.lang.String.charAt(String.java:658)  
at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.  
validateIndexName(MetaDataCreateIndexService.java:168)  
at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validate(  
MetaDataCreateIndexService.java:523)  
at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.access$100  
(MetaDataCreateIndexService.java:87)  
at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$2.execute(  
MetaDataCreateIndexService.java:220)  
at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(  
InternalClusterService.java:308)  
at org.elasticsearch.common.util.concurrent.  
PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(  
PrioritizedEsThreadPoolExecutor.java:134)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.  
java:1145)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.  
java:615)  
at java.lang.Thread.run(Thread.java:745)

I tried several method and option but the result is the same ,

what im i doing wrong ??

thanks  
miki

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/70f69cec-12d0-4306-b0b1-11c703e8b507%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/70f69cec-12d0-4306-b0b1-11c703e8b507%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Binh\_Ly\_2](https://avatars.discourse-cdn.com/v4/letter/b/d07c76/32.png) [@Binh\_Ly\_2](https://discuss.elastic.co/u/Binh_Ly_2)\
**Post date:** [April 21, 2014, 9:50pm UTC](https://discuss.elastic.co/t/action-admin-indices-create-failed-to-create/17113/2 "2014-04-21T21:50:11Z")

</div>

I'm not familiar with elastic4s but it "seems" like you are trying to  
create an index and passing a blank string to it as the index name? Is that  
possible?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/01c071b4-e855-4e3c-997a-9749ea91c91c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/01c071b4-e855-4e3c-997a-9749ea91c91c%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [April 22, 2014, 6:06am UTC](https://discuss.elastic.co/t/action-admin-indices-create-failed-to-create/17113/3 "2014-04-22T06:06:58Z")

</div>

Hey,

from the elasticsearch exception it looks as if you did not specify an  
index name to create. Not sure how the scala client works..

--Alex

On Mon, Apr 21, 2014 at 7:37 PM, miki haiat [miko5054@gmail.com](mailto:miko5054@gmail.com) wrote:

> HI ,
> 
> I using elastic4s for an api client , i cant index anything  
> im getting this error
> 
> [2014-04-21 20:34:02,735][DEBUG][action.admin.indices.create] [Captain UK]  
> failed to create  
> java.lang.StringIndexOutOfBoundsException: String index out of range: 0  
> at java.lang.String.charAt(String.java:658)  
> at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.  
> validateIndexName(MetaDataCreateIndexService.java:168)  
> at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validate  
> (MetaDataCreateIndexService.java:523)  
> at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.  
> access$100(MetaDataCreateIndexService.java:87)  
> at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$2.  
> execute(MetaDataCreateIndexService.java:220)  
> at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.  
> run(InternalClusterService.java:308)  
> at org.elasticsearch.common.util.concurrent.  
> PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(  
> PrioritizedEsThreadPoolExecutor.java:134)  
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.  
> java:1145)  
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.  
> java:615)  
> at java.lang.Thread.run(Thread.java:745)
> 
> I tried several method and option but the result is the same ,
> 
> what im i doing wrong ??
> 
> thanks  
> miki
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/70f69cec-12d0-4306-b0b1-11c703e8b507%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/70f69cec-12d0-4306-b0b1-11c703e8b507%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/70f69cec-12d0-4306-b0b1-11c703e8b507%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/70f69cec-12d0-4306-b0b1-11c703e8b507%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAGCwEM9HOe4zXAo4uO0KWUeO5VNmEk4Nu%3DwayG0F10fpct\_SDw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGCwEM9HOe4zXAo4uO0KWUeO5VNmEk4Nu%3DwayG0F10fpct_SDw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![sksamuel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sksamuel/32/682_2.png) [@sksamuel](https://discuss.elastic.co/u/sksamuel)\
**Post date:** [August 4, 2014, 12:27am UTC](https://discuss.elastic.co/t/action-admin-indices-create-failed-to-create/17113/4 "2014-08-04T00:27:30Z")

</div>

Bit of a late reply as I never saw this, but like the other guys say,  
sounds like you're not specifying the index. What was the syntax you were  
using.

On Monday, April 21, 2014 6:37:39 PM UTC+1, miki haiat wrote:

> HI ,
> 
> I using elastic4s for an api client , i cant index anything  
> im getting this error
> 
> [2014-04-21 20:34:02,735][DEBUG][action.admin.indices.create] [Captain UK]  
> failed to create  
> java.lang.StringIndexOutOfBoundsException: String index out of range: 0  
> at java.lang.String.charAt(String.java:658)  
> at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.  
> validateIndexName(MetaDataCreateIndexService.java:168)  
> at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.validate  
> (MetaDataCreateIndexService.java:523)  
> at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.  
> access$100(MetaDataCreateIndexService.java:87)  
> at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$2.  
> execute(MetaDataCreateIndexService.java:220)  
> at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.  
> run(InternalClusterService.java:308)  
> at org.elasticsearch.common.util.concurrent.  
> PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(  
> PrioritizedEsThreadPoolExecutor.java:134)  
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.  
> java:1145)  
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.  
> java:615)  
> at java.lang.Thread.run(Thread.java:745)
> 
> I tried several method and option but the result is the same ,
> 
> what im i doing wrong ??
> 
> thanks  
> miki

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/8064b263-fcaa-47b2-a7ab-5e77717a59a7%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8064b263-fcaa-47b2-a7ab-5e77717a59a7%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:11am UTC](https://discuss.elastic.co/t/action-admin-indices-create-failed-to-create/17113/5 "2017-07-06T01:11:18Z")

</div>


