# Cannot Start Logstash

**URL:** <https://discuss.elastic.co/t/cannot-start-logstash/167697>\
**Category:** Logstash\
**Created:** [February 9, 2019, 12:53am UTC](https://discuss.elastic.co/t/cannot-start-logstash/167697 "2019-02-09T00:53:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Murr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/murr/32/40742_2.png) [@Murr](https://discuss.elastic.co/u/Murr)\
**Post date:** [February 9, 2019, 12:53am UTC](https://discuss.elastic.co/t/cannot-start-logstash/167697/1 "2019-02-09T00:53:28Z")

</div>

I cannot install logstash successfully.

1. I tried to do this

sudo /usr/share/logstash/bin/system-install /etc/logstash/startup.options systemd

The output is

Using provided startup.options file: /etc/logstash/startup.options  
Manually creating startup for specified platform: systemd  
Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit\_memory(0x00000000c53 30000, 986513408, 0) failed; error='Cannot allocate memory' (errno=12)  
/usr/share/logstash/bin/system-install: line 88: #: command not found  
Unable to install system startup script for Logstash.

1. I tried to do this

/usr/share/logstash/bin/system-install

The output is

/usr/share/logstash/bin/system-install: line 45: : No such file or directory

Does any solution please?

Thanks

---

<div class="post-metadata">

**Author:** ![pjanzen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pjanzen/32/13756_2.png) [@pjanzen](https://discuss.elastic.co/u/pjanzen)\
**Post date:** [February 9, 2019, 3:03pm UTC](https://discuss.elastic.co/t/cannot-start-logstash/167697/2 "2019-02-09T15:03:45Z")

</div>

The error is not logstash specific. It is a java error.

have [a read here](https://confluence.atlassian.com/bitbucketserverkb/forking-jvm-error-12-cannot-allocate-memory-or-error-12-not-enough-space-779171744.html) it might help.

---

<div class="post-metadata">

**Author:** ![Murr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/murr/32/40742_2.png) [@Murr](https://discuss.elastic.co/u/Murr)\
**Post date:** [February 9, 2019, 3:13pm UTC](https://discuss.elastic.co/t/cannot-start-logstash/167697/3 "2019-02-09T15:13:01Z")

</div>

I try to do this trick

> [@Problem to install logstash using deb file on ubuntu 16.0.4](https://discuss.elastic.co/t/problem-to-install-logstash-using-deb-file-on-ubuntu-16-0-4/121092/9):
>
> and finally, I found my problem! on this result of installation: elk@elk:~$ sudo dpkg --install logstash-6.2.2.deb Selecting previously unselected package logstash. (Reading database ... 116903 files and directories currently installed.) Preparing to unpack logstash-6.2.2.deb ... Unpacking logstash (1:6.2.2-1) ... Setting up logstash (1:6.2.2-1) ... Using provided startup.options file: /etc/logstash/startup.options /usr/share/logstash/vendor/jruby/bin/jruby: line 401: /usr/bin/java: No such fi…

But I can not extract the file.tar.gz

---

<div class="post-metadata">

**Author:** ![pjanzen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pjanzen/32/13756_2.png) [@pjanzen](https://discuss.elastic.co/u/pjanzen)\
**Post date:** [February 9, 2019, 3:16pm UTC](https://discuss.elastic.co/t/cannot-start-logstash/167697/4 "2019-02-09T15:16:54Z")

</div>

Hi Achmad,

There are no tricks in IT 🙂 The error clearly says what the problem is. You dont have java installed on the machine your trying to install logstash.

I am not sure how and what and why but mabey a clear guide can help.

Please have a read [here](https://www.digitalocean.com/community/tutorials/how-to-install-elasticsearch-logstash-and-kibana-elk-stack-on-ubuntu-14-04) and I think this will push you in the right direction..

Paul.

---

<div class="post-metadata">

**Author:** ![Murr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/murr/32/40742_2.png) [@Murr](https://discuss.elastic.co/u/Murr)\
**Post date:** [February 9, 2019, 3:19pm UTC](https://discuss.elastic.co/t/cannot-start-logstash/167697/5 "2019-02-09T15:19:16Z")

</div>

It maybe the RAM is too small, I will upgrade the RAM

---

<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:** [March 9, 2019, 3:19pm UTC](https://discuss.elastic.co/t/cannot-start-logstash/167697/6 "2019-03-09T15:19:17Z")

</div>

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