# Elasticsearch download on aws ec2 linux

**URL:** <https://discuss.elastic.co/t/elasticsearch-download-on-aws-ec2-linux/233575>\
**Category:** Elasticsearch\
**Created:** [May 20, 2020, 4:29pm UTC](https://discuss.elastic.co/t/elasticsearch-download-on-aws-ec2-linux/233575 "2020-05-20T16:29:58Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jun.8](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jun.8/32/68749_2.png) [@Jun.8](https://discuss.elastic.co/u/Jun.8)\
**Post date:** [May 20, 2020, 4:29pm UTC](https://discuss.elastic.co/t/elasticsearch-download-on-aws-ec2-linux/233575/1 "2020-05-20T16:29:58Z")

</div>

Hi, I'm trying to set elasticsearch on my AWS EC2 Linux server.  
I've followed the steps in [https://www.elastic.co/guide/en/elasticsearch/reference/current/rpm.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/rpm.html) using rpm.  
But I found the error message when I input start command "sudo systemctl start elasticsearch". The error message is like below.

Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)  
Active: failed (Result: exit-code) since Wed 2020-05-20 16:17:55 UTC; 13s ago  
Docs: [https://www.elastic.co](https://www.elastic.co)  
Process: 8010 ExecStart=/usr/share/elasticsearch/bin/systemd-entrypoint -p ${PID\_DIR}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)  
Main PID: 8010 (code=exited, status=1/FAILURE)

May 20 16:17:55 ip-10-0-1-141.ap-northeast-2.compute.internal systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE  
May 20 16:17:55 ip-10-0-1-141.ap-northeast-2.compute.internal systemd[1]: Failed to start Elasticsearch.  
May 20 16:17:55 ip-10-0-1-141.ap-northeast-2.compute.internal systemd[1]: Unit elasticsearch.service entered failed state.  
May 20 16:17:55 ip-10-0-1-141.ap-northeast-2.compute.internal systemd[1]: elasticsearch.service failed.  
Hint: Some lines were ellipsized, use -l to show in full.

Is there any good tutorial to set ELK on AWS Linux server? plz recommend to me...

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 20, 2020, 10:45pm UTC](https://discuss.elastic.co/t/elasticsearch-download-on-aws-ec2-linux/233575/2 "2020-05-20T22:45:43Z")

</div>

Welcome! 😃

Please look at your Elasticsearch logs, as they will have more information around the issue.  
Please also format your code/logs/config using the `</>` button, or markdown style back ticks. It helps to make things easy to read which helps us help you 🙂

---

<div class="post-metadata">

**Author:** ![Jun.8](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jun.8/32/68749_2.png) [@Jun.8](https://discuss.elastic.co/u/Jun.8)\
**Post date:** [May 22, 2020, 2:39pm UTC](https://discuss.elastic.co/t/elasticsearch-download-on-aws-ec2-linux/233575/3 "2020-05-22T14:39:19Z")

</div>

```
[ec2-user@ip-10-0-1-141 bin]$ 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 Fri 2020-05-22 14:32:49 UTC; 16s ago
     Docs: https://www.elastic.co
  Process: 20645 ExecStart=/usr/share/elasticsearch/bin/systemd-entrypoint -p ${PID_DIR}/elasticsearch.pid --quiet (c ode=exited, status=1/FAILURE)
 Main PID: 20645 (code=exited, status=1/FAILURE)

May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: OpenJDK 64-Bit Server VM ...
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: at org.elasticsearch.tool...
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: at org.elasticsearch.tool...
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: at org.elasticsearch.tool...
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: at org.elasticsearch.tool...
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: at org.elasticsearch.tool...
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd[1]: elasticsearch.service: main process ex...RE
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd[1]: Failed to start Elasticsearch.
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd[1]: Unit elasticsearch.service entered fai...e.
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd[1]: elasticsearch.service failed.
Hint: Some lines were ellipsized, use -l to show in full.Preformatted text
```

---

<div class="post-metadata">

**Author:** ![Jun.8](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jun.8/32/68749_2.png) [@Jun.8](https://discuss.elastic.co/u/Jun.8)\
**Post date:** [May 22, 2020, 2:40pm UTC](https://discuss.elastic.co/t/elasticsearch-download-on-aws-ec2-linux/233575/4 "2020-05-22T14:40:03Z")

</div>

```
[ec2-user@ip-10-0-1-141 bin]$ journalctl -xe
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit user-0.slice has finished shutting down.
May 22 14:30:01 ip-10-0-1-141.ap-northeast-2.compute.internal systemd[1]: Stopping User Slice of root.
-- Subject: Unit user-0.slice has begun shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit user-0.slice has begun shutting down.
May 22 14:31:39 ip-10-0-1-141.ap-northeast-2.compute.internal dhclient[3063]: XMT: Solicit on eth0, interval 112970ms.
May 22 14:32:46 ip-10-0-1-141.ap-northeast-2.compute.internal sudo[20641]: ec2-user : TTY=pts/0 ; PWD=/usr/share/elasticsea
May 22 14:32:46 ip-10-0-1-141.ap-northeast-2.compute.internal sudo[20641]: pam_unix(sudo:session): session opened for user
May 22 14:32:46 ip-10-0-1-141.ap-northeast-2.compute.internal systemd[1]: Starting Elasticsearch...
-- Subject: Unit elasticsearch.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit elasticsearch.service has begun starting up.
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: Exception in thread "main" java.la
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: output:
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: #
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: # There is insufficient memory for
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: # Native memory allocation (mmap)
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: # An error report file with more i
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: # /var/log/elasticsearch/hs_err_pi
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: error:
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: OpenJDK 64-Bit Server VM warning:
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: at org.elasticsearch.tools.launche
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: at org.elasticsearch.tools.launche
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: at org.elasticsearch.tools.launche
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: at org.elasticsearch.tools.launche
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: at org.elasticsearch.tools.launche
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd[1]: elasticsearch.service: main process exited, code=
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd[1]: Failed to start Elasticsearch.
-- Subject: Unit elasticsearch.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit elasticsearch.service has failed.
```

---

<div class="post-metadata">

**Author:** ![Jun.8](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jun.8/32/68749_2.png) [@Jun.8](https://discuss.elastic.co/u/Jun.8)\
**Post date:** [May 22, 2020, 2:40pm UTC](https://discuss.elastic.co/t/elasticsearch-download-on-aws-ec2-linux/233575/5 "2020-05-22T14:40:49Z")

</div>

```
-- The result is failed.
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd[1]: Unit elasticsearch.service entered failed state.
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd[1]: elasticsearch.service failed.
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal sudo[20641]: pam_unix(sudo:session): session closed for user root
May 22 14:33:32 ip-10-0-1-141.ap-northeast-2.compute.internal dhclient[3063]: XMT: Solicit on eth0, interval 116550ms.
lines 2038-2082/2082 (END)
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit user-0.slice has finished shutting down.
May 22 14:30:01 ip-10-0-1-141.ap-northeast-2.compute.internal systemd[1]: Stopping User Slice of root.
-- Subject: Unit user-0.slice has begun shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit user-0.slice has begun shutting down.
May 22 14:31:39 ip-10-0-1-141.ap-northeast-2.compute.internal dhclient[3063]: XMT: Solicit on eth0, interval 112970ms.
May 22 14:32:46 ip-10-0-1-141.ap-northeast-2.compute.internal sudo[20641]: ec2-user : TTY=pts/0 ; PWD=/usr/share/elasticsearch/bin ; USER=root ; COMMAND=/bin/systemctl start elasticsearch
May 22 14:32:46 ip-10-0-1-141.ap-northeast-2.compute.internal sudo[20641]: pam_unix(sudo:session): session opened for user root by ec2-user(uid=0)
May 22 14:32:46 ip-10-0-1-141.ap-northeast-2.compute.internal systemd[1]: Starting Elasticsearch...
-- Subject: Unit elasticsearch.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit elasticsearch.service has begun starting up.
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: Exception in thread "main" java.lang.RuntimeException: starting java failed with [1]
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: output:
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: #
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: # There is insufficient memory for the Java Runtime Environment to continue.
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: # Native memory allocation (mmap) failed to map 1073741824 bytes for committing reserved memory.
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: # An error report file with more information is saved as:
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: # /var/log/elasticsearch/hs_err_pid20765.log
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: error:
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000c0000000, 1073741824, 0) failed;
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: at org.elasticsearch.tools.launchers.JvmErgonomics.flagsFinal(JvmErgonomics.java:126)
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: at org.elasticsearch.tools.launchers.JvmErgonomics.finalJvmOptions(JvmErgonomics.java:88)
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: at org.elasticsearch.tools.launchers.JvmErgonomics.choose(JvmErgonomics.java:59)
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: at org.elasticsearch.tools.launchers.JvmOptionsParser.jvmOptions(JvmOptionsParser.java:139)
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:95)
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd[1]: Failed to start Elasticsearch.
-- Subject: Unit elasticsearch.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit elasticsearch.service has failed.
--
-- The result is failed.
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd[1]: Unit elasticsearch.service entered failed state.
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd[1]: elasticsearch.service failed.
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal sudo[20641]: pam_unix(sudo:session): session closed for user root
May 22 14:33:32 ip-10-0-1-141.ap-northeast-2.compute.internal dhclient[3063]: XMT: Solicit on eth0, interval 116550ms.
lines 2038-2082/2082 (END)
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit user-0.slice has finished shutting down.
May 22 14:30:01 ip-10-0-1-141.ap-northeast-2.compute.internal systemd[1]: Stopping User Slice of root.
-- Subject: Unit user-0.slice has begun shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit user-0.slice has begun shutting down.
May 22 14:31:39 ip-10-0-1-141.ap-northeast-2.compute.internal dhclient[3063]: XMT: Solicit on eth0, interval 112970ms.
May 22 14:32:46 ip-10-0-1-141.ap-northeast-2.compute.internal sudo[20641]: ec2-user : TTY=pts/0 ; PWD=/usr/share/elasticsearch/bin ; USER=root ; COMMAND=/bin/systemctl start elasticsearch
May 22 14:32:46 ip-10-0-1-141.ap-northeast-2.compute.internal sudo[20641]: pam_unix(sudo:session): session opened for user root by ec2-user(uid=0)
May 22 14:32:46 ip-10-0-1-141.ap-northeast-2.compute.internal systemd[1]: Starting Elasticsearch...
-- Subject: Unit elasticsearch.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit elasticsearch.service has begun starting up.
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: Exception in thread "main" java.lang.RuntimeException: starting java failed with [1]
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: output:
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: #
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: # There is insufficient memory for the Java Runtime Environment to continue.
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: # Native memory allocation (mmap) failed to map 1073741824 bytes for committing reserved memory.
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: # An error report file with more information is saved as:
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: # /var/log/elasticsearch/hs_err_pid20765.log
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: error:
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000c0000000, 1073741824, 0) failed; error
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: at org.elasticsearch.tools.launchers.JvmErgonomics.flagsFinal(JvmErgonomics.java:126)
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: at org.elasticsearch.tools.launchers.JvmErgonomics.finalJvmOptions(JvmErgonomics.java:88)
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: at org.elasticsearch.tools.launchers.JvmErgonomics.choose(JvmErgonomics.java:59)
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: at org.elasticsearch.tools.launchers.JvmOptionsParser.jvmOptions(JvmOptionsParser.java:139)
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd-entrypoint[20645]: at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:95)
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd[1]: Failed to start Elasticsearch.
-- Subject: Unit elasticsearch.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit elasticsearch.service has failed.
--
-- The result is failed.
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd[1]: Unit elasticsearch.service entered failed state.
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal systemd[1]: elasticsearch.service failed.
May 22 14:32:49 ip-10-0-1-141.ap-northeast-2.compute.internal sudo[20641]: pam_unix(sudo:session): session closed for user root
May 22 14:33:32 ip-10-0-1-141.ap-northeast-2.compute.internal dhclient[3063]: XMT: Solicit on eth0, interval 116550ms.
```

---

<div class="post-metadata">

**Author:** ![Jun.8](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jun.8/32/68749_2.png) [@Jun.8](https://discuss.elastic.co/u/Jun.8)\
**Post date:** [May 22, 2020, 2:41pm UTC](https://discuss.elastic.co/t/elasticsearch-download-on-aws-ec2-linux/233575/6 "2020-05-22T14:41:59Z")

</div>

I've used two commands like above. First one is 'systemctl status elasticsearch.service'  
and second one is 'journalctl -xe'  
But I don't know where the problem is...  
And I also added error message from log files below.

---

<div class="post-metadata">

**Author:** ![Jun.8](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jun.8/32/68749_2.png) [@Jun.8](https://discuss.elastic.co/u/Jun.8)\
**Post date:** [May 22, 2020, 4:05pm UTC](https://discuss.elastic.co/t/elasticsearch-download-on-aws-ec2-linux/233575/7 "2020-05-22T16:05:54Z")

</div>

```
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 1073741824 bytes for committing reserved memory.
# Possible reasons:
# The system is out of physical RAM or swap space
# The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap
# Possible solutions:
# Reduce memory load on the system
# Increase physical memory or swap space
# Check if swap backing store is full
# Decrease Java heap size (-Xmx/-Xms)
# Decrease number of Java threads
# Decrease Java thread stack sizes (-Xss)
# Set larger code cache with -XX:ReservedCodeCacheSize=
# JVM is running with Unscaled Compressed Oops mode in which the Java heap is
# placed in the first 4GB address space. The Java Heap base address is the
# maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress
# to set the Java Heap base and to place the Java Heap above 4GB virtual address.
# This output file may be truncated or incomplete.
#
# Out of Memory Error (os_linux.cpp:2908), pid=21234, tid=21235
#
# JRE version: (14.0+36) (build )
# Java VM: OpenJDK 64-Bit Server VM (14+36, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
```

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 25, 2020, 12:10am UTC](https://discuss.elastic.co/t/elasticsearch-download-on-aws-ec2-linux/233575/8 "2020-05-25T00:10:14Z")

</div>

How much memory does your host have?

---

<div class="post-metadata">

**Author:** ![Jun.8](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jun.8/32/68749_2.png) [@Jun.8](https://discuss.elastic.co/u/Jun.8)\
**Post date:** [May 25, 2020, 5:04am UTC](https://discuss.elastic.co/t/elasticsearch-download-on-aws-ec2-linux/233575/9 "2020-05-25T05:04:55Z")

</div>

You mean the memory when I set my AWS server?  
Is this related to setting for AWS linux server, not my local environment, right?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 25, 2020, 5:12am UTC](https://discuss.elastic.co/t/elasticsearch-download-on-aws-ec2-linux/233575/10 "2020-05-25T05:12:40Z")

</div>

Yes, how much RAM does the underlying host/VM have?

---

<div class="post-metadata">

**Author:** ![Jun.8](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jun.8/32/68749_2.png) [@Jun.8](https://discuss.elastic.co/u/Jun.8)\
**Post date:** [May 27, 2020, 2:51pm UTC](https://discuss.elastic.co/t/elasticsearch-download-on-aws-ec2-linux/233575/11 "2020-05-27T14:51:26Z")

</div>

I have set my linux server for t2.micro meaning that 1g memory.  
Do I need to change some code files like elasticsearch.yml?

2020년 5월 25일 (월) 오후 2:22, Mark Walkom via Discuss the Elastic Stack \<[elastic@discoursemail.com](mailto:elastic@discoursemail.com)\>님이 작성:

---

<div class="post-metadata">

**Author:** ![Jun.8](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jun.8/32/68749_2.png) [@Jun.8](https://discuss.elastic.co/u/Jun.8)\
**Post date:** [May 27, 2020, 4:53pm UTC](https://discuss.elastic.co/t/elasticsearch-download-on-aws-ec2-linux/233575/12 "2020-05-27T16:53:14Z")

</div>

I solved this problem already. But it still doesn't work for me.  
So I uninstalled elasticsearch and reinstall it using tar.gz file not rpm packages.  
But I also checked some problems of this version...  
when I input "bin/elasticsearch", the message is like below.  
`could not find java in JAVA_HOME at /usr/java/jdk1.8.0_60/jre/bin/java`  
I already installed java-1.8.0-openjdk, plz help me.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 27, 2020, 9:51pm UTC](https://discuss.elastic.co/t/elasticsearch-download-on-aws-ec2-linux/233575/13 "2020-05-27T21:51:40Z")

</div>

By default, Elasticsearch will want to use 1GB of memory, so you need to reduce that to something like 512MB for that sized host.

---

<div class="post-metadata">

**Author:** ![Jun.8](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jun.8/32/68749_2.png) [@Jun.8](https://discuss.elastic.co/u/Jun.8)\
**Post date:** [May 28, 2020, 2:04pm UTC](https://discuss.elastic.co/t/elasticsearch-download-on-aws-ec2-linux/233575/14 "2020-05-28T14:04:55Z")

</div>

Hi, thank you for your answers. I have started new AWS linux server for clear start.  
I used tar.gz file to download elasticsearch and first installed java-1.8.0-openjdk.  
But I had a problem like below. Basically I could not start elasticsearch, it had errors.  
I already set jvm.options and elasticsearch.yml like "network host: my server address / localhost: 9200"

```
Caused by: java.net.BindException: Cannot assign requested address
        at sun.nio.ch.Net.bind0(Native Method) ~[?:?]
        at sun.nio.ch.Net.bind(Net.java:479) ~[?:?]
        at sun.nio.ch.Net.bind(Net.java:468) ~[?:?]
        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:220) ~[?:?]
        at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:134) ~[?:?]
        at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:550) ~[?:?]
        at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1334) ~[?:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:504) ~[?:?]
        at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:489) ~[?:?]
        at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:973) ~[?:?]
        at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:248) ~[?:?]
        at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:348) ~[?:?]
        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164) ~[?:?]
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472) ~[?:?]
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500) ~[?:?]
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) ~[?:?]
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[?:?]
        at java.lang.Thread.run(Thread.java:832) [?:?]
uncaught exception in thread [main]
BindTransportException[Failed to bind to 15.165.207.110:[9300-9400]]; nested: BindException[Cannot assign requested add ress];
Likely root cause: java.net.BindException: Cannot assign requested address
        at java.base/sun.nio.ch.Net.bind0(Native Method)
        at java.base/sun.nio.ch.Net.bind(Net.java:479)
        at java.base/sun.nio.ch.Net.bind(Net.java:468)
        at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:220)
        at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:134)
        at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:550)
        at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1334)
        at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:504)
        at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:489)
        at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:973)
        at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:248)
        at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:348)
        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at java.base/java.lang.Thread.run(Thread.java:832)
```

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 28, 2020, 10:10pm UTC](https://discuss.elastic.co/t/elasticsearch-download-on-aws-ec2-linux/233575/15 "2020-05-28T22:10:15Z")

</div>

> [@Jun.8](#):
>
> `Cannot assign requested address`

Does that IP exist on any interface on the host?

---

<div class="post-metadata">

**Author:** ![Jun.8](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jun.8/32/68749_2.png) [@Jun.8](https://discuss.elastic.co/u/Jun.8)\
**Post date:** [May 30, 2020, 1:23pm UTC](https://discuss.elastic.co/t/elasticsearch-download-on-aws-ec2-linux/233575/16 "2020-05-30T13:23:30Z")

</div>

Yes, I set my AWS instance server IP at network.host in elasticsearch.yml...  
I also added port 9200 in security group in my AWS instance server.

I have changed the IP address in my hosts file same with my AWS server IP, but it didn't work.

---

<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:** [June 27, 2020, 1:23pm UTC](https://discuss.elastic.co/t/elasticsearch-download-on-aws-ec2-linux/233575/17 "2020-06-27T13:23:39Z")

</div>

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