Setup-passwords ERROR: Unknown error

Hi all,

I recently installed elastic 6.2.2 with xpack.
I'm trying to set password to elastic user, but I got an Unknow error. There is no messages in cluster log.

[elastic@elastic]$ bin/x-pack/setup-passwords interactive -u http://10.27.0.2:9201

Unexpected response code [404] from calling GET http://10.27.0.2:9201/_xpack/security/_authenticate?pretty
Possible causes include:

  • The relative path of the URL is incorrect. Is there a proxy in-between?
  • The protocol (http/https) does not match the port.
  • Is this really an Elasticsearch server?

ERROR: Uknown error
[elastic@elastic]$ telnet 10.27.0.2 9201
Trying 10.27.0.2...
Connected to 10.27.0.2.
Escape character is '^]'.
^]
telnet> quit
Connection closed.
[elastic@elastic]$

Any advice on how to resolve it?

What gives:

curl http://10.27.0.2:9201/ 

And also

curl http://10.27.0.2:9201/_cat/plugins?v

And BTW why are you running on port 9201? Are you running 2 nodes on the same machine?

Hi,

That is the response of two requests:

[elastic@elastic ~]# curl http://10.27.0.2:9201/
{
"name" : "ELASTIC75",
"cluster_name" : "cluster_elastic_I",
"cluster_uuid" : "xZwkdYDvTZiH53u61MYg",
"version" : {
"number" : "6.2.2",
"build_hash" : "10b1edd",
"build_date" : "2018-02-16T19:01:30.685723Z",
"build_snapshot" : false,
"lucene_version" : "7.2.1",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
"tagline" : "You Know, for Search"
}
[elastic@elastic~]# curl http://10.27.0.2:9201/_cat/plugins?v
name component version
ELASTIC75 x-pack-core 6.2.2
ELASTIC75 x-pack-deprecation 6.2.2
ELASTIC75 x-pack-graph 6.2.2
ELASTIC75 x-pack-logstash 6.2.2
ELASTIC75 x-pack-ml 6.2.2
ELASTIC75 x-pack-monitoring 6.2.2
ELASTIC75 x-pack-security 6.2.2
ELASTIC75 x-pack-upgrade 6.2.2
ELASTIC75 x-pack-watcher 6.2.2
ELASTIC76 x-pack-core 6.2.2
ELASTIC76 x-pack-deprecation 6.2.2
ELASTIC76 x-pack-graph 6.2.2
ELASTIC76 x-pack-logstash 6.2.2
ELASTIC76 x-pack-ml 6.2.2
ELASTIC76 x-pack-monitoring 6.2.2
ELASTIC76 x-pack-security 6.2.2
ELASTIC76 x-pack-upgrade 6.2.2
ELASTIC76 x-pack-watcher 6.2.2

Home security recommendations (change default port to not standard port).

Thanks.

What is the output of:

curl http://10.27.0.2:9201/_xpack/security/_authenticate?pretty

?

[elastic@elastic ~]$ curl http://10.27.0.2:9201/_xpack/security/_authenticate?pretty
{
"error" : {
"root_cause" : [
{
"type" : "index_not_found_exception",
"reason" : "no such index",
"resource.type" : "index_expression",
"resource.id" : "_xpack",
"index_uuid" : "na",
"index" : "_xpack"
}
],
"type" : "index_not_found_exception",
"reason" : "no such index",
"resource.type" : "index_expression",
"resource.id" : "_xpack",
"index_uuid" : "na",
"index" : "_xpack"
},
"status" : 404
}

What does

curl http://10.27.0.2:9201/_xpack/

give you?

Hi Tim and David,

Finally I resolved reinstall whole cluster (elastic and xpack). I had moved elastic installation before problem and unfortunately something happened with data folder.
Your help was amazing.

Thanks.

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