我正在尝试使用docker映像运行elastic enterprise search 7.9.0,方法如下:https://www.elastic.co/guide/en/enterprise-search/current/docker.html
docker run-p 3002:3002-e elasticsearch.host='http://elastic:changeme@host.docker.internal:9200'-e elasticsearch.username=elastic-e elasticsearch.password=changeme-e allow\u es\u settings\u modification=true-e secret\u management.encryption\u keys='[x]'docker.elastic.co/enterprise-search/enterprise-search:7.9.0
我收到以下警告,服务无法启动:
Found java executable in PATH
Java version detected: 1.8.0_252 (major version: 8)
Enterprise Search is starting...
[2020-09-01T12:10:12.887+00:00][1][2000][app-server][INFO]: Enterprise Search version=7.9.0, JRuby version=9.2.9.0, Ruby version=2.5.7, Rails version=4.2.11.3
[2020-09-01T12:10:13.251+00:00][1][2000][app-server][INFO]: Successfully connected to Elasticsearch
[2020-09-01T12:10:25.949+00:00][1][2000][app-server][INFO]: [db_lock] [installation] Status: [Starting] Ensuring migrations tracking index exists
[2020-09-01T12:10:26.083+00:00][1][2000][app-server][INFO]: [db_lock] [installation] Status: [Finished] Ensuring migrations tracking index exists
[2020-09-01T12:10:26.981+00:00][1][2000][app-server][ERROR]:
--------------------------------------------------------------------------------
We need to perform 11/32 migrations before the service can be started.
Migrations pending: 20200604175830, 20200610113647, 20200611093100, 20200612155336, 20200617164710, 20200617210501, 20200623134305, 20200624153999, 20200709120000, 20200717204953, 20200723200724
Proceeding with migrations while indices are allowing writes can have unintended consequences.
Please enable read-only mode before proceeding:
https://www.elastic.co/guide/en/enterprise-search/current/read-only-mode.html
我不知道如何解决这个问题,因为我无法设置只读模式,因为服务没有启动。你知道吗?
1条答案
按热度按时间tsm1rwdh1#
我不确定这是否是最好的解决方案,但这是对我有效的方法。基于https://www.elastic.co/guide/en/enterprise-search/current/read-only-mode.html
用--enable read only mode启动docker容器,然后停止说read only mode已启用
运行docker容器,但不启用只读模式,直到它成功启动并运行。成功运行后,我停止了docker容器
用--disable read only mode启动docker容器,然后停止说read only mode is disabled
像以前一样运行docker容器,没有问题
使用docker命令,例如:
docker run-p 3002:3002-e elasticsearch.host='http://elastic:changeme@host.docker.internal:9200'-e elasticsearch.username=elastic-e elasticsearch.password=changeme-e allow\u es\u settings\u modification=true-e secret\u management.encryption\u keys='[x]'docker.elastic.co/enterprise-search/enterprise-search:7.9.1 --enable-read-only-mode
docker run-p 3002:3002-e elasticsearch.host='http://elastic:changeme@host.docker.internal:9200'-e elasticsearch.username=elastic-e elasticsearch.password=changeme-e allow\u es\u settings\u modification=true-e secret\u management.encryption\u keys='[x]'docker.elastic.co/enterprise-search/enterprise-search:7.9.1
docker run-p 3002:3002-e elasticsearch.host='http://elastic:changeme@host.docker.internal:9200'-e elasticsearch.username=elastic-e elasticsearch.password=changeme-e allow\u es\u settings\u modification=true-e secret\u management.encryption\u keys='[x]'docker.elastic.co/enterprise-search/enterprise-search:7.9.1 --disable-read-only-mode
docker run-p 3002:3002-e elasticsearch.host='http://elastic:changeme@host.docker.internal:9200'-e elasticsearch.username=elastic-e elasticsearch.password=changeme-e allow\u es\u settings\u modification=true-e secret\u management.encryption\u keys='[x]'docker.elastic.co/enterprise-search/enterprise-search:7.9.1
恢复正常。祝你好运!