Loading sample Database (json file) into the cluster

Hello Guys.
Pretty new to elasticsearch ...
I following this tutorial to learn the basics: Elasticsearch Reference - Exploring your data.

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 :smiley:

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

1 Like

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.

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