# Loading sample Database (json file) into the cluster

**URL:** <https://discuss.elastic.co/t/loading-sample-database-json-file-into-the-cluster/130617>\
**Category:** Elasticsearch\
**Created:** [May 4, 2018, 11:36am UTC](https://discuss.elastic.co/t/loading-sample-database-json-file-into-the-cluster/130617 "2018-05-04T11:36:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vanyali](https://avatars.discourse-cdn.com/v4/letter/v/c68b51/32.png) [@Vanyali](https://discuss.elastic.co/u/Vanyali)\
**Post date:** [May 4, 2018, 11:36am UTC](https://discuss.elastic.co/t/loading-sample-database-json-file-into-the-cluster/130617/1 "2018-05-04T11:36:55Z")

</div>

Hello Guys.  
Pretty new to elasticsearch ...  
I following this tutorial to learn the basics: [Elasticsearch Reference - Exploring your data](https://www.elastic.co/guide/en/elasticsearch/reference/current/_exploring_your_data.html).

I cannot load that document into elasticsearch.

I am using prompt command line and i thought that was the problem, so then i install git bash and didn´t work either,

On command line after i basically copy paste:

curl -H "Content-Type: application/json" -XPOST "localhost:9200/bank/\_doc/\_bulk?pretty&refresh" --data-binary "@accounts.json"  
curl "localhost:9200/\_cat/indices?v"

This error shows up:

"error" : {  
"root\_cause" : [  
{  
"type" : "security\_exception",  
"reason" : "missing authentication token for REST request [/bank/\_doc/\_bulk?pretty&refresh]",  
"header" : {  
"WWW-Authenticate" : "Basic realm="security" charset="UTF-8""  
}  
}  
],  
"type" : "security\_exception",  
"reason" : "missing authentication token for REST request [/bank/\_doc/\_bulk?pretty&refresh]",  
"header" : {  
"WWW-Authenticate" : "Basic realm="security" charset="UTF-8""  
}  
},  
"status" : 401  
}

* * *

Sorry, my english sucks too 😃

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 4, 2018, 11:52am UTC](https://discuss.elastic.co/t/loading-sample-database-json-file-into-the-cluster/130617/2 "2018-05-04T11:52:59Z")

</div>

You probably installed xpack which might have activated security.

So you need to use the login/password you set I believe.  
I'm moving your question to #x-pack

---

<div class="post-metadata">

**Author:** ![Vanyali](https://avatars.discourse-cdn.com/v4/letter/v/c68b51/32.png) [@Vanyali](https://discuss.elastic.co/u/Vanyali)\
**Post date:** [May 4, 2018, 1:48pm UTC](https://discuss.elastic.co/t/loading-sample-database-json-file-into-the-cluster/130617/3 "2018-05-04T13:48:15Z")

</div>

Thaank´s, that´s right.  
Just uninstall x-pack and it worked fine.

For now i just wanna follow tutorial, later i will learn x-pack. Thanks alot.

---

<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:** [June 1, 2018, 1:48pm UTC](https://discuss.elastic.co/t/loading-sample-database-json-file-into-the-cluster/130617/4 "2018-06-01T13:48:29Z")

</div>

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