使用Docker run 命令
docker run -d -p 9200:9200 -p 9300:9300 --name 用户自定义名字 容器ID
会看到一串字符串,一般情况下我们会误以为它启动成功
我们执行docker ps -a是发现它自动退出了
使用docker logs -f 容器ID 查看日志发现:
ERROR: [1] bootstrap checks failed
[1]: max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]
[2]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
错误提示
告诉我们是ES需要jvm内存太大了,所有我们需要改一下配置,执行下面代码
sysctl -w vm.max_map_count=262144
然后输入下列命令运行一下:
docker run -d -e ES_JAVA_POTS="-Xms256m -Xmx256m" -p 9200:9200 -p 9300:9300 --name ES3 8f46db60ddd6
查看日志发现还是报错:
ERROR: [1] bootstrap checks failed
[1]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
解决方法如下:
docker run -d -e ES_JAVA_POTS="-Xms256m -Xmx256m" -e "discovery.type=single-node" -p 9200:9200 -p
:9300 --name ES3 8f46db60ddd6
最终就启动成功了!
补充知识:docker安装elasticsearch 6.4.3 停止
先打印日志
docker logs 9dcea100677b OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release. [2019-11-15T07:22:07,906][INFO ][o.e.n.Node ] [] initializing ... [2019-11-15T07:22:08,101][INFO ][o.e.e.NodeEnvironment ] [d37UOiC] using [1] data paths, mounts [[/ (rootfs)]], net usable_space [33.4gb], net total_space [39.2gb], types [rootfs] [2019-11-15T07:22:08,102][INFO ][o.e.e.NodeEnvironment ] [d37UOiC] heap size [503.6mb], compressed ordinary object pointers [true] [2019-11-15T07:22:08,111][INFO ][o.e.n.Node ] [d37UOiC] node name derived from node ID [d37UOiCyRQyKTBz5CfI0HQ]; set [node.name] to override [2019-11-15T07:22:08,111][INFO ][o.e.n.Node ] [d37UOiC] version[6.4.3], pid[1], build[default/tar/fe40335/2018-10-30T23:17:19.084789Z], OS[Linux/3.10.0-1062.1.2.el7.x86_64/amd64], JVM["Oracle Corporation"/OpenJDK 64-Bit Server VM/10.0.2/10.0.2+13] [2019-11-15T07:22:08,111][INFO ][o.e.n.Node ] [d37UOiC] 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.e3MyuoEc, -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.cgroups.hierarchy.override=/, -Xms512m, -Xmx512m, -Des.path.home=/usr/share/elasticsearch, -Des.path.conf=/usr/share/elasticsearch/config, -Des.distribution.flavor=default, -Des.distribution.type=tar] [2019-11-15T07:22:11,943][INFO ][o.e.p.PluginsService ] [d37UOiC] loaded module [aggs-matrix-stats] [2019-11-15T07:22:11,944][INFO ][o.e.p.PluginsService ] [d37UOiC] loaded module [analysis-common] [2019-11-15T07:22:11,944][INFO ][o.e.p.PluginsService ] [d37UOiC] loaded module [ingest-common] [2019-11-15T07:22:11,944][INFO ][o.e.p.PluginsService ] [d37UOiC] loaded module [lang-expression] [2019-11-15T07:22:11,944][INFO ][o.e.p.PluginsService ] [d37UOiC] loaded module [lang-mustache] [2019-11-15T07:22:11,945][INFO ][o.e.p.PluginsService ] [d37UOiC] loaded module [lang-painless] [2019-11-15T07:22:11,945][INFO ][o.e.p.PluginsService ] [d37UOiC] loaded module [mapper-extras] [2019-11-15T07:22:11,945][INFO ][o.e.p.PluginsService ] [d37UOiC] loaded module [parent-join] [2019-11-15T07:22:11,945][INFO ][o.e.p.PluginsService ] [d37UOiC] loaded module [percolator] [2019-11-15T07:22:11,945][INFO ][o.e.p.PluginsService ] [d37UOiC] loaded module [rank-eval] [2019-11-15T07:22:11,945][INFO ][o.e.p.PluginsService ] [d37UOiC] loaded module [reindex] [2019-11-15T07:22:11,945][INFO ][o.e.p.PluginsService ] [d37UOiC] loaded module [repository-url] [2019-11-15T07:22:11,945][INFO ][o.e.p.PluginsService ] [d37UOiC] loaded module [transport-netty4] [2019-11-15T07:22:11,945][INFO ][o.e.p.PluginsService ] [d37UOiC] loaded module [tribe] [2019-11-15T07:22:11,945][INFO ][o.e.p.PluginsService ] [d37UOiC] loaded module [x-pack-core] [2019-11-15T07:22:11,945][INFO ][o.e.p.PluginsService ] [d37UOiC] loaded module [x-pack-deprecation] [2019-11-15T07:22:11,945][INFO ][o.e.p.PluginsService ] [d37UOiC] loaded module [x-pack-graph] [2019-11-15T07:22:11,945][INFO ][o.e.p.PluginsService ] [d37UOiC] loaded module [x-pack-logstash] [2019-11-15T07:22:11,945][INFO ][o.e.p.PluginsService ] [d37UOiC] loaded module [x-pack-ml] [2019-11-15T07:22:11,945][INFO ][o.e.p.PluginsService ] [d37UOiC] loaded module [x-pack-monitoring] [2019-11-15T07:22:11,945][INFO ][o.e.p.PluginsService ] [d37UOiC] loaded module [x-pack-rollup] [2019-11-15T07:22:11,945][INFO ][o.e.p.PluginsService ] [d37UOiC] loaded module [x-pack-security] [2019-11-15T07:22:11,946][INFO ][o.e.p.PluginsService ] [d37UOiC] loaded module [x-pack-sql] [2019-11-15T07:22:11,946][INFO ][o.e.p.PluginsService ] [d37UOiC] loaded module [x-pack-upgrade] [2019-11-15T07:22:11,946][INFO ][o.e.p.PluginsService ] [d37UOiC] loaded module [x-pack-watcher] [2019-11-15T07:22:11,946][INFO ][o.e.p.PluginsService ] [d37UOiC] loaded plugin [ingest-geoip] [2019-11-15T07:22:11,946][INFO ][o.e.p.PluginsService ] [d37UOiC] loaded plugin [ingest-user-agent] [2019-11-15T07:22:17,086][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. [2019-11-15T07:22:23,590][INFO ][o.e.x.s.a.s.FileRolesStore] [d37UOiC] parsed [0] roles from file [/usr/share/elasticsearch/config/roles.yml] [2019-11-15T07:22:24,507][INFO ][o.e.x.m.j.p.l.CppLogMessageHandler] [controller/62] [Main.cc@109] controller (64 bit): Version 6.4.3 (Build 7a0781676dd492) Copyright (c) 2018 Elasticsearch BV [2019-11-15T07:22:26,142][INFO ][o.e.d.DiscoveryModule ] [d37UOiC] using discovery type [zen] [2019-11-15T07:22:28,041][INFO ][o.e.n.Node ] [d37UOiC] initialized [2019-11-15T07:22:28,041][INFO ][o.e.n.Node ] [d37UOiC] starting ... [2019-11-15T07:22:28,297][INFO ][o.e.t.TransportService ] [d37UOiC] publish_address {172.18.0.2:9300}, bound_addresses {[::]:9300} [2019-11-15T07:22:28,350][INFO ][o.e.b.BootstrapChecks ] [d37UOiC] 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] [2019-11-15T07:22:28,406][INFO ][o.e.n.Node ] [d37UOiC] stopping ... [2019-11-15T07:22:28,423][INFO ][o.e.n.Node ] [d37UOiC] stopped [2019-11-15T07:22:28,423][INFO ][o.e.n.Node ] [d37UOiC] closing ... [2019-11-15T07:22:28,457][INFO ][o.e.n.Node ] [d37UOiC] closed [2019-11-15T07:22:28,460][INFO ][o.e.x.m.j.p.NativeController] Native controller process has stopped - no new native processes can be started
感觉应该是jvm参数配置有问题
先
[root@iZ2ze9gna8ev4h0rme8ph0Z ~]# sudo sysctl -w vm.max_map_count=262144
再
docker run -d -p 9200:9200 -p 9300:9300 -e ES_JAVA_OPTS="-Xms512m -Xmx512m" -e -Des.scripting.exception_for_missing_value=true --name elasticsearch docker.io/elasticsearch:6.4.3
即可解决!
以上这篇解决Docker启动Elasticsearch7.x报错的问题就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持。
《魔兽世界》大逃杀!60人新游玩模式《强袭风暴》3月21日上线
暴雪近日发布了《魔兽世界》10.2.6 更新内容,新游玩模式《强袭风暴》即将于3月21 日在亚服上线,届时玩家将前往阿拉希高地展开一场 60 人大逃杀对战。
艾泽拉斯的冒险者已经征服了艾泽拉斯的大地及遥远的彼岸。他们在对抗世界上最致命的敌人时展现出过人的手腕,并且成功阻止终结宇宙等级的威胁。当他们在为即将于《魔兽世界》资料片《地心之战》中来袭的萨拉塔斯势力做战斗准备时,他们还需要在熟悉的阿拉希高地面对一个全新的敌人──那就是彼此。在《巨龙崛起》10.2.6 更新的《强袭风暴》中,玩家将会进入一个全新的海盗主题大逃杀式限时活动,其中包含极高的风险和史诗级的奖励。
《强袭风暴》不是普通的战场,作为一个独立于主游戏之外的活动,玩家可以用大逃杀的风格来体验《魔兽世界》,不分职业、不分装备(除了你在赛局中捡到的),光是技巧和战略的强弱之分就能决定出谁才是能坚持到最后的赢家。本次活动将会开放单人和双人模式,玩家在加入海盗主题的预赛大厅区域前,可以从强袭风暴角色画面新增好友。游玩游戏将可以累计名望轨迹,《巨龙崛起》和《魔兽世界:巫妖王之怒 经典版》的玩家都可以获得奖励。
更新日志
- 【休闲沙发】VA-2024-FijiGoldenSunrise:ChilloutYourMind(FLAC)
- 【休闲沙发】VA-2024-MorningCoffeeRetreat:ChilloutYourMind(FLAC)
- 【休闲沙发】VA-2024-OceanExperience:ChilloutYourMind(FLAC)
- 【休闲沙发】VA-2024-RooftopLounge:ChilloutYourMind(FLAC)
- 无期迷途《宵色夜曲 游戏原声》[FLAC/分轨][81.16MB]
- 纪钧瀚《轻音乐睡眠曲 深度放松入眠 森林钢琴演奏》[320K/MP3][137.91MB]
- 纪钧瀚《轻音乐睡眠曲 深度放松入眠 森林钢琴演奏》[FLAC/分轨][402.38MB]
- 元若蓝2006-爱无限大[滚石][WAV+CUE]
- 李雨寰2012-我可是天使[有凰音乐][WAV+CUE]
- 群星1994-艺能MUSIC纷纷FUN[艺能动音][WAV+CUE]
- 何石《海边的曼彻斯特》[320K/MP3][15.86MB]
- 何石《海边的曼彻斯特》[FLAC/分轨][32.81MB]
- 《2024年132张新专辑》[FLAC/分轨][104.1G]
- 哎呀,服务正在维护中……
- 哈辉《关雎》[分轨WAV]