Запуск ElasticSearch локально на MacBook - PullRequest
0 голосов
/ 29 октября 2019

Мне нужен локальный экземпляр ElasticSearch на моем ноутбуке MacOS.

Я использовал Mac OS 10.14 и установилasticsearch 7.4.1

Мне пришлось отключить опцию машинного обучения

in elasticsearch.yml
xpack.ml.enabled: false

Но при запуске ES я получаю ошибку (см. Полный вывод ниже)

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.

Я использовал JDK9 и обновил до JDK11, но появилась та же ошибка. Должен ли я вернуться к более старой версии ES?

ОБНОВЛЕНИЕ: Поскольку я не мог избавиться от старой версии ES, я пошел на локальную установку без менеджера пакетов

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

, которыйработает.

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

1 Ответ

1 голос
/ 29 октября 2019

Трассировка стека буквально говорит:

Индекс [[shakespeare / pMFJ_hE1QMmRowj3bZNctA]] был создан с версией [5.6.3], но минимальная совместимая версия - [6.0.0-beta1]. Он должен быть переиндексирован в Elasticsearch 6.x перед обновлением до 7.4.1.

Так что да, вы можете выбрать следующие варианты:

  1. Переход на Elasticsearch 5.x или6.x.
  2. Перенос данных индекса на 7.x.
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...