我正在尝试在docker中运行elasticsearch。 我得到了此输出,其中包含错误消息:
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
OpenJDK 64-Bit Server VM warning: UseAVX=2 is not supported on this CPU, setting it to UseAVX=1
[2018-10-28T07:45:49,394][INFO ][o.e.n.Node ] [] initializing ...
[2018-10-28T07:45:49,913][INFO ][o.e.e.NodeEnvironment ] [Xfh9x-1] using [1] data paths, mounts [[/usr/share/elasticsearch/data (/dev/sdb2)]], net usable_space [397.9gb], net total_space [442.8gb], types [ext4]
[2018-10-28T07:45:49,914][INFO ][o.e.e.NodeEnvironment ] [Xfh9x-1] heap size [989.8mb], compressed ordinary object pointers [true]
[2018-10-28T07:45:49,918][INFO ][o.e.n.Node ] [Xfh9x-1] node name derived from node ID [Xfh9x-1gQ4GI-qTT8l6xsg]; set [node.name] to override
[2018-10-28T07:45:49,919][INFO ][o.e.n.Node ] [Xfh9x-1] version[6.4.2], pid[1], build[default/tar/04711c2/2018-09-26T13:34:09.098244Z], OS[Linux/3.16.0-77-generic/amd64], JVM["Oracle Corporation"/OpenJDK 64-Bit Server VM/10.0.2/10.0.2+13]
[2018-10-28T07:45:49,919][INFO ][o.e.n.Node ] [Xfh9x-1] 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.PdIPS9HS, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -Djava.locale.providers=COMPAT, -XX:UseAVX=2, -Des.path.home=/usr/share/elasticsearch, -Des.path.conf=/usr/share/elasticsearch/config, -Des.distribution.flavor=default, -Des.distribution.type=tar]
[2018-10-28T07:46:06,608][INFO ][o.e.p.PluginsService ] [Xfh9x-1] loaded module [aggs-matrix-stats]
[2018-10-28T07:46:06,608][INFO ][o.e.p.PluginsService ] [Xfh9x-1] loaded module [analysis-common]
[2018-10-28T07:46:06,613][INFO ][o.e.p.PluginsService ] [Xfh9x-1] loaded module [ingest-common]
[2018-10-28T07:46:06,613][INFO ][o.e.p.PluginsService ] [Xfh9x-1] loaded module [lang-expression]
[2018-10-28T07:46:06,614][INFO ][o.e.p.PluginsService ] [Xfh9x-1] loaded module [lang-mustache]
[2018-10-28T07:46:06,614][INFO ][o.e.p.PluginsService ] [Xfh9x-1] loaded module [lang-painless]
[2018-10-28T07:46:06,615][INFO ][o.e.p.PluginsService ] [Xfh9x-1] loaded module [mapper-extras]
[2018-10-28T07:46:06,615][INFO ][o.e.p.PluginsService ] [Xfh9x-1] loaded module [parent-join]
[2018-10-28T07:46:06,615][INFO ][o.e.p.PluginsService ] [Xfh9x-1] loaded module [percolator]
[2018-10-28T07:46:06,616][INFO ][o.e.p.PluginsService ] [Xfh9x-1] loaded module [rank-eval]
[2018-10-28T07:46:06,616][INFO ][o.e.p.PluginsService ] [Xfh9x-1] loaded module [reindex]
[2018-10-28T07:46:06,617][INFO ][o.e.p.PluginsService ] [Xfh9x-1] loaded module [repository-url]
[2018-10-28T07:46:06,617][INFO ][o.e.p.PluginsService ] [Xfh9x-1] loaded module [transport-netty4]
[2018-10-28T07:46:06,617][INFO ][o.e.p.PluginsService ] [Xfh9x-1] loaded module [tribe]
[2018-10-28T07:46:06,618][INFO ][o.e.p.PluginsService ] [Xfh9x-1] loaded module [x-pack-core]
[2018-10-28T07:46:06,618][INFO ][o.e.p.PluginsService ] [Xfh9x-1] loaded module [x-pack-deprecation]
[2018-10-28T07:46:06,618][INFO ][o.e.p.PluginsService ] [Xfh9x-1] loaded module [x-pack-graph]
[2018-10-28T07:46:06,619][INFO ][o.e.p.PluginsService ] [Xfh9x-1] loaded module [x-pack-logstash]
[2018-10-28T07:46:06,619][INFO ][o.e.p.PluginsService ] [Xfh9x-1] loaded module [x-pack-ml]
[2018-10-28T07:46:06,619][INFO ][o.e.p.PluginsService ] [Xfh9x-1] loaded module [x-pack-monitoring]
[2018-10-28T07:46:06,619][INFO ][o.e.p.PluginsService ] [Xfh9x-1] loaded module [x-pack-rollup]
[2018-10-28T07:46:06,620][INFO ][o.e.p.PluginsService ] [Xfh9x-1] loaded module [x-pack-security]
[2018-10-28T07:46:06,620][INFO ][o.e.p.PluginsService ] [Xfh9x-1] loaded module [x-pack-sql]
[2018-10-28T07:46:06,620][INFO ][o.e.p.PluginsService ] [Xfh9x-1] loaded module [x-pack-upgrade]
[2018-10-28T07:46:06,621][INFO ][o.e.p.PluginsService ] [Xfh9x-1] loaded module [x-pack-watcher]
[2018-10-28T07:46:06,622][INFO ][o.e.p.PluginsService ] [Xfh9x-1] loaded plugin [ingest-geoip]
[2018-10-28T07:46:06,622][INFO ][o.e.p.PluginsService ] [Xfh9x-1] loaded plugin [ingest-user-agent]
[2018-10-28T07:46:16,075][WARN ][o.e.d.s.ScriptModule ] Script: returning default values for missing document values is deprecated. Set system property '-Des.scripting.exception_for_missing_value=true' to make behaviour compatible with future major versions.
[2018-10-28T07:46:18,359][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalArgumentException: unknown setting [path.conf] 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:140) ~[elasticsearch-6.4.2.jar:6.4.2]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:127) ~[elasticsearch-6.4.2.jar:6.4.2]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-6.4.2.jar:6.4.2]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-6.4.2.jar:6.4.2]
at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-6.4.2.jar:6.4.2]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93) ~[elasticsearch-6.4.2.jar:6.4.2]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:86) ~[elasticsearch-6.4.2.jar:6.4.2]
Caused by: java.lang.IllegalArgumentException: unknown setting [path.conf] 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:393) ~[elasticsearch-6.4.2.jar:6.4.2]
at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:339) ~[elasticsearch-6.4.2.jar:6.4.2]
at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:311) ~[elasticsearch-6.4.2.jar:6.4.2]
at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:282) ~[elasticsearch-6.4.2.jar:6.4.2]
at org.elasticsearch.common.settings.SettingsModule.<init>(SettingsModule.java:135) ~[elasticsearch-6.4.2.jar:6.4.2]
at org.elasticsearch.node.Node.<init>(Node.java:343) ~[elasticsearch-6.4.2.jar:6.4.2]
at org.elasticsearch.node.Node.<init>(Node.java:256) ~[elasticsearch-6.4.2.jar:6.4.2]
at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:213) ~[elasticsearch-6.4.2.jar:6.4.2]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:213) ~[elasticsearch-6.4.2.jar:6.4.2]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:326) ~[elasticsearch-6.4.2.jar:6.4.2]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136) ~[elasticsearch-6.4.2.jar:6.4.2]
我的配置文件不包含path.conf
设置,即使我定义了它,也无法解决问题。
我的配置文件如下(相关部分):
path.data: /usr/share/elasticsearch/data
indices.requests.cache.size: 10%
bootstrap.memory_lock: false
# Log level per-operation
logger.index.query.slowlog: WARN
logger.index.index.slowlog: WARN
# snapshots repository
path.repo: ["/usr/share/elasticsearch/elastic_snapshots"]
# path to groovy scripts
path.scripts: "/usr/share/elasticsearch/config/scripts"
# Enable scripting
script.engine.groovy.file.aggs: true
# Cluster Settings
cluster.name: cluster-name
node.name: es-cluster-name
node.master: true
node.data: true
network.bind_host: 0.0.0.0
network.host: 172.16.0.1
discovery.zen.ping.unicast.hosts: ""
我该怎么做才能解决此问题?
我从以下位置启动容器:
FROM elasticsearch:6.4.2
RUN yum -y update && yum install -y ansible && \
mkdir -p /storage/elastic_snapshots && \
mkdir -p /etc/elasticsearch/scripts && \
chmod 0750 /etc/elasticsearch/scripts && \
chown -R root:elasticsearch /etc/elasticsearch/scripts
LABEL "image.type"="elasticsearch"
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
CMD ["elasticsearch", "-Epath.conf=/etc/elasticsearch"]
答案 0 :(得分:1)
在您的dockerfile的最后一行中,您正在确切定义环境变量ES抱怨的问题:
CMD [“ elasticsearch”,“-Epath.conf = / etc / elasticsearch” ]