# InternalServerError when trying to create index

**URL:** <https://discuss.elastic.co/t/internalservererror-when-trying-to-create-index/213132>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [December 27, 2019, 5:35am UTC](https://discuss.elastic.co/t/internalservererror-when-trying-to-create-index/213132 "2019-12-27T05:35:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kyuma-git](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@kyuma-git](https://discuss.elastic.co/u/kyuma-git)\
**Post date:** [December 27, 2019, 5:35am UTC](https://discuss.elastic.co/t/internalservererror-when-trying-to-create-index/213132/1 "2019-12-27T05:35:29Z")

</div>

~Environment~  
docker =\> [docker.elastic.co/elasticsearch/elasticsearch:7.1.0](http://docker.elastic.co/elasticsearch/elasticsearch:7.1.0)  
Rails =\> Version 5.1.7  
Gem =\>elasticsearch-model, elasticsearch-rails

I'm working on setting up Elasticsearch.  
but when I tryed to create index like this(Article. **elasticsearch**.create\_index! force: true), 500 error was happened.

This below is the full error sentences.

> Elasticsearch::Transport::Transport::Errors::InternalServerError: [500] {"error":{"root\_cause":[{"type":"class\_cast\_exception","reason":"java.lang.String cannot be cast to java.util.Map"}],"type":"class\_cast\_exception","reason":"java.lang.String cannot be cast to java.util.Map"},"status":500}  
> from /Users/kyuma.morita/Codes/apps/finc\_store/vendor/bundle/ruby/2.5.0/gems/elasticsearch-transport-7.4.0/lib/elasticsearch/transport/transport/base.rb:205:in `\_\_raise\_transport\_error'

Cluster health is "green" strangely...

Anyone know how to solve it?

---

<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:** [January 24, 2020, 5:35am UTC](https://discuss.elastic.co/t/internalservererror-when-trying-to-create-index/213132/2 "2020-01-24T05:35:36Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
