# Centos 7 virtualbox elasticsearch installation problem

**URL:** <https://discuss.elastic.co/t/centos-7-virtualbox-elasticsearch-installation-problem/89232>\
**Category:** Elasticsearch\
**Created:** [June 13, 2017, 3:49pm UTC](https://discuss.elastic.co/t/centos-7-virtualbox-elasticsearch-installation-problem/89232 "2017-06-13T15:49:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cassandre](https://avatars.discourse-cdn.com/v4/letter/c/3bc359/32.png) [@Cassandre](https://discuss.elastic.co/u/Cassandre)\
**Post date:** [June 13, 2017, 3:49pm UTC](https://discuss.elastic.co/t/centos-7-virtualbox-elasticsearch-installation-problem/89232/1 "2017-06-13T15:49:37Z")

</div>

Hello,  
I'm trying to install Elasticsearch but there is a problem

[root@localhost ~]# systemctl status elasticsearch.service  
● elasticsearch.service - Elasticsearch  
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)  
Active: failed (Result: exit-code) since Tue 2017-06-13 15:34:55 UTC; 8min ago  
Docs: [http://www.elastic.co](http://www.elastic.co)  
Process: 843 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID\_DIR}/elasticsearch.pid --quiet -Edefault.path.logs=${LOG\_DIR} -Edefault.path.data=${DATA\_DIR} -Edefault.path.conf=${CONF\_DIR} (code=exited, status=1/FAILURE)  
Process: 832 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=0/SUCCESS)  
Main PID: 843 (code=exited, status=1/FAILURE)

Jun 13 17:34:32 localhost.localdomain systemd[1]: Starting Elasticsearch...  
Jun 13 17:34:32 localhost.localdomain systemd[1]: Started Elasticsearch.  
Jun 13 15:34:55 localhost.localdomain systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE  
Jun 13 15:34:55 localhost.localdomain systemd[1]: Unit elasticsearch.service entered failed state.  
Jun 13 15:34:55 localhost.localdomain systemd[1]: elasticsearch.service failed.

If we look in tmp/hs\_err\_pid\*.log, we can see that the problem came from the memory  
[root@localhost ~]# vi /tmp/hs\_err\_pid\*.log  
29 files to edit

# The system is out of physical RAM or swap space

# In 32 bit mode, the process size limit was hit

# Possible solutions:

# Reduce memory load on the system

# Increase physical memory or swap space

# Check if swap backing store is full

# Use 64 bit Java on a 64 bit OS

# Decrease Java heap size (-Xmx/-Xms)

# Decrease number of Java threads

# Decrease Java thread stack sizes (-Xss)

# Set larger code cache with -XX:ReservedCodeCacheSize=

# This output file may be truncated or incomplete.

# 

# Out of Memory Error (os\_linux.cpp:2640), pid=1046, tid=0x00007f7a158b6700

# 

# JRE version: (8.0\_131-b11) (build )

# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.131-b11 mixed mode linux-amd64 compressed oops)

# There is insufficient memory for the Java Runtime Environment to continue.

# Native memory allocation (mmap) failed to map 2060255232 bytes for committing reserved memory.

# Possible reasons:

# The system is out of physical RAM or swap space

# In 32 bit mode, the process size limit was hit

# Possible solutions:

# Reduce memory load on the system

# Increase physical memory or swap space

# Check if swap backing store is full

# Use 64 bit Java on a 64 bit OS

# Decrease Java heap size (-Xmx/-Xms)

# Decrease number of Java threads

# Decrease Java thread stack sizes (-Xss)

# Set larger code cache with -XX:ReservedCodeCacheSize=

# This output file may be truncated or incomplete.

# 

# Out of Memory Error (os\_linux.cpp:2640), pid=1046, tid=0x00007f7a158b6700

# 

# JRE version: (8.0\_131-b11) (build )

# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.131-b11 mixed mode linux-amd64 compressed oops)

# There is insufficient memory for the Java Runtime Environment to continue.

# Native memory allocation (mmap) failed to map 2060255232 bytes for committing reserved memory.

# Possible reasons:

# The system is out of physical RAM or swap space

# In 32 bit mode, the process size limit was hit

# Possible solutions:

# Reduce memory load on the system

# Increase physical memory or swap space

# Check if swap backing store is full

# Use 64 bit Java on a 64 bit OS

# Decrease Java heap size (-Xmx/-Xms)

# Decrease number of Java threads

# Decrease Java thread stack sizes (-Xss)

# Set larger code cache with -XX:ReservedCodeCacheSize=

# This output file may be truncated or incomplete.

# 

# Out of Memory Error (os\_linux.cpp:2640), pid=1046, tid=0x00007f7a158b6700

# 

# JRE version: (8.0\_131-b11) (build )

# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.131-b11 mixed mode linux-amd64 compressed oops)

Can anyone here can help me ?

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [June 13, 2017, 4:24pm UTC](https://discuss.elastic.co/t/centos-7-virtualbox-elasticsearch-installation-problem/89232/2 "2017-06-13T16:24:27Z")

</div>

The default JVM options for Elasticsearch specify a heap size of 2g. If your virtual machine has less than this (accounting for physical RAM specified for the virtual machine, and swap), then the JVM will fail to be able to commit memory for the heap and thus fail to start. You either need to reduce the specified heap usage, or increase the memory for the virtual machine (ideally the virtual machine will have allocated at least double the configured heap space).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 11, 2017, 4:24pm UTC](https://discuss.elastic.co/t/centos-7-virtualbox-elasticsearch-installation-problem/89232/3 "2017-07-11T16:24:34Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
