Docker 启动elasticsearch报内存不足解决

9 篇文章 0 订阅
启动es

[root@localhost es]# docker run -d --name es2 -p 9201:9200 -p 9301:9300 elasticsearch_ik
25eeaefae21deb42424577e328dca81adcdd61b7a03c7a1b8be1911457f72c3a
[root@localhost es]# docker exec -it es2 /bin/bash
Error response from daemon: Container 25eeaefae21deb42424577e328dca81adcdd61b7a03c7a1b8be1911457f72c3a is not running
[root@localhost es]# docker logs -f --tail=100 es2
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=0
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000ca660000, 899284992, 0) failed; error='Not enough space' (errno=12)


解决方法

[root@localhost /]# find / -name jvm.options
find: ‘/run/user/1000/gvfs’: Permission denied
/var/lib/docker/overlay2/c84999045e8a92c418fd2df9c7f0a4174caa5f7248edaffa8537729b6c0c4a4e/diff/usr/share/elasticsearch/config/jvm.options


## JVM configuration

################################################################
## IMPORTANT: JVM heap size
################################################################
##
## You should always set the min and max JVM heap
## size to the same value. For example, to set
## the heap to 4 GB, set:
##
## -Xms4g
## -Xmx4g
##
## See https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html
## for more information
##
################################################################

# Xms represents the initial size of total heap space
# Xmx represents the maximum size of total heap space

-Xms1g      #改成512m
-Xmx1g      #改成512m

################################################################
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值