Error 401


(Keith Sanks) #1

running the following command:
curl -XGET http://elastic:changme@127.0.0.1:9200/bro-/_search?q= -d '
{
"sort": [{
"@timestamp": {
"order": "desc"
}
},
{
"_score": {
"order": "desc"
}
}
],
"size": 1
}
' | jq
I get the following returned:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 503 100 345 100 158 2828 1295 --:--:-- --:--:-- --:--:-- 2851
{
"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
}
I see that it is error 401, I haven't changed the default password, no data will get sent to elasticsearch because of this.
I've tried the following command but it doesn't seem to work:
curl -XPUT -u elastic 'localhost:9200/_xpack/security/user/elastic/_password' -d '{
"password" : "changeme"
}'


(Mark Walkom) #2

I think you are missing an e there.


(system) #3

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