[英]Installed Elasticsearch 5.5 and failed to start the service
Installed elasticsearch v5.5 in centos and ran the following command to initiate the service.在centos中安装elasticsearch v5.5,运行如下命令启动服务。
sudo service elasticsearch start
Getting following error while running the above command.运行上述命令时出现以下错误。
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
Suggest me how to fix this.建议我如何解决这个问题。
Elasticsearch starts with 2 GB of RAM as default in 5.X versions. Elasticsearch 在 5.X 版本中默认使用 2 GB RAM。
Assuming that you are using virtual machine, it seems like your VM has less free memory than 2GB.假设您使用的是虚拟机,您的虚拟机的可用内存似乎少于 2GB。 Try giving your VM more memory or change your Elasticsearch JVM settings in /etc/elasticsearch/jvm.options
(for example set -Xms512m -Xmx512m
).尝试为您的 VM 提供更多内存或更改/etc/elasticsearch/jvm.options
Elasticsearch JVM 设置(例如 set -Xms512m -Xmx512m
)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.