docker-compose安装elaticsearch和kibana堆栈溢出

由于elasticsearch默认的jvm参数默认为2G,在虚拟机内存为1G所以启动时直接报内存不足错误


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,  -Des.path.home=/usr/share/elasticsearch]


在编写compose文件时指定Xmms大小解决这个问题

 

version: ‘2’
services:
elasticsearch:
image: elasticsearch:5.6.11
environment:
– cluster.name=elasticsearch
– ES_JAVA_OPTS=-Xms512m -Xmx512m
ports:
– “9200:9200”
kibana:
image: kibana:5.6.11
environment:
SERVER_NAME: kibana
ELASTICSEARCH_URL: http://localhost:9200
ports:
– “5601:5601”

 

docker run命令指定jvm参数 docker run –name esl2 -e ES_JAVA_OPTS=”-Xms512m -Xmx512m” -p 9200:9200 -p 9300:9300 docker.io/elasticsearch:5.6.11

 

 

 

创作不易,转载请注明文章来源为www.full-satcker.com:邢桂帅 » docker-compose安装elaticsearch和kibana堆栈溢出

赞 (0)
分享到:更多 ()

评论 0

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址