X-Pack installation, does not seem to be creating indices


(Ajwillo) #1

Hi,

Im following the guide for installing x-pack https://www.elastic.co/guide/en/elasticsearch/reference/6.0/installing-xpack-es.html

but when it comes to generate the passwords I am met with error:

ubuntu@ip-10:~$ sudo /usr/share/elasticsearch/bin/x-pack/setup-passwords interactive

Unexpected response code [404] from calling GET http://127.0.0.1:9200/_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
ubuntu@ip-10:~$ curl http://127.0.0.1:9200/_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
}

I added the below to my Elasticsearch.yml, hoping to resolve the issues:
action.auto_create_index: .security,.monitoring*,.watches,.triggered_watches,.watcher-history*,.ml*,_,.
xpack.license.self_generated.type: basic

I then uninstalled x-pack with the purge option and re installed it again, with the same results

the indices do not seem to be created:

ubuntu@ip-10:~$ curl http://localhost:9200/_cat/indices?v
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
yellow open .kibana okhgXcGATfevshyWItKFYA 1 1 2 1 13.6kb 13.6kb
yellow open logstash-2017.12.12 _H_BED7-QsW9wuu0y9FBUA 5 1 370 0 688.7kb 688.7kb


(Ajwillo) #2

Can anyone point me n the right direction?


(Ioannis Kakavas) #3

Hi,

Can you please share the output of:

/usr/share/elasticsearch/bin/elasticsearch -V

/usr/share/elasticsearch/bin/elasticsearch-plugin list -v

so that we can take this further ?

Also, keep in mind that setting

xpack.license.self_generated.type: basic

will not allow you to use Security ( as the trial license would for a limited time ) since X-Pack Security is not part of the Basic License


(Ajwillo) #4

Hi,

I did think that in order for an index to be created data needs to be sent? so then do I need to do something else to send the data for x-pack?

ubuntu@ip-10:~$ sudo /usr/share/elasticsearch/bin/elasticsearch -V
Version: 6.0.1, Build: 601be4a/2017-12-04T09:29:09.525Z, JVM: 1.8.0_151
ubuntu@ip-10:~$ sudo /usr/share/elasticsearch/bin/elasticsearch-plugin list -v
Plugins directory: /usr/share/elasticsearch/plugins
x-pack
- Plugin information:
Name: x-pack
Description: Elasticsearch Expanded Pack Plugin
Version: 6.0.1
Native Controller: true
Requires Keystore: true
 * Classname: org.elasticsearch.xpack.XPackPlugin
ubuntu@ip-10:~$

(Ajwillo) #5

ive taken out the action.auto_create_index line completely and tried uninstall and re install again, no luck


Kibana 6.3 has Error 404 / X-Pack-Index not found after upgrade
(Tim Vernum) #7

This is almost certainly the cause of your problem.
Check the output of these two commands, but I expect to find security is not enabled, because you have a Basic license installed, which does not include support for security.

curl 'http://localhost:9200/_xpack?categories=features&pretty'

curl 'http://localhost:9200/_xpack/license'

(Ajwillo) #8

I removed that line the other day also and uninstalled/reinstalled, same issue. output from commands as per the below:

ubuntu@ip-10:~$ curl 'http://localhost:9200/_xpack?categories=features&pretty'
{
  "features" : {
    "graph" : {
      "description" : "Graph Data Exploration for the Elastic Stack",
      "available" : false,
      "enabled" : true
    },
    "logstash" : {
      "description" : "Logstash management component for X-Pack",
      "available" : false,
      "enabled" : true
    },
    "ml" : {
      "description" : "Machine Learning for the Elastic Stack",
      "available" : false,
      "enabled" : true,
      "native_code_info" : {
        "version" : "6.0.1",
        "build_hash" : "cee2d13e3e1fc5"
      }
    },
    "monitoring" : {
      "description" : "Monitoring for the Elastic Stack",
      "available" : true,
      "enabled" : true
    },
    "security" : {
      "description" : "Security for the Elastic Stack",
      "available" : false,
      "enabled" : false
    },
    "watcher" : {
      "description" : "Alerting, Notification and Automation for the Elastic Stack",
      "available" : false,
      "enabled" : true
    }
  },
  "tagline" : "You know, for X"
}
ubuntu@ip-10:~$ curl 'http://localhost:9200/_xpack/license'
{
  "license" : {
    "status" : "active",
    "uid" : "c62f70dd-290c-4dd5-a070-26b5727bfd2c",
    "type" : "basic",
    "issue_date" : "2017-12-13T12:09:56.699Z",
    "issue_date_in_millis" : 1513166996699,
    "expiry_date" : "2018-01-12T12:09:56.699Z",
    "expiry_date_in_millis" : 1515758996699,
    "max_nodes" : 1000,
    "issued_to" : "elasticsearch",
    "issuer" : "elasticsearch",
    "start_date_in_millis" : -1
  }
}

(Ioannis Kakavas) #9

By same issue, do you mean :

As mentioned before, Security is not a feature that is included in the Basic license, so generating passwords is not applicable. setup-passwords is a CLI tool for setting passwords for the X-Pack Security built-in users.

Do you have additional issues with your installation that are relevant to this ?


(Ajwillo) #10

Thanks, I understand now. I was following the guides and the guides do not say bypass this section if you do not want security.

ive now installed the rest of the plugins and I now have the monitoring installed.

Thanks for your help


(system) #11

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