【问题标题】:Installed Elasticsearch 5.5 and failed to start the service安装了 Elasticsearch 5.5 服务启动失败
【发布时间】:2020-02-26 21:17:38
【问题描述】:

在centos中安装了elasticsearch v5.5,运行如下命令启动服务。

sudo service elasticsearch start

运行上述命令时出现以下错误。

Starting elasticsearch: OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000085330000, 2060255232, 0) failed; error='Cannot allocate memory' (errno=12)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 2060255232 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /tmp/hs_err_pid15359.log

建议我如何解决这个问题。

【问题讨论】:

    标签: java elasticsearch centos


    【解决方案1】:

    Elasticsearch 在 5.X 版本中默认使用 2 GB RAM。

    假设您使用的是虚拟机,您的虚拟机的可用内存似乎少于 2GB。尝试为您的 VM 提供更多内存或更改 /etc/elasticsearch/jvm.options 中的 Elasticsearch JVM 设置(例如设置 -Xms512m -Xmx512m)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-04-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-07-22
      • 1970-01-01
      相关资源
      最近更新 更多