elasticsearch 보고서 시작 ERROR:max 가상 메모리 영역 vm.max_map_count [65530] is too low

4388 단어 elasticsearch
elasticsearch를 시작하면 다음과 같은 오류가 발생합니다.
[2019-03-07T10:45:20,799][INFO ][o.e.n.Node               ] [node-21] initializing ...
[2019-03-07T10:45:20,918][INFO ][o.e.e.NodeEnvironment    ] [node-21] using [1] data paths, mounts [[/usr/share/elasticsearch/data (/dev/nvme0n1p1)]], net usable_space [1tb], net total_space [1tb], spins? [no], types [ext4]
[2019-03-07T10:45:20,918][INFO ][o.e.e.NodeEnvironment    ] [node-21] heap size [19.8gb], compressed ordinary object pointers [true]
[2019-03-07T10:45:20,920][INFO ][o.e.n.Node               ] [node-21] node name [node-21], node ID [jFXFQYrGTqOgkO-qGveTGw]
[2019-03-07T10:45:20,920][INFO ][o.e.n.Node               ] [node-21] version[5.6.6], pid[1], build[7d99d36/2018-01-09T23:55:47.880Z], OS[Linux/3.10.0-957.el7.x86_64/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0_151/25.151-b12]
[2019-03-07T10:45:20,920][INFO ][o.e.n.Node               ] [node-21] 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, -Xmx20g, -Xms20g, -Des.path.home=/usr/share/elasticsearch]
[2019-03-07T10:45:21,934][INFO ][o.e.p.PluginsService     ] [node-21] loaded module [aggs-matrix-stats]
[2019-03-07T10:45:21,935][INFO ][o.e.p.PluginsService     ] [node-21] loaded module [ingest-common]
[2019-03-07T10:45:21,935][INFO ][o.e.p.PluginsService     ] [node-21] loaded module [lang-expression]
[2019-03-07T10:45:21,935][INFO ][o.e.p.PluginsService     ] [node-21] loaded module [lang-groovy]
[2019-03-07T10:45:21,935][INFO ][o.e.p.PluginsService     ] [node-21] loaded module [lang-mustache]
[2019-03-07T10:45:21,935][INFO ][o.e.p.PluginsService     ] [node-21] loaded module [lang-painless]
[2019-03-07T10:45:21,935][INFO ][o.e.p.PluginsService     ] [node-21] loaded module [parent-join]
[2019-03-07T10:45:21,935][INFO ][o.e.p.PluginsService     ] [node-21] loaded module [percolator]
[2019-03-07T10:45:21,935][INFO ][o.e.p.PluginsService     ] [node-21] loaded module [reindex]
[2019-03-07T10:45:21,935][INFO ][o.e.p.PluginsService     ] [node-21] loaded module [transport-netty3]
[2019-03-07T10:45:21,935][INFO ][o.e.p.PluginsService     ] [node-21] loaded module [transport-netty4]
[2019-03-07T10:45:21,935][INFO ][o.e.p.PluginsService     ] [node-21] loaded plugin [analysis-ik]
[2019-03-07T10:45:23,167][INFO ][o.e.d.DiscoveryModule    ] [node-21] using discovery type [zen]
[2019-03-07T10:45:23,675][INFO ][o.e.n.Node               ] [node-21] initialized
[2019-03-07T10:45:23,676][INFO ][o.e.n.Node               ] [node-21] starting ...
[2019-03-07T10:45:24,094][INFO ][o.e.t.TransportService   ] [node-21] publish_address {10.255.229.21:9300}, bound_addresses {[::]:9300}
[2019-03-07T10:45:24,151][INFO ][o.e.b.BootstrapChecks    ] [node-21] 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-03-07T10:45:24,162][INFO ][o.e.n.Node               ] [node-21] stopping ...
[2019-03-07T10:45:24,329][INFO ][o.e.n.Node               ] [node-21] stopped
[2019-03-07T10:45:24,329][INFO ][o.e.n.Node               ] [node-21] closing ...
[2019-03-07T10:45:24,345][INFO ][o.e.n.Node               ] [node-21] closed

해결 방법: 1./etc/sysctl.conf 마지막 추가
vm.max_map_count=655300
[root@bogon ~]# vi /etc/sysctl.conf 
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
vm.max_map_count=655300

2. 파일 다시 로드
sysctl -p

3. es를 다시 켜면 된다.

좋은 웹페이지 즐겨찾기