Centos7使用Docker启动elasticsearch服务秒退
首先查看docker启动日志
1 | docker logs -f 容器id |
查看报错信息
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | 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-24T11:17:55,311][WARN ][o.e.c.l.LogConfigurator ] [unknown] 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/share/elasticsearch/config/log4j2.properties [2019-11-24T11:18:02,295][INFO ][o.e.e.NodeEnvironment ] [l6-XUOr] using [1] data paths, mounts [[/ (rootfs)]], net usable_space [11gb], net total_space [37.6gb], types [rootfs] [2019-11-24T11:18:02,296][INFO ][o.e.e.NodeEnvironment ] [l6-XUOr] heap size [247.6mb], compressed ordinary object pointers [ true ] [2019-11-24T11:18:02,319][INFO ][o.e.n.Node ] [l6-XUOr] node name derived from node ID [l6-XUOrfQuSDM1xQLV4irA]; set [node.name] to override [2019-11-24T11:18:02,319][INFO ][o.e.n.Node ] [l6-XUOr] version[6.5.0], pid[1], build[ default /tar/816e6f6/2018-11-09T18:58:36.352602Z], OS[Linux/3.10.0-1062.4.1.el7.x86_64/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/11.0.1/11.0.1+13] [2019-11-24T11:18:02,319][INFO ][o.e.n.Node ] [l6-XUOr] 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.IPIWmr7p, -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 =/, -Xms256m, -Xmx256m, -Des.path.home=/usr/share/elasticsearch, -Des.path.conf=/usr/share/elasticsearch/config, -Des.distribution.flavor= default , -Des.distribution.type=tar] [2019-11-24T11:18:12,063][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [aggs-matrix-stats] [2019-11-24T11:18:12,063][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [analysis-common] [2019-11-24T11:18:12,063][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [ingest-common] [2019-11-24T11:18:12,063][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [lang-expression] [2019-11-24T11:18:12,063][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [lang-mustache] [2019-11-24T11:18:12,063][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [lang-painless] [2019-11-24T11:18:12,063][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [mapper-extras] [2019-11-24T11:18:12,063][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [parent- join ] [2019-11-24T11:18:12,063][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [percolator] [2019-11-24T11:18:12,063][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [rank-eval] [2019-11-24T11:18:12,063][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [reindex] [2019-11-24T11:18:12,063][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [repository-url] [2019-11-24T11:18:12,063][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [transport-netty4] [2019-11-24T11:18:12,063][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [tribe] [2019-11-24T11:18:12,063][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [x-pack-ccr] [2019-11-24T11:18:12,063][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [x-pack-core] [2019-11-24T11:18:12,063][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [x-pack-deprecation] [2019-11-24T11:18:12,064][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [x-pack-graph] [2019-11-24T11:18:12,064][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [x-pack-logstash] [2019-11-24T11:18:12,064][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [x-pack-ml] [2019-11-24T11:18:12,064][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [x-pack-monitoring] [2019-11-24T11:18:12,064][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [x-pack-rollup] [2019-11-24T11:18:12,064][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [x-pack-security] [2019-11-24T11:18:12,064][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [x-pack-sql] [2019-11-24T11:18:12,064][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [x-pack-upgrade] [2019-11-24T11:18:12,064][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded module [x-pack-watcher] [2019-11-24T11:18:12,064][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded plugin [ingest-geoip] [2019-11-24T11:18:12,065][INFO ][o.e.p.PluginsService ] [l6-XUOr] loaded plugin [ingest-user-agent] [2019-11-24T11:18:32,588][INFO ][o.e.x.s.a.s.FileRolesStore] [l6-XUOr] parsed [0] roles from file [/usr/share/elasticsearch/config/roles.yml] [2019-11-24T11:18:34,749][INFO ][o.e.x.m.j.p.l.CppLogMessageHandler] [l6-XUOr] [controller/62] [Main.cc@109] controller (64 bit): Version 6.5.0 (Build 71882a589e5556) Copyright (c) 2018 Elasticsearch BV [2019-11-24T11:18:37,168][INFO ][o.e.d.DiscoveryModule ] [l6-XUOr] using discovery type [zen] and host providers [settings] [2019-11-24T11:18:40,908][INFO ][o.e.n.Node ] [l6-XUOr] initialized [2019-11-24T11:18:40,908][INFO ][o.e.n.Node ] [l6-XUOr] starting ... [2019-11-24T11:18:41,448][INFO ][o.e.t.TransportService ] [l6-XUOr] publish_address {172.17.0.2:9300}, bound_addresses {[::]:9300} [2019-11-24T11:18:41,488][INFO ][o.e.b.BootstrapChecks ] [l6-XUOr] 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-24T11:18:41,538][INFO ][o.e.n.Node ] [l6-XUOr] stopping ... [2019-11-24T11:18:41,608][INFO ][o.e.n.Node ] [l6-XUOr] stopped [2019-11-24T11:18:41,608][INFO ][o.e.n.Node ] [l6-XUOr] closing ... [2019-11-24T11:18:41,619][INFO ][o.e.n.Node ] [l6-XUOr] closed [2019-11-24T11:18:41,621][INFO ][o.e.x.m.j.p.NativeController] [l6-XUOr] Native controller process has stopped - no new native processes can be started 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-24T11:22:59,885][WARN ][o.e.c.l.LogConfigurator ] [unknown] 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/share/elasticsearch/config/log4j2.properties |
修改配置文件
1 | vim /etc/sysctl.conf |
添加下面配置:
1 | vm.max_map_count=655360 |
然后重新启动容器
1 | docker start my_es(my_es为容器名称) |
-----------------------有任何问题可以在评论区评论,也可以私信我,我看到的话会进行回复,欢迎大家指教------------------------
(蓝奏云官网有些地址失效了,需要把请求地址lanzous改成lanzoux才可以)
分类:
Linux
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· DeepSeek 开源周回顾「GitHub 热点速览」
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了