After elasticsearch out the 5.2.1 version, try the use of its new version to test for future upgrades.
Unfortunately, in the process of installation encountered a pit, that is, the Elasticsearch-head plug-in after installing X-pack Plug-ins can not be used, because the elastic company in X-pack added a security module (safety mechanism), The following situation will appear, as shown in figure:
This time need to add the following several lines of configuration in elasticseach.yml to solve.
Http.cors.enabled:true
Http.cors.allow-origin: ' * '
Http.cors.allow-headers: "Authorization"
Then, each time you use the head plugin, type in the following format:
Http://localhost:9100/?auth_user=elastic&auth_password=changeme "
Where elastic is the default account, Changeme is the initial password, can be modified in the X-pack plug-in.
Then you can use the head plugin properly:
If you restart Elasticsearch, you receive the following error:
Exception in thread ' main ' settingsexception[failed to load settings from [ELASTICSEARCH.YML]]; Nested:elasticsearchparseexception[malformed, expected settings to start with ' object ', instead is [value_string]];
It means that there is no space before and after the colon of the parameter, and after that, I've been looking for this question for a long time .
This time please do not check this configuration file on the server vim, but download the file to the local, using the editing tools such as atom to compare the official original configuration file. The problem has been in the pit for a long time.
Reference Address: Https://github.com/mobz/elasticsearch-head#url-parameters