Can't delete index by "curl -XDELETE" with Xpack security enabled "failed to authenticate user [elastic]"

Hi! I'm new in Elastic, and can miss something. Can anyone help me?
I have single node cluster with Xpack security enabled.

I can get cluster health

# curl --user elastic:passwd http://127.0.0.1:9200/_cluster/health?pretty
{
  "cluster_name" : "docker-cluster",
  "status" : "yellow",
  "timed_out" : false,
  "number_of_nodes" : 1,
  "number_of_data_nodes" : 1,
  "active_primary_shards" : 9,
  "active_shards" : 9,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 1,
  "delayed_unassigned_shards" : 0,
  "number_of_pending_tasks" : 0,
  "number_of_in_flight_fetch" : 0,
  "task_max_waiting_in_queue_millis" : 0,
  "active_shards_percent_as_number" : 90.0
}

I can view indexes

# curl --user elastic:passwd http://127.0.0.1:9200/_cat/indices?v
health status index                            uuid                   pri rep docs.count docs.deleted store.size pri.store.size
green  open   .security-7                      NtHhN8k4QnWF0P8QDUZLqQ   1   0         42            1     87.9kb         87.9kb
green  open   .monitoring-es-7-2020.05.29      2svVwBPyQKWSJ2CreFvZAQ   1   0       7346         5457      4.5mb          4.5mb
green  open   .apm-custom-link                 bd1Dm5laT7mSC1NjtDwkkg   1   0          0            0       208b           208b
green  open   .kibana_task_manager_1           4ftH2wOiRquWq8w_NIoWVA   1   0          5            0     69.8kb         69.8kb
green  open   .apm-agent-configuration         yyR7dCr2RtykuOhswUIw3Q   1   0          0            0       208b           208b
yellow open   filebeat-7.7.0-2020.05.28-000001 aIZgukKqTnivjLdWt6KtYA   1   1        200            0    231.4kb        231.4kb
green  open   .kibana_1                        dNdySKVpQCWswPkBYWU52w   1   0         30            1     61.8kb         61.8kb
green  open   .monitoring-kibana-7-2020.05.29  gnrMXl8MS6aFysPchh1DAg   1   0        141            0    133.3kb        133.3kb

But i can't delete index

# curl --user elastic:passwd -XDELETE http://127.0.0.1:9200/filebeat-7.7.0-2020.05.28-000001
{"error":{"root_cause":[{"type":"security_exception","reason":"failed to authenticate user [elastic]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}}],"type":"security_exception","reason":"failed to authenticate user [elastic]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}},"status":401}

What's wrong ?

You get a 401 which means we couldn't authenticate the user elastic. Is that password correct ( and the same you use above? ) ? Is there anything printed in the logs at that time ?

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