# Curl response giving "missing authentication token for REST request" despite xpack.security.enabled: false in config file

**URL:** <https://discuss.elastic.co/t/curl-response-giving-missing-authentication-token-for-rest-request-despite-xpack-security-enabled-false-in-config-file/202925>\
**Category:** Elasticsearch\
**Created:** [October 10, 2019, 12:20am UTC](https://discuss.elastic.co/t/curl-response-giving-missing-authentication-token-for-rest-request-despite-xpack-security-enabled-false-in-config-file/202925 "2019-10-10T00:20:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lschmid](https://avatars.discourse-cdn.com/v4/letter/l/5e9695/32.png) [@lschmid](https://discuss.elastic.co/u/lschmid)\
**Post date:** [October 10, 2019, 12:20am UTC](https://discuss.elastic.co/t/curl-response-giving-missing-authentication-token-for-rest-request-despite-xpack-security-enabled-false-in-config-file/202925/1 "2019-10-10T00:20:24Z")

</div>

I installed xpack on an elasticsearch instance, and now the output from any curl is:  
{  
"error" : {  
"root\_cause" : [  
{  
"type" : "security\_exception",  
"reason" : "missing authentication token for REST request [/?pretty]",  
"header" : {  
"WWW-Authenticate" : "Basic realm="security" charset="UTF-8""  
}  
}  
],  
"type" : "security\_exception",  
"reason" : "missing authentication token for REST request [/?pretty]",  
"header" : {  
"WWW-Authenticate" : "Basic realm="security" charset="UTF-8""  
}  
},  
"status" : 401  
}

I understand this has to do with xpack security, but xpack.security.enabled is set to false in the elasticsearch.yml file. I have restarted the cluster and the issue persists. Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![ikakavas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ikakavas/32/34430_2.png) [@ikakavas](https://discuss.elastic.co/u/ikakavas)\
**Post date:** [October 10, 2019, 7:04am UTC](https://discuss.elastic.co/t/curl-response-giving-missing-authentication-token-for-rest-request-despite-xpack-security-enabled-false-in-config-file/202925/2 "2019-10-10T07:04:12Z")

</div>

> [@lschmid](#):
>
> , but xpack.security.enabled is set to false in the elasticsearch.yml file.

Did you do this on all nodes ?

---

<div class="post-metadata">

**Author:** ![lschmid](https://avatars.discourse-cdn.com/v4/letter/l/5e9695/32.png) [@lschmid](https://discuss.elastic.co/u/lschmid)\
**Post date:** [October 10, 2019, 4:09pm UTC](https://discuss.elastic.co/t/curl-response-giving-missing-authentication-token-for-rest-request-despite-xpack-security-enabled-false-in-config-file/202925/3 "2019-10-10T16:09:43Z")

</div>

Yes, one cluster has two nodes both of which have xpack.security disabled in the yml file. Another cluster has a single node and is experiencing the same issue.

---

<div class="post-metadata">

**Author:** ![lschmid](https://avatars.discourse-cdn.com/v4/letter/l/5e9695/32.png) [@lschmid](https://discuss.elastic.co/u/lschmid)\
**Post date:** [October 10, 2019, 9:21pm UTC](https://discuss.elastic.co/t/curl-response-giving-missing-authentication-token-for-rest-request-despite-xpack-security-enabled-false-in-config-file/202925/4 "2019-10-10T21:21:08Z")

</div>

Wrong config files were being used. Thanks for your reply.

---

<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:** [November 7, 2019, 9:21pm UTC](https://discuss.elastic.co/t/curl-response-giving-missing-authentication-token-for-rest-request-despite-xpack-security-enabled-false-in-config-file/202925/5 "2019-11-07T21:21:13Z")

</div>

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