I have ElasticSearch installed on Windows (through the MSI package). I installed it to run manually (not as a Window Service). When I run /bin/ElasticSearch.exe I am getting:
C:\Program Files\Elastic\Elasticsearch\6.2.4\bin>elasticsearch.exe
[2018-05-29T20:01:36,112][INFO ][o.e.n.Node ]
[MSEDGEWIN10] initializing ... [2018-05-29T20:01:36,299][INFO ][o.e.e.NodeEnvironment ]
[MSEDGEWIN10] using [1] data paths, mounts [[Windows 10 (C:)]], net usable_space [59.3gb], net total_space [97.6gb], types [NTFS] [2018-05-29T20:01:36,299][INFO ][o.e.e.NodeEnvironment ] [MSEDGEWIN10] heap size [1.9gb], compressed ordinary object pointers [true] [2018-05-29T20:01:36,455][INFO ][o.e.n.Node ] [MSEDGEWIN10] node name [MSEDGEWIN10], node ID [J5yTqffaR9K43tavP87CIQ] [2018-05-29T20:01:36,455][INFO ][o.e.n.Node ] [MSEDGEWIN10] version[6.2.4], pid[6912], build[ccec39f/2018-04-12T20:37:28.497551Z], OS[Windows 10/10.0/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0_171/25.171-b11] [2018-05-29T20:01:36,455][INFO ][o.e.n.Node ] [MSEDGEWIN10] JVM arguments [-XX:+UseConcMarkSweepGC,
-XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.io.tmpdir=${ES_TMPDIR}, -XX:+HeapDumpOnOutOfMemoryError, -Xmx2048m, -Xms2048m, -Delasticsearch, -Des.path.home=C:\Program Files\Elastic\Elasticsearch\6.2.4,
-Des.path.conf=C:\ProgramData\Elastic\Elasticsearch\config] [2018-05-29T20:01:43,752][INFO ][o.e.p.PluginsService ] [MSEDGEWIN10] loaded module [aggs-matrix-stats] [2018-05-29T20:01:43,752][INFO ][o.e.p.PluginsService ] [MSEDGEWIN10] loaded module [analysis-common] [2018-05-29T20:01:43,752][INFO ][o.e.p.PluginsService ] [MSEDGEWIN10] loaded module [ingest-common] [2018-05-29T20:01:43,752][INFO ][o.e.p.PluginsService ] [MSEDGEWIN10] loaded module [lang-expression] [2018-05-29T20:01:43,752][INFO ][o.e.p.PluginsService ] [MSEDGEWIN10] loaded module [lang-mustache] [2018-05-29T20:01:43,752][INFO ][o.e.p.PluginsService ] [MSEDGEWIN10] loaded module [lang-painless] [2018-05-29T20:01:43,752][INFO ][o.e.p.PluginsService ] [MSEDGEWIN10] loaded module [mapper-extras] [2018-05-29T20:01:43,752][INFO ][o.e.p.PluginsService ] [MSEDGEWIN10] loaded module [parent-join] [2018-05-29T20:01:43,752][INFO ][o.e.p.PluginsService ] [MSEDGEWIN10] loaded module [percolator] [2018-05-29T20:01:43,752][INFO ][o.e.p.PluginsService ] [MSEDGEWIN10] loaded module [rank-eval] [2018-05-29T20:01:43,752][INFO ][o.e.p.PluginsService ] [MSEDGEWIN10] loaded module [reindex] [2018-05-29T20:01:43,752][INFO ][o.e.p.PluginsService ] [MSEDGEWIN10] loaded module [repository-url] [2018-05-29T20:01:43,752][INFO ][o.e.p.PluginsService ] [MSEDGEWIN10] loaded module [transport-netty4] [2018-05-29T20:01:43,752][INFO ][o.e.p.PluginsService ] [MSEDGEWIN10] loaded module [tribe] [2018-05-29T20:01:43,752][INFO ][o.e.p.PluginsService ] [MSEDGEWIN10] no plugins loaded [2018-05-29T20:01:54,940][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [MSEDGEWIN10] uncaught exception in thread [main] org.elasticsearch.bootstrap.StartupException: java.lang.IllegalArgumentException: unknown secure setting [bootstrap.password] please check that any required plugins are installed, or check the breaking changes documentation for removed settings
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:125) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-6.2.4.jar:6.2.4]
at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:85) ~[elasticsearch-6.2.4.jar:6.2.4] Caused by: java.lang.IllegalArgumentException: unknown secure setting [bootstrap.password] please check that any required plugins are installed, or check the breaking changes documentation for removed settings
at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:346) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:310) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:284) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.common.settings.SettingsModule.<init>(SettingsModule.java:134) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.node.Node.<init>(Node.java:331) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.node.Node.<init>(Node.java:246) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:213) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:213) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:323) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) ~[elasticsearch-6.2.4.jar:6.2.4]
... 6 more
You can fix this by removing bootstrap.password from the elasticsearch keystore by navigating to the installation home directory and running
bin/elasticsearch-keystore.bat remove bootstrap.password
Elasticsearch will now start when running elasticsearch.exe.
Please open an issue on the Windows Installer GitHub repository to discuss, as bootstrap.password should only be set in the keystore when X-Pack plugin is installed. I would like to understand more about how you installed and what installation parameters were passed, which would be better to discuss by opening a GitHub issue :)
Out of everything in your log, here is the main error:
[2018-05-29T20:01:54,940][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [MSEDGEWIN10] uncaught exception in thread [main] org.elasticsearch.bootstrap.StartupException: java.lang.IllegalArgumentException: unknown secure setting [bootstrap.password] please check that any required plugins are installed, or check the breaking changes documentation for removed settings.
Try to start elasticsearch with the following option:
bin/elasticsearch -E xpack.security.authc.accept_default_password=false
EDIT: This didn't help. Did you do clean install or this is re-installation?
Try to setup passwords manually:
bin/elasticsearch-keystore add "bootstrap.password"
If you do not have any keystore, here is simple how-to:
https://www.elastic.co/guide/en/elasticsearch/reference/6.2/secure-settings.html
Related
I want a local ElasticSearch instance on my macOS laptop.
I used mac OS 10.14 and installed elasticsearch 7.4.1
I had to switch off the machine learning option
in elasticsearch.yml
xpack.ml.enabled: false
But when launching ES I get the error (see full output below)
java.lang.IllegalStateException: The index [[shakespeare/pMFJ_hE1QMmRowj3bZNctA]] was created with version [5.6.3] but the minimum compatible version is [6.0.0-beta1]. It should be re-indexed in Elasticsearch 6.x before upgrading to 7.4.1.
I was using JDK9, and upgraded to JDK11, but the same error came.
Should I reverse to an older version of ES?
UPDATE :
As I could not get rid of the old ES version, I went for a local installation without the package manager
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.4.1-darwin-x86_64.tar.gz.sha512
tar -vxf elasticsearch-7.4.1-darwin-x86_64.tar.gz
cd elasticsearch-7.4.1-darwin-x86_64
./bin/elasticsearch
which works.
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
[2019-10-29T10:50:10,017][WARN ][o.e.c.l.LogConfigurator ] [Lavies-MacBook-Air.local] Some logging configurations have %marker but don't have %node_name. We will automatically add %node_name to the pattern to ease the migration for users who customize log4j2.properties but will stop this behavior in 7.0. You should manually replace `%node_name` with `[%node_name]%marker ` in these locations:
/usr/local/etc/elasticsearch/log4j2.properties
[2019-10-29T10:50:10,857][INFO ][o.e.e.NodeEnvironment ] [Lavies-MacBook-Air.local] using [1] data paths, mounts [[/ (/dev/disk1s1)]], net usable_space [14.9gb], net total_space [233.5gb], types [apfs]
[2019-10-29T10:50:10,858][INFO ][o.e.e.NodeEnvironment ] [Lavies-MacBook-Air.local] heap size [1.9gb], compressed ordinary object pointers [true]
[2019-10-29T10:50:10,910][INFO ][o.e.n.Node ] [Lavies-MacBook-Air.local] node name [Lavies-MacBook-Air.local], node ID [6pD7fhIETZWe5vZPxO6YHg], cluster name [elasticsearch_lavieestuntoucan]
[2019-10-29T10:50:10,911][INFO ][o.e.n.Node ] [Lavies-MacBook-Air.local] version[7.4.1], pid[2966], build[default/tar/fc0eeb6e2c25915d63d871d344e3d0b45ea0ea1e/2019-10-22T17:16:35.176724Z], OS[Mac OS X/10.14.5/x86_64], JVM[AdoptOpenJDK/OpenJDK 64-Bit Server VM/13/13+33]
[2019-10-29T10:50:10,911][INFO ][o.e.n.Node ] [Lavies-MacBook-Air.local] JVM home [/usr/local/Cellar/elasticsearch-full/7.4.1/libexec/jdk/Contents/Home]
[2019-10-29T10:50:10,912][INFO ][o.e.n.Node ] [Lavies-MacBook-Air.local] JVM arguments [-Xms2g, -Xmx2g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -Djdk.io.permissionsUseCanonicalPath=true, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Dlog4j.skipJansi=true, -XX:+HeapDumpOnOutOfMemoryError, -Dio.netty.allocator.type=pooled, -XX:MaxDirectMemorySize=1073741824, -Des.path.home=/usr/local/Cellar/elasticsearch-full/7.4.1/libexec, -Des.path.conf=/usr/local/etc/elasticsearch, -Des.distribution.flavor=default, -Des.distribution.type=tar, -Des.bundled_jdk=true]
[2019-10-29T10:50:14,586][INFO ][o.e.p.PluginsService ] [Lavies-MacBook-Air.local] loaded module [aggs-matrix-stats]
[2019-10-29T10:50:14,587][INFO ][o.e.p.PluginsService ] [Lavies-MacBook-Air.local] loaded module [analysis-common]
[2019-10-29T10:50:14,587][INFO ][o.e.p.PluginsService ] [Lavies-MacBook-Air.local] loaded module [data-frame]
[2019-10-29T10:50:14,587][INFO ][o.e.p.PluginsService ] [Lavies-MacBook-Air.local] loaded module [flattened]
[2019-10-29T10:50:14,587][INFO ][o.e.p.PluginsService ] [Lavies-MacBook-Air.local] loaded module [frozen-indices]
[2019-10-29T10:50:14,588][INFO ][o.e.p.PluginsService ] [Lavies-MacBook-Air.local] loaded module [ingest-common]
[2019-10-29T10:50:14,588][INFO ][o.e.p.PluginsService ] [Lavies-MacBook-Air.local] loaded module [ingest-geoip]
[2019-10-29T10:50:14,588][INFO ][o.e.p.PluginsService ] [Lavies-MacBook-Air.local] loaded module [ingest-user-agent]
[2019-10-29T10:50:14,588][INFO ][o.e.p.PluginsService ] [Lavies-MacBook-Air.local] loaded module [lang-expression]
[2019-10-29T10:50:14,588][INFO ][o.e.p.PluginsService ] [Lavies-MacBook-Air.local] loaded module [lang-mustache]
[2019-10-29T10:50:14,589][INFO ][o.e.p.PluginsService ] [Lavies-MacBook-Air.local] loaded module [lang-painless]
[2019-10-29T10:50:14,589][INFO ][o.e.p.PluginsService ] [Lavies-MacBook-Air.local] loaded module [mapper-extras]
[2019-10-29T10:50:14,589][INFO ][o.e.p.PluginsService ] [Lavies-MacBook-Air.local] loaded module [parent-join]
[2019-10-29T10:50:14,589][INFO ][o.e.p.PluginsService ] [Lavies-MacBook-Air.local] loaded module [percolator]
[2019-10-29T10:50:14,590][INFO ][o.e.p.PluginsService ] [Lavies-MacBook-Air.local] loaded module [rank-eval]
[2019-10-29T10:50:14,590][INFO ][o.e.p.PluginsService ] [Lavies-MacBook-Air.local] loaded module [reindex]
[2019-10-29T10:50:14,590][INFO ][o.e.p.PluginsService ] [Lavies-MacBook-Air.local] loaded module [repository-url]
[2019-10-29T10:50:14,590][INFO ][o.e.p.PluginsService ] [Lavies-MacBook-Air.local] loaded module [search-business-rules]
[2019-10-29T10:50:14,591][INFO ][o.e.p.PluginsService ] [Lavies-MacBook-Air.local] loaded module [spatial]
[2019-10-29T10:50:14,591][INFO ][o.e.p.PluginsService ] [Lavies-MacBook-Air.local] loaded module [transport-netty4]
[2019-10-29T10:50:14,591][INFO ][o.e.p.PluginsService ] [Lavies-MacBook-Air.local] loaded module [vectors]
[2019-10-29T10:50:14,591][INFO ][o.e.p.PluginsService ] [Lavies-MacBook-Air.local] loaded module [x-pack-analytics]
[2019-10-29T10:50:14,592][INFO ][o.e.p.PluginsService ] [Lavies-MacBook-Air.local] loaded module [x-pack-ccr]
[2019-10-29T10:50:14,592][INFO ][o.e.p.PluginsService ] [Lavies-MacBook-Air.local] loaded module [x-pack-core]
[2019-10-29T10:50:14,592][INFO ][o.e.p.PluginsService ] [Lavies-MacBook-Air.local] loaded module [x-pack-deprecation]
[2019-10-29T10:50:14,593][INFO ][o.e.p.PluginsService ] [Lavies-MacBook-Air.local] loaded module [x-pack-graph]
[2019-10-29T10:50:14,593][INFO ][o.e.p.PluginsService ] [Lavies-MacBook-Air.local] loaded module [x-pack-ilm]
[2019-10-29T10:50:14,594][INFO ][o.e.p.PluginsService ] [Lavies-MacBook-Air.local] loaded module [x-pack-logstash]
[2019-10-29T10:50:14,594][INFO ][o.e.p.PluginsService ] [Lavies-MacBook-Air.local] loaded module [x-pack-ml]
[2019-10-29T10:50:14,594][INFO ][o.e.p.PluginsService ] [Lavies-MacBook-Air.local] loaded module [x-pack-monitoring]
[2019-10-29T10:50:14,595][INFO ][o.e.p.PluginsService ] [Lavies-MacBook-Air.local] loaded module [x-pack-rollup]
[2019-10-29T10:50:14,595][INFO ][o.e.p.PluginsService ] [Lavies-MacBook-Air.local] loaded module [x-pack-security]
[2019-10-29T10:50:14,595][INFO ][o.e.p.PluginsService ] [Lavies-MacBook-Air.local] loaded module [x-pack-sql]
[2019-10-29T10:50:14,595][INFO ][o.e.p.PluginsService ] [Lavies-MacBook-Air.local] loaded module [x-pack-voting-only-node]
[2019-10-29T10:50:14,596][INFO ][o.e.p.PluginsService ] [Lavies-MacBook-Air.local] loaded module [x-pack-watcher]
[2019-10-29T10:50:14,596][INFO ][o.e.p.PluginsService ] [Lavies-MacBook-Air.local] no plugins loaded
[2019-10-29T10:50:21,901][INFO ][o.e.x.s.a.s.FileRolesStore] [Lavies-MacBook-Air.local] parsed [0] roles from file [/usr/local/etc/elasticsearch/roles.yml]
[2019-10-29T10:50:24,004][DEBUG][o.e.a.ActionModule ] [Lavies-MacBook-Air.local] Using REST wrapper from plugin org.elasticsearch.xpack.security.Security
[2019-10-29T10:50:24,231][ERROR][o.e.g.GatewayMetaState ] [Lavies-MacBook-Air.local] failed to read or upgrade local state, exiting...
java.lang.IllegalStateException: The index [[shakespeare/pMFJ_hE1QMmRowj3bZNctA]] was created with version [5.6.3] but the minimum compatible version is [6.0.0-beta1]. It should be re-indexed in Elasticsearch 6.x before upgrading to 7.4.1.
at org.elasticsearch.cluster.metadata.MetaDataIndexUpgradeService.checkSupportedVersion(MetaDataIndexUpgradeService.java:126) ~[elasticsearch-7.4.1.jar:7.4.1]
at org.elasticsearch.cluster.metadata.MetaDataIndexUpgradeService.upgradeIndexMetaData(MetaDataIndexUpgradeService.java:97) ~[elasticsearch-7.4.1.jar:7.4.1]
at org.elasticsearch.gateway.GatewayMetaState.upgradeMetaData(GatewayMetaState.java:419) ~[elasticsearch-7.4.1.jar:7.4.1]
at org.elasticsearch.gateway.GatewayMetaState.upgradeMetaData(GatewayMetaState.java:153) [elasticsearch-7.4.1.jar:7.4.1]
at org.elasticsearch.gateway.GatewayMetaState.<init>(GatewayMetaState.java:95) [elasticsearch-7.4.1.jar:7.4.1]
at org.elasticsearch.node.Node.<init>(Node.java:485) [elasticsearch-7.4.1.jar:7.4.1]
at org.elasticsearch.node.Node.<init>(Node.java:255) [elasticsearch-7.4.1.jar:7.4.1]
at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:221) [elasticsearch-7.4.1.jar:7.4.1]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:221) [elasticsearch-7.4.1.jar:7.4.1]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:349) [elasticsearch-7.4.1.jar:7.4.1]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) [elasticsearch-7.4.1.jar:7.4.1]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150) [elasticsearch-7.4.1.jar:7.4.1]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) [elasticsearch-7.4.1.jar:7.4.1]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:125) [elasticsearch-cli-7.4.1.jar:7.4.1]
at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-cli-7.4.1.jar:7.4.1]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115) [elasticsearch-7.4.1.jar:7.4.1]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) [elasticsearch-7.4.1.jar:7.4.1]
[2019-10-29T10:50:24,254][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [Lavies-MacBook-Air.local] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: The index [[shakespeare/pMFJ_hE1QMmRowj3bZNctA]] was created with version [5.6.3] but the minimum compatible version is [6.0.0-beta1]. It should be re-indexed in Elasticsearch 6.x before upgrading to 7.4.1.
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:163) ~[elasticsearch-7.4.1.jar:7.4.1]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150) ~[elasticsearch-7.4.1.jar:7.4.1]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-7.4.1.jar:7.4.1]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:125) ~[elasticsearch-cli-7.4.1.jar:7.4.1]
at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-7.4.1.jar:7.4.1]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115) ~[elasticsearch-7.4.1.jar:7.4.1]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-7.4.1.jar:7.4.1]
Caused by: java.lang.IllegalStateException: The index [[shakespeare/pMFJ_hE1QMmRowj3bZNctA]] was created with version [5.6.3] but the minimum compatible version is [6.0.0-beta1]. It should be re-indexed in Elasticsearch 6.x before upgrading to 7.4.1.
at org.elasticsearch.cluster.metadata.MetaDataIndexUpgradeService.checkSupportedVersion(MetaDataIndexUpgradeService.java:126) ~[elasticsearch-7.4.1.jar:7.4.1]
at org.elasticsearch.cluster.metadata.MetaDataIndexUpgradeService.upgradeIndexMetaData(MetaDataIndexUpgradeService.java:97) ~[elasticsearch-7.4.1.jar:7.4.1]
at org.elasticsearch.gateway.GatewayMetaState.upgradeMetaData(GatewayMetaState.java:419) ~[elasticsearch-7.4.1.jar:7.4.1]
at org.elasticsearch.gateway.GatewayMetaState.upgradeMetaData(GatewayMetaState.java:153) ~[elasticsearch-7.4.1.jar:7.4.1]
at org.elasticsearch.gateway.GatewayMetaState.<init>(GatewayMetaState.java:95) ~[elasticsearch-7.4.1.jar:7.4.1]
at org.elasticsearch.node.Node.<init>(Node.java:485) ~[elasticsearch-7.4.1.jar:7.4.1]
at org.elasticsearch.node.Node.<init>(Node.java:255) ~[elasticsearch-7.4.1.jar:7.4.1]
at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:221) ~[elasticsearch-7.4.1.jar:7.4.1]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:221) ~[elasticsearch-7.4.1.jar:7.4.1]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:349) ~[elasticsearch-7.4.1.jar:7.4.1]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-7.4.1.jar:7.4.1]
... 6 more
The stacktrace literally says:
The index [[shakespeare/pMFJ_hE1QMmRowj3bZNctA]] was created with version [5.6.3] but the minimum compatible version is [6.0.0-beta1]. It should be re-indexed in Elasticsearch 6.x before upgrading to 7.4.1.
So yes, your options are:
Downgrade to Elasticsearch 5.x or 6.x.
Migrate your index data to 7.x.
I have installed elasticsearch on my server having this ip address W.X.Y.Z
I am able to run
./elasticsearch-6.3.2/bin/elasticsearch
The elasticsearch service is accessible on localhost (remote server) but I can't access it from my locale machine with the browser at this address http://W.X.Y.Z:9200/
Then I tried to change the elasticsearch-6.3.2/config/elasticsearch.yml file by adding the following lines (please see the attached screenshot)
network.host: 0.0.0.0
http.port: 9200
And at this time, I'm not able to run
./elasticsearch-6.3.2/bin/elasticsearch
I have updated /etc/security/limits.conf file by adding
elasticsearch - nofile 65536
elasticsearch - nproc 4096
this command ulimit -a still showing me this screen
And always, I'm not able to run ./elasticsearch command, I'm getting this result
[2018-11-22T09:50:06,714][INFO ][o.e.n.Node ] [] initializing ...
[2018-11-22T09:50:06,866][INFO ][o.e.e.NodeEnvironment ] [b1qDVeW] using [1] data paths, mounts [[/ (rootfs)]], net usable_space [14.2gb], net total_space [17.2gb], types [rootfs]
[2018-11-22T09:50:06,871][INFO ][o.e.e.NodeEnvironment ] [b1qDVeW] heap size [1015.6mb], compressed ordinary object pointers [true]
[2018-11-22T09:50:06,873][INFO ][o.e.n.Node ] [b1qDVeW] node name derived from node ID [b1qDVeW5RRWfC58mHtWaKQ]; set [node.name] to override
[2018-11-22T09:50:06,873][INFO ][o.e.n.Node ] [b1qDVeW] version[6.3.2], pid[15624], build[default/tar/053779d/2018-07-20T05:20:23.451332Z], OS[Linux/3.16.0-5-amd64/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0_191/25.191-b12]
[2018-11-22T09:50:06,875][INFO ][o.e.n.Node ] [b1qDVeW] JVM arguments [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.io.tmpdir=/tmp/elasticsearch.Z9qppca6, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs_err_pid%p.log, -XX:+PrintGCDetails, -XX:+PrintGCDateStamps, -XX:+PrintTenuringDistribution, -XX:+PrintGCApplicationStoppedTime, -Xloggc:logs/gc.log, -XX:+UseGCLogFileRotation, -XX:NumberOfGCLogFiles=32, -XX:GCLogFileSize=64m, -Des.path.home=/home/developer/elasticsearch-6.3.2, -Des.path.conf=/home/developer/elasticsearch-6.3.2/config, -Des.distribution.flavor=default, -Des.distribution.type=tar]
[2018-11-22T09:50:12,367][INFO ][o.e.p.PluginsService ] [b1qDVeW] loaded module [aggs-matrix-stats]
[2018-11-22T09:50:12,373][INFO ][o.e.p.PluginsService ] [b1qDVeW] loaded module [analysis-common]
[2018-11-22T09:50:12,373][INFO ][o.e.p.PluginsService ] [b1qDVeW] loaded module [ingest-common]
[2018-11-22T09:50:12,374][INFO ][o.e.p.PluginsService ] [b1qDVeW] loaded module [lang-expression]
[2018-11-22T09:50:12,374][INFO ][o.e.p.PluginsService ] [b1qDVeW] loaded module [lang-mustache]
[2018-11-22T09:50:12,374][INFO ][o.e.p.PluginsService ] [b1qDVeW] loaded module [lang-painless]
[2018-11-22T09:50:12,375][INFO ][o.e.p.PluginsService ] [b1qDVeW] loaded module [mapper-extras]
[2018-11-22T09:50:12,375][INFO ][o.e.p.PluginsService ] [b1qDVeW] loaded module [parent-join]
[2018-11-22T09:50:12,375][INFO ][o.e.p.PluginsService ] [b1qDVeW] loaded module [percolator]
[2018-11-22T09:50:12,376][INFO ][o.e.p.PluginsService ] [b1qDVeW] loaded module [rank-eval]
[2018-11-22T09:50:12,376][INFO ][o.e.p.PluginsService ] [b1qDVeW] loaded module [reindex]
[2018-11-22T09:50:12,376][INFO ][o.e.p.PluginsService ] [b1qDVeW] loaded module [repository-url]
[2018-11-22T09:50:12,376][INFO ][o.e.p.PluginsService ] [b1qDVeW] loaded module [transport-netty4]
[2018-11-22T09:50:12,376][INFO ][o.e.p.PluginsService ] [b1qDVeW] loaded module [tribe]
[2018-11-22T09:50:12,377][INFO ][o.e.p.PluginsService ] [b1qDVeW] loaded module [x-pack-core]
[2018-11-22T09:50:12,377][INFO ][o.e.p.PluginsService ] [b1qDVeW] loaded module [x-pack-deprecation]
[2018-11-22T09:50:12,377][INFO ][o.e.p.PluginsService ] [b1qDVeW] loaded module [x-pack-graph]
[2018-11-22T09:50:12,378][INFO ][o.e.p.PluginsService ] [b1qDVeW] loaded module [x-pack-logstash]
[2018-11-22T09:50:12,378][INFO ][o.e.p.PluginsService ] [b1qDVeW] loaded module [x-pack-ml]
[2018-11-22T09:50:12,378][INFO ][o.e.p.PluginsService ] [b1qDVeW] loaded module [x-pack-monitoring]
[2018-11-22T09:50:12,378][INFO ][o.e.p.PluginsService ] [b1qDVeW] loaded module [x-pack-rollup]
[2018-11-22T09:50:12,379][INFO ][o.e.p.PluginsService ] [b1qDVeW] loaded module [x-pack-security]
[2018-11-22T09:50:12,379][INFO ][o.e.p.PluginsService ] [b1qDVeW] loaded module [x-pack-sql]
[2018-11-22T09:50:12,379][INFO ][o.e.p.PluginsService ] [b1qDVeW] loaded module [x-pack-upgrade]
[2018-11-22T09:50:12,380][INFO ][o.e.p.PluginsService ] [b1qDVeW] loaded module [x-pack-watcher]
[2018-11-22T09:50:12,380][INFO ][o.e.p.PluginsService ] [b1qDVeW] no plugins loaded
[2018-11-22T09:50:21,545][INFO ][o.e.x.s.a.s.FileRolesStore] [b1qDVeW] parsed [0] roles from file [/home/developer/elasticsearch-6.3.2/config/roles.yml]
[2018-11-22T09:50:22,679][INFO ][o.e.x.m.j.p.l.CppLogMessageHandler] [controller/15672] [Main.cc#109] controller (64 bit): Version 6.3.2 (Build 903094f295d249) Copyright (c) 2018 Elasticsearch BV
[2018-11-22T09:50:23,497][DEBUG][o.e.a.ActionModule ] Using REST wrapper from plugin org.elasticsearch.xpack.security.Security
[2018-11-22T09:50:24,036][INFO ][o.e.d.DiscoveryModule ] [b1qDVeW] using discovery type [zen]
[2018-11-22T09:50:25,981][INFO ][o.e.n.Node ] [b1qDVeW] initialized
[2018-11-22T09:50:25,982][INFO ][o.e.n.Node ] [b1qDVeW] starting ...
[2018-11-22T09:50:26,351][INFO ][o.e.t.TransportService ] [b1qDVeW] publish_address {94.177.240.139:9300}, bound_addresses {[::]:9300}
[2018-11-22T09:50:26,407][INFO ][o.e.b.BootstrapChecks ] [b1qDVeW] bound or publishing to a non-loopback address, enforcing bootstrap checks
ERROR: [1] bootstrap checks failed
[1]: max number of threads [3903] for user [developer] is too low, increase to at least [4096]
[2018-11-22T09:50:26,445][INFO ][o.e.n.Node ] [b1qDVeW] stopping ...
[2018-11-22T09:50:26,483][INFO ][o.e.n.Node ] [b1qDVeW] stopped
[2018-11-22T09:50:26,484][INFO ][o.e.n.Node ] [b1qDVeW] closing ...
[2018-11-22T09:50:26,511][INFO ][o.e.n.Node ] [b1qDVeW] closed
[2018-11-22T09:50:26,521][INFO ][o.e.x.m.j.p.NativeController] Native controller process has stopped - no new native processes can be started
Your problem is not related to network address, but to limits.
Have a look at what returns the linux shell command :
ulimit -a
Look at values max user processes and virtual memory, there are too low for running Elasticsearch. Temporary raise them with the ulimit command :
> ulimit -u 4096
> ulimit -v 262144
or permanently modify them like this :
sysctl -w vm.max_map_count=262144
(as explained here : https://www.elastic.co/guide/en/elasticsearch/reference/master/vm-max-map-count.html)
and edit /etc/security/limits.conf
elasticsearch - nofile 65536
elasticsearch - nproc 4096
(as explained here : https://www.elastic.co/guide/en/elasticsearch/reference/master/setting-system-settings.html)
Trying to run Elastic Search 6.2.4 on Openshift but it is not running and the container exits with the code 137.
[2018-06-01T14:24:58,148][INFO ][o.e.p.PluginsService ] [jge060C]
loaded module [ingest-common]
[2018-06-01T14:24:58,149][INFO ][o.e.p.PluginsService ] [jge060C] loaded module [lang-expression]
[2018-06-01T14:24:58,149][INFO ][o.e.p.PluginsService ] [jge060C] loaded module [lang-mustache]
[2018-06-01T14:24:58,149][INFO ][o.e.p.PluginsService ] [jge060C] loaded module [lang-painless]
[2018-06-01T14:24:58,149][INFO ][o.e.p.PluginsService ] [jge060C] loaded module [mapper-extras]
[2018-06-01T14:24:58,149][INFO ][o.e.p.PluginsService ] [jge060C] loaded module [parent-join]
[2018-06-01T14:24:58,149][INFO ][o.e.p.PluginsService ] [jge060C] loaded module [percolator]
[2018-06-01T14:24:58,149][INFO ][o.e.p.PluginsService ] [jge060C] loaded module [rank-eval]
[2018-06-01T14:24:58,149][INFO ][o.e.p.PluginsService ] [jge060C] loaded module [reindex]
[2018-06-01T14:24:58,149][INFO ][o.e.p.PluginsService ] [jge060C] loaded module [repository-url]
[2018-06-01T14:24:58,149][INFO ][o.e.p.PluginsService ] [jge060C] loaded module [transport-netty4]
[2018-06-01T14:24:58,149][INFO ][o.e.p.PluginsService ] [jge060C] loaded module [tribe]
[2018-06-01T14:24:58,150][INFO ][o.e.p.PluginsService ] [jge060C] loaded plugin [ingest-geoip]
[2018-06-01T14:24:58,150][INFO ][o.e.p.PluginsService ] [jge060C] loaded plugin [ingest-user-agent]
[2018-06-01T14:24:58,150][INFO ][o.e.p.PluginsService ] [jge060C] loaded plugin [x-pack-core]
[2018-06-01T14:24:58,150][INFO ][o.e.p.PluginsService ] [jge060C] loaded plugin [x-pack-deprecation]
[2018-06-01T14:24:58,151][INFO ][o.e.p.PluginsService ] [jge060C] loaded plugin [x-pack-graph]
[2018-06-01T14:24:58,151][INFO ][o.e.p.PluginsService ] [jge060C] loaded plugin [x-pack-logstash]
[2018-06-01T14:24:58,151][INFO ][o.e.p.PluginsService ] [jge060C] loaded plugin [x-pack-ml]
[2018-06-01T14:24:58,151][INFO ][o.e.p.PluginsService ] [jge060C] loaded plugin [x-pack-monitoring]
[2018-06-01T14:24:58,151][INFO ][o.e.p.PluginsService ] [jge060C] loaded plugin [x-pack-security]
[2018-06-01T14:24:58,151][INFO ][o.e.p.PluginsService ] [jge060C] loaded plugin [x-pack-upgrade]
[2018-06-01T14:24:58,151][INFO ][o.e.p.PluginsService ] [jge060C] loaded plugin [x-pack-watcher]
[2018-06-01T14:25:01,592][INFO ][o.e.x.m.j.p.l.CppLogMessageHandler] [controller/131] [Main.cc#128] controller (64 bit): Version 6.2.4 (Build 524e7fe231abc1) Copyright (c) 2018 Elasticsearch BV
[2018-06-01T14:25:03,271][INFO ][o.e.d.DiscoveryModule ] [jge060C] using discovery type [zen]
[2018-06-01T14:25:04,305][INFO ][o.e.n.Node ] initialized
[2018-06-01T14:25:04,305][INFO ][o.e.n.Node ] [jge060C] starting ...
[2018-06-01T14:25:04,497][INFO ][o.e.t.TransportService ] [jge060C] publish_address {10.131.3.134:9300}, bound_addresses {[::]:9300}
[2018-06-01T14:25:04,520][INFO ][o.e.b.BootstrapChecks ] [jge060C] bound or publishing to a non-loopback address, enforcing bootstrap checks
ERROR: [1] bootstrap checks failed
[1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[2018-06-01T14:25:04,531][INFO ][o.e.n.Node ] [jge060C] stopping ...
[2018-06-01T14:25:04,623][INFO ][o.e.n.Node ] [jge060C] stopped
[2018-06-01T14:25:04,624][INFO ][o.e.n.Node ] [jge060C] closing ...
[2018-06-01T14:25:04,634][INFO ][o.e.n.Node ] [jge060C] closed
As you can see from the logs, the vm max heap size has to be increased. As it turns out to be a kernel parameter, how to change that for the pod that is running ES?
Kernel command line parameters can't be changed per pod, but vm.max_map_count is parameter you can change via sysctl.
See these two similar SO question for a solution:
How to pass `sysctl` flags to docker from k8s?
Enabling net.ipv4.ip_forward for a container
There is also a more general explanation in the official Kubernetes documentation on sysctl
You cannot change kernel parameters for individual pods; they have to be fixed in the underlying operating system.
I'm trying ELK 6.0.0 on Windows but I have a problem with X-Pack and Machine Learning.
I have installed the X-Pack plugin in command prompt.it successfully installed the plugin.
elasticsearch-plugin install x-pack
When I start Elasticsearch, I have an exception :
C:\\Users\ELK\6.0.0\elasticsearch\bin>elasticsearch
[2018-05-30T15:26:11,578][INFO ][o.e.n.Node ] [] initializing ...
[2018-05-30T15:26:11,703][INFO ][o.e.e.NodeEnvironment ] [Icp0LXw] using [1] data paths, mounts [[OSDISK (C:)]], net usable_space [107.8gb], net total_space [149.9gb], types [NTFS]
[2018-05-30T15:26:11,703][INFO ][o.e.e.NodeEnvironment ] [Icp0LXw] heap size [998.4mb], compressed ordinary object pointers [unknown]
[2018-05-30T15:26:12,054][INFO ][o.e.n.Node ] node name [Icp0LXw] derived from node ID [Icp0LXwiRfG4Rq-1z9cvDA]; set [node.name] to override
[2018-05-30T15:26:12,054][INFO ][o.e.n.Node ] version[6.0.0], pid[9800], build[8f0685b/2017-11-10T18:41:22.859Z], OS[Windows 10/10.0/x86], JVM[Oracle Corporation/Java HotSpot(TM) Server VM/1.8.0_144/25.144-b01]
[2018-05-30T15:26:12,054][INFO ][o.e.n.Node ] JVM arguments [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -XX:+HeapDumpOnOutOfMemoryError, -Delasticsearch, -Des.path.home=C:\Users\41809\ELK\6.0.0\elasticsearch, -Des.path.conf=C:\Users\41809\ELK\6.0.0\elasticsearch\config]
[2018-05-30T15:26:13,546][INFO ][o.e.p.PluginsService ] [Icp0LXw] loaded module [aggs-matrix-stats]
[2018-05-30T15:26:13,546][INFO ][o.e.p.PluginsService ] [Icp0LXw] loaded module [analysis-common]
[2018-05-30T15:26:13,561][INFO ][o.e.p.PluginsService ] [Icp0LXw] loaded module [ingest-common]
[2018-05-30T15:26:13,561][INFO ][o.e.p.PluginsService ] [Icp0LXw] loaded module [lang-expression]
[2018-05-30T15:26:13,561][INFO ][o.e.p.PluginsService ] [Icp0LXw] loaded module [lang-mustache]
[2018-05-30T15:26:13,561][INFO ][o.e.p.PluginsService ] [Icp0LXw] loaded module [lang-painless]
[2018-05-30T15:26:13,561][INFO ][o.e.p.PluginsService ] [Icp0LXw] loaded module [parent-join]
[2018-05-30T15:26:13,561][INFO ][o.e.p.PluginsService ] [Icp0LXw] loaded module [percolator]
[2018-05-30T15:26:13,561][INFO ][o.e.p.PluginsService ] [Icp0LXw] loaded module [reindex]
[2018-05-30T15:26:13,561][INFO ][o.e.p.PluginsService ] [Icp0LXw] loaded module [repository-url]
[2018-05-30T15:26:13,561][INFO ][o.e.p.PluginsService ] [Icp0LXw] loaded module [transport-netty4]
[2018-05-30T15:26:13,561][INFO ][o.e.p.PluginsService ] [Icp0LXw] loaded module [tribe]
[2018-05-30T15:26:13,561][INFO ][o.e.p.PluginsService ] [Icp0LXw] loaded plugin [x-pack]
[2018-05-30T15:26:15,589][DEBUG][o.e.a.ActionModule ] Using REST wrapper from plugin org.elasticsearch.xpack.XPackPlugin
[2018-05-30T15:26:17,034][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: ElasticsearchException[X-Pack is not supported and Machine Learning is not available for [windows-x86]; you can use the other X-Pack features (unsupported) by setting xpack.ml.enabled: false in elasticsearch.yml]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:134) ~[elasticsearch-6.0.0.jar:6.0.0]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:121) ~[elasticsearch-6.0.0.jar:6.0.0]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:69) ~[elasticsearch-6.0.0.jar:6.0.0]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:134) ~[elasticsearch-6.0.0.jar:6.0.0]
at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-6.0.0.jar:6.0.0]
Platform Configuration:
Windows 10 Enterprise 64 Bit.
Please help to fix the issue.
Thanks Advance.
elasticsearch version : elasticsearch-5.2.0
elasticsearch-head version : latest version
Start service successfully:
#### node1 ####
deMacBook-Pro:bin yyq$ ./elasticsearch
[2017-02-15T13:08:57,174][INFO ][o.e.n.Node ] [yml-es-node-1] initializing ...
[2017-02-15T13:08:57,303][INFO ][o.e.e.NodeEnvironment ] [yml-es-node-1] using [1] data paths, mounts [[/ (/dev/disk1)]], net usable_space [21.4gb], net total_space [232.6gb], spins? [unknown], types [hfs]
[2017-02-15T13:08:57,304][INFO ][o.e.e.NodeEnvironment ] [yml-es-node-1] heap size [1.9gb], compressed ordinary object pointers [true]
[2017-02-15T13:08:57,355][INFO ][o.e.n.Node ] [yml-es-node-1] node name [yml-es-node-1], node ID [hqVAcDOdRu-LXuAgUEX9oQ]
[2017-02-15T13:08:57,358][INFO ][o.e.n.Node ] [yml-es-node-1] version[5.2.0], pid[93922], build[24e05b9/2017-01-24T19:52:35.800Z], OS[Mac OS X/10.11.6/x86_64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0_25/25.25-b02]
[2017-02-15T13:08:58,802][INFO ][o.e.p.PluginsService ] [yml-es-node-1] loaded module [aggs-matrix-stats]
[2017-02-15T13:08:58,803][INFO ][o.e.p.PluginsService ] [yml-es-node-1] loaded module [ingest-common]
[2017-02-15T13:08:58,803][INFO ][o.e.p.PluginsService ] [yml-es-node-1] loaded module [lang-expression]
[2017-02-15T13:08:58,803][INFO ][o.e.p.PluginsService ] [yml-es-node-1] loaded module [lang-groovy]
[2017-02-15T13:08:58,803][INFO ][o.e.p.PluginsService ] [yml-es-node-1] loaded module [lang-mustache]
[2017-02-15T13:08:58,803][INFO ][o.e.p.PluginsService ] [yml-es-node-1] loaded module [lang-painless]
[2017-02-15T13:08:58,803][INFO ][o.e.p.PluginsService ] [yml-es-node-1] loaded module [percolator]
[2017-02-15T13:08:58,804][INFO ][o.e.p.PluginsService ] [yml-es-node-1] loaded module [reindex]
[2017-02-15T13:08:58,804][INFO ][o.e.p.PluginsService ] [yml-es-node-1] loaded module [transport-netty3]
[2017-02-15T13:08:58,804][INFO ][o.e.p.PluginsService ] [yml-es-node-1] loaded module [transport-netty4]
[2017-02-15T13:08:58,805][INFO ][o.e.p.PluginsService ] [yml-es-node-1] no plugins loaded
[2017-02-15T13:09:02,610][INFO ][o.e.n.Node ] [yml-es-node-1] initialized
[2017-02-15T13:09:02,610][INFO ][o.e.n.Node ] [yml-es-node-1] starting ...
[2017-02-15T13:09:02,953][INFO ][o.e.t.TransportService ] [yml-es-node-1] publish_address {127.0.0.1:9300}, bound_addresses {[fe80::1]:9300}, {[::1]:9300}, {127.0.0.1:9300}
[2017-02-15T13:09:06,125][INFO ][o.e.c.s.ClusterService ] [yml-es-node-1] detected_master {yml-es-node-2}{FWhiCkI7TV6hJOlmT_fgQg}{URIaxsK2T0aP7jRRe6TDfg}{127.0.0.1}{127.0.0.1:9301}, added {{yml-es-node-2}{FWhiCkI7TV6hJOlmT_fgQg}{URIaxsK2T0aP7jRRe6TDfg}{127.0.0.1}{127.0.0.1:9301},}, reason: zen-disco-receive(from master [master {yml-es-node-2}{FWhiCkI7TV6hJOlmT_fgQg}{URIaxsK2T0aP7jRRe6TDfg}{127.0.0.1}{127.0.0.1:9301} committed version [385]])
[2017-02-15T13:09:06,175][INFO ][o.e.h.HttpServer ] [yml-es-node-1] publish_address {127.0.0.1:9200}, bound_addresses {[fe80::1]:9200}, {[::1]:9200}, {127.0.0.1:9200}
[2017-02-15T13:09:06,175][INFO ][o.e.n.Node ] [yml-es-node-1] started
#### node2 ####
deMacBook-Pro:bin yyq$ ./elasticsearch
[2017-02-15T10:31:03,936][INFO ][o.e.n.Node ] [yml-es-node-2] initializing ...
[2017-02-15T10:31:04,087][INFO ][o.e.e.NodeEnvironment ] [yml-es-node-2] using [1] data paths, mounts [[/ (/dev/disk1)]], net usable_space [19.3gb], net total_space [232.6gb], spins? [unknown], types [hfs]
[2017-02-15T10:31:04,087][INFO ][o.e.e.NodeEnvironment ] [yml-es-node-2] heap size [1.9gb], compressed ordinary object pointers [true]
[2017-02-15T10:31:04,104][INFO ][o.e.n.Node ] [yml-es-node-2] node name [yml-es-node-2], node ID [FWhiCkI7TV6hJOlmT_fgQg]
[2017-02-15T10:31:04,112][INFO ][o.e.n.Node ] [yml-es-node-2] version[5.2.0], pid[85158], build[24e05b9/2017-01-24T19:52:35.800Z], OS[Mac OS X/10.11.6/x86_64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0_25/25.25-b02]
[2017-02-15T10:31:05,830][INFO ][o.e.p.PluginsService ] [yml-es-node-2] loaded module [aggs-matrix-stats]
[2017-02-15T10:31:05,830][INFO ][o.e.p.PluginsService ] [yml-es-node-2] loaded module [ingest-common]
[2017-02-15T10:31:05,830][INFO ][o.e.p.PluginsService ] [yml-es-node-2] loaded module [lang-expression]
[2017-02-15T10:31:05,830][INFO ][o.e.p.PluginsService ] [yml-es-node-2] loaded module [lang-groovy]
[2017-02-15T10:31:05,830][INFO ][o.e.p.PluginsService ] [yml-es-node-2] loaded module [lang-mustache]
[2017-02-15T10:31:05,830][INFO ][o.e.p.PluginsService ] [yml-es-node-2] loaded module [lang-painless]
[2017-02-15T10:31:05,831][INFO ][o.e.p.PluginsService ] [yml-es-node-2] loaded module [percolator]
[2017-02-15T10:31:05,831][INFO ][o.e.p.PluginsService ] [yml-es-node-2] loaded module [reindex]
[2017-02-15T10:31:05,831][INFO ][o.e.p.PluginsService ] [yml-es-node-2] loaded module [transport-netty3]
[2017-02-15T10:31:05,831][INFO ][o.e.p.PluginsService ] [yml-es-node-2] loaded module [transport-netty4]
[2017-02-15T10:31:05,832][INFO ][o.e.p.PluginsService ] [yml-es-node-2] no plugins loaded
[2017-02-15T10:31:09,871][INFO ][o.e.n.Node ] [yml-es-node-2] initialized
[2017-02-15T10:31:09,871][INFO ][o.e.n.Node ] [yml-es-node-2] starting ...
[2017-02-15T10:31:10,171][INFO ][o.e.t.TransportService ] [yml-es-node-2] publish_address {127.0.0.1:9301}, bound_addresses {[fe80::1]:9301}, {[::1]:9301}, {127.0.0.1:9301}
[2017-02-15T10:31:13,327][INFO ][o.e.c.s.ClusterService ] [yml-es-node-2] detected_master {yml-es-node-1}{hqVAcDOdRu-LXuAgUEX9oQ}{VrY6MUvhQNetUmbzcRnKMg}{127.0.0.1}{127.0.0.1:9300}, added {{yml-es-node-1}{hqVAcDOdRu-LXuAgUEX9oQ}{VrY6MUvhQNetUmbzcRnKMg}{127.0.0.1}{127.0.0.1:9300},}, reason: zen-disco-receive(from master [master {yml-es-node-1}{hqVAcDOdRu-LXuAgUEX9oQ}{VrY6MUvhQNetUmbzcRnKMg}{127.0.0.1}{127.0.0.1:9300} committed version [223]])
[2017-02-15T10:31:13,388][INFO ][o.e.h.HttpServer ] [yml-es-node-2] publish_address {127.0.0.1:9201}, bound_addresses {[fe80::1]:9201}, {[::1]:9201}, {127.0.0.1:9201}
[2017-02-15T10:31:13,388][INFO ][o.e.n.Node ] [yml-es-node-2] started
deMacBook-Pro:elasticsearch-head-master yyq$ grunt server
Running "connect:server" (connect) task
Waiting forever...
Started connect web server on http://localhost:9100
When I opened the url:http://localhost:9100 and clicked [connect] button, but I'm unable to connect to elasticsearch.
Could anyone help me?
This is the screenshot
In your elasticsearch.yml configuration, you probably have the following setting:
http.port: 9201
This is also visible in your logs:
[...] publish_address {127.0.0.1:9201}, bound_addresses {[fe80::1]:9201}, {[::1]:9201}, {127.0.0.1:9201}
^
|
your HTTP port
So in your elasticsearch-head interface, you need to connect to localhost:9201 not localhost:9200.
UPDATE
You also need to add http.cors.enabled: true in your elasticsearch.yml configuration and restart your ES server
As mentioned in the previous post, to be able to run the head plugin to check the health status of the ElastiSearch cluster, you need to enable the CORS's environmental variables. One way is to mount the config file for ES as described here. Alternatively, you can define the environmental variables directly in your docker-compose as documented in this GitHub issue. I am adding the code below for completeness, which worked for me:
version: '3'
services:
# search engine
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.0.1
container_name: elasticsearch
environment:
- discovery.type=single-node
- http.port=9200
- http.cors.enabled=true
- http.cors.allow-origin=http://localhost:1358,http://127.0.0.1:1358
- http.cors.allow-headers=X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization
- http.cors.allow-credentials=true
- bootstrap.memory_lock=true
- 'ES_JAVA_OPTS=-Xms512m -Xmx512m'
ports:
- '9200:9200'
- '9300:9300'
# elasticsearch browser
dejavu:
image: appbaseio/dejavu:3.2.3
container_name: dejavu
ports:
- '1358:1358'
links:
- elasticsearch
Note that using - http.cors.allow-origin=* works and it could be handy for certain development setups.