# Authentical failed while i did curl -XGET http://localhost:9200

**URL:** <https://discuss.elastic.co/t/authentical-failed-while-i-did-curl-xget-http-localhost-9200/95019>\
**Category:** Elasticsearch\
**Created:** [July 28, 2017, 10:13pm UTC](https://discuss.elastic.co/t/authentical-failed-while-i-did-curl-xget-http-localhost-9200/95019 "2017-07-28T22:13:27Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![shroh](https://avatars.discourse-cdn.com/v4/letter/s/74df32/32.png) [@shroh](https://discuss.elastic.co/u/shroh)\
**Post date:** [July 28, 2017, 10:13pm UTC](https://discuss.elastic.co/t/authentical-failed-while-i-did-curl-xget-http-localhost-9200/95019/1 "2017-07-28T22:13:27Z")

</div>

I have newly setup the ELK stack on a single EC2 instance. I am getting the following error when i am doing a CURL to check the ES status. Although the output is pretty long. But this should give an idea on whats happening. In the elastic.yml file i have defined 0.0.0.0 for network.host. but still doesnt work. I have even tried localhost:9200 which also doesnt work.

 Exception details: Your credentials could not be authenticated: "Credentials are missing.". You will not be permitted access until your credentials can be verified.

---

<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:** [July 29, 2017, 1:14am UTC](https://discuss.elastic.co/t/authentical-failed-while-i-did-curl-xget-http-localhost-9200/95019/2 "2017-07-29T01:14:57Z")

</div>

Did you install x-pack?

---

<div class="post-metadata">

**Author:** ![shroh](https://avatars.discourse-cdn.com/v4/letter/s/74df32/32.png) [@shroh](https://discuss.elastic.co/u/shroh)\
**Post date:** [July 29, 2017, 1:54pm UTC](https://discuss.elastic.co/t/authentical-failed-while-i-did-curl-xget-http-localhost-9200/95019/3 "2017-07-29T13:54:46Z")

</div>

No I didnt , is it required to get rid of this problem.

---

<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:** [July 29, 2017, 4:48pm UTC](https://discuss.elastic.co/t/authentical-failed-while-i-did-curl-xget-http-localhost-9200/95019/4 "2017-07-29T16:48:28Z")

</div>

No. So I don't understand where this message is coming from.

May be explain exactly your architecture, what you installed, how...

---

<div class="post-metadata">

**Author:** ![shroh](https://avatars.discourse-cdn.com/v4/letter/s/74df32/32.png) [@shroh](https://discuss.elastic.co/u/shroh)\
**Post date:** [July 30, 2017, 4:01am UTC](https://discuss.elastic.co/t/authentical-failed-while-i-did-curl-xget-http-localhost-9200/95019/6 "2017-07-30T04:01:01Z")

</div>

I killed that EC2 instance and spin up a new instance on which ELK stack is installed. But when i start the logstash instance i get this error:

[root@IP logstash]# systemctl status logstash -l  
â logstash.service - logstash  
Loaded: loaded (/etc/systemd/system/logstash.service; disabled; vendor preset: disabled)  
Active: active (running) since Sun 2017-07-30 03:52:10 UTC; 2s ago  
Main PID: 1246 (java)  
CGroup: /system.slice/logstash.service  
ââ1246 /usr/bin/java -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+DisableExplicitGC -Djava.awt.headless=true -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError -Xmx4g -Xms1g -Xss2048k -Djffi.boot.library.path=/usr/share/logstash/vendor/jruby/lib/jni -Xbootclasspath/a:/usr/share/logstash/vendor/jruby/lib/jruby.jar -classpath : -Djruby.home=/usr/share/logstash/vendor/jruby -Djruby.lib=/usr/share/logstash/vendor/jruby/lib -Djruby.script=jruby -Djruby.shell=/bin/sh org.jruby.Main /usr/share/logstash/lib/bootstrap/environment.rb logstash/runner.rb --path.settings /etc/logstash

Jul 30 03:52:10 IP systemd[1]: Started logstash.  
Jul 30 03:52:10 IP systemd[1]: Starting logstash...

---

<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:** [July 30, 2017, 7:20am UTC](https://discuss.elastic.co/t/authentical-failed-while-i-did-curl-xget-http-localhost-9200/95019/7 "2017-07-30T07:20:48Z")

</div>

I don't see an error.

May be move your question to #logstash room if it's not related to elasticsearch ?

---

<div class="post-metadata">

**Author:** ![shroh](https://avatars.discourse-cdn.com/v4/letter/s/74df32/32.png) [@shroh](https://discuss.elastic.co/u/shroh)\
**Post date:** [July 30, 2017, 2:39pm UTC](https://discuss.elastic.co/t/authentical-failed-while-i-did-curl-xget-http-localhost-9200/95019/8 "2017-07-30T14:39:08Z")

</div>

Yes i was wrong this is not the error, but when i do curl -XGET [http://localhost:9200](http://localhost:9200) i get the below error

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

FYI, i have installed XPACK.

---

<div class="post-metadata">

**Author:** ![shroh](https://avatars.discourse-cdn.com/v4/letter/s/74df32/32.png) [@shroh](https://discuss.elastic.co/u/shroh)\
**Post date:** [July 30, 2017, 2:52pm UTC](https://discuss.elastic.co/t/authentical-failed-while-i-did-curl-xget-http-localhost-9200/95019/9 "2017-07-30T14:52:09Z")

</div>

Finally i was able to read your other posts for securing XPACK, and changing the password for default users. i will close this post. Thanks for your help 🙂

---

<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:** [August 27, 2017, 2:52pm UTC](https://discuss.elastic.co/t/authentical-failed-while-i-did-curl-xget-http-localhost-9200/95019/10 "2017-08-27T14:52:09Z")

</div>

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