# Missing authentication credentials for REST request \[/\_cluster/health?pretty\] In minimal security set up

**URL:** <https://discuss.elastic.co/t/missing-authentication-credentials-for-rest-request-cluster-health-pretty-in-minimal-security-set-up/278162>\
**Category:** Elasticsearch\
**Created:** [July 8, 2021, 9:36am UTC](https://discuss.elastic.co/t/missing-authentication-credentials-for-rest-request-cluster-health-pretty-in-minimal-security-set-up/278162 "2021-07-08T09:36:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mamol27](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mamol27/32/82016_2.png) [@Mamol27](https://discuss.elastic.co/u/Mamol27)\
**Post date:** [July 8, 2021, 9:36am UTC](https://discuss.elastic.co/t/missing-authentication-credentials-for-rest-request-cluster-health-pretty-in-minimal-security-set-up/278162/1 "2021-07-08T09:36:57Z")

</div>

Hi!  
I'm trying to set up basic security on elastic cluster.  
my elasticsearch.yml:

```auto
cluster.name: ELK-CLUSTER
node.name: $HOSTNAME
node.master: true
node.data: false
node.ingest: false
network.host: 0.0.0.0
http.port: 9200
discovery.seed_hosts: ["172.29.39.111", "172.29.39.112", "172.29.39.113", "172.29.39.114"]
cluster.initial_master_nodes: ["172.29.39.111", "172.29.39.112"]
action.auto_create_index: .monitoring*,.watches,.triggered_watches,.watcher-history*,.ml*
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true

```

I'm doing by this guide [Set up minimal security for Elasticsearch | Elasticsearch Guide [7.13] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-minimal-setup.html)  
But command  
`/usr/share/elasticsearch/bin/elasticsearch-setup-passwords auto`  
gets me

```auto
Failed to determine the health of the cluster running at http://172.29.39.111:9200
Unexpected response code [503] from calling GET http://172.29.39.111:9200/_cluster/health?pretty
Cause: master_not_discovered_exception

```

```auto
curl GET http://172.29.39.111:9200/_cluster/health?pretty
curl: (6) Could not resolve host: GET
{
  "error" : {
    "root_cause" : [
      {
        "type" : "security_exception",
        "reason" : "missing authentication credentials for REST request [/_cluster/health?pretty]",
        "header" : {
          "WWW-Authenticate" : "Basic realm=\"security\" charset=\"UTF-8\""
        }
      }
    ],
    "type" : "security_exception",
    "reason" : "missing authentication credentials for REST request [/_cluster/health?pretty]",
    "header" : {
      "WWW-Authenticate" : "Basic realm=\"security\" charset=\"UTF-8\""
    }
  },
  "status" : 401
}

```

So, if I correct understand, to install security, I need installed security?  
How to resolve this problem?  
Thank you.

---

<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 5, 2021, 9:37am UTC](https://discuss.elastic.co/t/missing-authentication-credentials-for-rest-request-cluster-health-pretty-in-minimal-security-set-up/278162/2 "2021-08-05T09:37:04Z")

</div>

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