Difference between revisions of "Curl https://localhost:9200/ nodes/status"
Jump to navigation
Jump to search
(2 intermediate revisions by the same user not shown) | |||
Line 76: | Line 76: | ||
}, | }, | ||
"status": 401 | "status": 401 | ||
− | } | + | } |
+ | |||
+ | |||
+ | |||
+ | == [[security_exception]] == | ||
+ | { | ||
+ | "error": { | ||
+ | "root_cause": [ | ||
+ | { | ||
+ | "type": "security_exception", | ||
+ | "reason": "action [cluster:monitor/health] is unauthorized for user [your-not-auth-user]" | ||
+ | } | ||
+ | ], | ||
+ | "type": "security_exception", | ||
+ | "reason": "action [cluster:monitor/health] is unauthorized for user [your-not-auth-user]" | ||
+ | }, | ||
+ | "status": 403 | ||
+ | } | ||
+ | |||
+ | |||
+ | {"error":{"root_cause":[{"type":"security_exception","reason":"[[unable to authenticate user]] [elastic] for REST request | ||
+ | [/_snapshot/your_repo/%3Csnapshot-%7Bnow%2Fd%7D%3E]","header":{"WWW-Authenticate":["Bearer realm=\"security\"","ApiKey","Basic realm=\"security\" | ||
+ | charset=\"UTF-8\""]}}],"type":"security_exception","reason":"unable to authenticate user [elastic] for REST request | ||
+ | [/_snapshot/your_repo/%3Csnapshot-%7Bnow%2Fd%7D%3E]","header":{"WWW-Authenticate":["Bearer realm=\"security\"","ApiKey","Basic realm=\"security\" | ||
+ | charset=\"UTF-8\""]}},"status":401} | ||
== See also == | == See also == |
Latest revision as of 14:45, 18 October 2022
curl https://localhost:9200/_nodes/status {"_nodes":{"total":0,"successful":0,"failed":0},"cluster_name":"docker-cluster","nodes":{}}
curl https://localhost:9200/_nodes/status | jq . { "_nodes": { "total": 0, "successful": 0, "failed": 0 }, "cluster_name": "elasticsearch", "nodes": {} }
Contents
Missing authentication credentials[edit]
kubectl -n your_namespace exec -ti your_elastic_pod1 -- /bin/sh -c "curl -k https://localhost:9200/_nodes/status" | jq . { "error": { "root_cause": [ { "type": "security_exception", "reason": "missing authentication credentials for REST request [/_nodes/status]", "header": { "WWW-Authenticate": [ "Bearer realm=\"security\"", "ApiKey", "Basic realm=\"security\" charset=\"UTF-8\"" ] } } ], "type": "security_exception", "reason": "missing authentication credentials for REST request [/_nodes/status]", "header": { "WWW-Authenticate": [ "Bearer realm=\"security\"", "ApiKey", "Basic realm=\"security\" charset=\"UTF-8\"" ] } }, "status": 401 }
Solution, add username and password to your request, It may be saved in your K8s secrets: curl --insecure https://localhost:9200/_nodes/status -u "your_usename:your_password"
unable to authenticate user[edit]
{
"error": { "root_cause": [ { "type": "security_exception", "reason": "unable to authenticate user [admin] for REST request [/_nodes/status]", "header": { "WWW-Authenticate": [ "Bearer realm=\"security\"", "ApiKey", "Basic realm=\"security\" charset=\"UTF-8\"" ] } } ], "type": "security_exception", "reason": "unable to authenticate user [admin] for REST request [/_nodes/status]", "header": { "WWW-Authenticate": [ "Bearer realm=\"security\"", "ApiKey", "Basic realm=\"security\" charset=\"UTF-8\"" ] } }, "status": 401 }
security_exception[edit]
{ "error": { "root_cause": [ { "type": "security_exception", "reason": "action [cluster:monitor/health] is unauthorized for user [your-not-auth-user]" } ], "type": "security_exception", "reason": "action [cluster:monitor/health] is unauthorized for user [your-not-auth-user]" }, "status": 403 }
{"error":{"root_cause":[{"type":"security_exception","reason":"unable to authenticate user [elastic] for REST request [/_snapshot/your_repo/%3Csnapshot-%7Bnow%2Fd%7D%3E]","header":{"WWW-Authenticate":["Bearer realm=\"security\"","ApiKey","Basic realm=\"security\" charset=\"UTF-8\""]}}],"type":"security_exception","reason":"unable to authenticate user [elastic] for REST request [/_snapshot/your_repo/%3Csnapshot-%7Bnow%2Fd%7D%3E]","header":{"WWW-Authenticate":["Bearer realm=\"security\"","ApiKey","Basic realm=\"security\" charset=\"UTF-8\""]}},"status":401}
See also[edit]
- Elasticsearch, installation, ELK, Elastic X-Pack,
elasticsearch.yml
, logs, ECK, Elasticsearch curl URLs, Elastisearch REST APIs,/_cat/, /_cluster/, /_xpack/
, QueryShardException, Elasticsearch index, ELK backup and restore,elasticsearch-cli
, Elasticsearch versions, ElasticSearch Snapshot Lifecycle Management (SLM), Low disk watermark, Elasticsearch storage, Elasticsearch users, Elasticsearch roles, search context, shards, Elastic Cloud, Elastic Licensing, ElasticSearch alerts, ESQL
Advertising: