# Logstash process as startup process

**URL:** <https://discuss.elastic.co/t/logstash-process-as-startup-process/84205>\
**Category:** Logstash\
**Created:** [May 2, 2017, 6:02am UTC](https://discuss.elastic.co/t/logstash-process-as-startup-process/84205 "2017-05-02T06:02:26Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kishore](https://avatars.discourse-cdn.com/v4/letter/k/8edcca/32.png) [@Kishore](https://discuss.elastic.co/u/Kishore)\
**Post date:** [May 2, 2017, 6:02am UTC](https://discuss.elastic.co/t/logstash-process-as-startup-process/84205/1 "2017-05-02T06:02:26Z")

</div>

We are using logstash 2.1.1 version and running 5 different logstash process on RHEL, my concern is that whenever the servers goes down these process are getting stopped and these process are require to start manually when they started.

Kindly suggest me that ' **how to add logstash process to the RHEL startup or suggest me the best approach**'.

Thanks in Advance.

Regards  
Kishore Uppala

---

<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 2, 2017, 6:14am UTC](https://discuss.elastic.co/t/logstash-process-as-startup-process/84205/2 "2017-05-02T06:14:24Z")

</div>

This is an OS dependant thing, you should check the documentation for RHEL.

---

<div class="post-metadata">

**Author:** ![Kishore](https://avatars.discourse-cdn.com/v4/letter/k/8edcca/32.png) [@Kishore](https://discuss.elastic.co/u/Kishore)\
**Post date:** [May 2, 2017, 7:25am UTC](https://discuss.elastic.co/t/logstash-process-as-startup-process/84205/3 "2017-05-02T07:25:35Z")

</div>

Thanks Mark,

As you suggested, i am trying to work on OS level, but when i run the logstash service, it is getting stopped in the middle and throwing below error msg

```
 {:timestamp=>"2017-05-02T03:17:57.535000-0400", :message=>"You are using a deprecated config setting \"message_format\" set in file. Deprecated settings will continue to work, but are scheduled for removal from logstash in the future. You can achieve the same behavior with the 'line' codec If you have any questions about this, please visit the #logstash channel on freenode irc.", :name=>"message_format", :plugin=><LogStash::Outputs::File path=>"/opt/logstash/bruteforce.yml", message_format=>"%{src_ip}: login_failed">, :level=>:warn}
{:timestamp=>"2017-05-02T03:17:58.598000-0400", :message=>"Pipeline main started"}
{:timestamp=>"2017-05-02T03:17:58.703000-0400", :message=>"Pipeline main has been shutdown"}
{:timestamp=>"2017-05-02T03:18:01.604000-0400", :message=>"stopping pipeline", :id=>"main"}

```

Please help me out running logstash as service.

---

<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 2, 2017, 7:27am UTC](https://discuss.elastic.co/t/logstash-process-as-startup-process/84205/4 "2017-05-02T07:27:17Z")

</div>

How did you install it, RPM, tar.gz?

---

<div class="post-metadata">

**Author:** ![Kishore](https://avatars.discourse-cdn.com/v4/letter/k/8edcca/32.png) [@Kishore](https://discuss.elastic.co/u/Kishore)\
**Post date:** [May 2, 2017, 7:28am UTC](https://discuss.elastic.co/t/logstash-process-as-startup-process/84205/5 "2017-05-02T07:28:14Z")

</div>

I installed through RPM.

---

<div class="post-metadata">

**Author:** ![Xavy](https://avatars.discourse-cdn.com/v4/letter/x/e0b2c6/32.png) [@Xavy](https://discuss.elastic.co/u/Xavy)\
**Post date:** [May 2, 2017, 7:36am UTC](https://discuss.elastic.co/t/logstash-process-as-startup-process/84205/6 "2017-05-02T07:36:59Z")

</div>

For rpm package it should be enough with setting LS systemctl service entry to enabled (it is disabled by default).

If you ahve already done son (as it looks based on your logs), I would suggest checking out /var/log/logstash/\* logs to look for the cause why it is not being able to start (have you made sure to have Java 8 installed?) I've recently found that jre is not set up as a dependency

---

<div class="post-metadata">

**Author:** ![Kishore](https://avatars.discourse-cdn.com/v4/letter/k/8edcca/32.png) [@Kishore](https://discuss.elastic.co/u/Kishore)\
**Post date:** [May 2, 2017, 9:37am UTC](https://discuss.elastic.co/t/logstash-process-as-startup-process/84205/7 "2017-05-02T09:37:36Z")

</div>

> [@Kishore](#):
>
> Pipeline main has been shutdown

Thanks Javier,

I have already pasted the logs from the mentioned location and java also installed. What might be the other issues.

---

<div class="post-metadata">

**Author:** ![Xavy](https://avatars.discourse-cdn.com/v4/letter/x/e0b2c6/32.png) [@Xavy](https://discuss.elastic.co/u/Xavy)\
**Post date:** [May 2, 2017, 2:30pm UTC](https://discuss.elastic.co/t/logstash-process-as-startup-process/84205/8 "2017-05-02T14:30:42Z")

</div>

Hi there:

Please increase log verbosity by uncomenting log.level: directive and set it to debug .  
Uncommenting config.debug: directive might help as well.

Case did not printed anything else (or anything useful) I would suggest you running the java command by hand (which would be something like

`/usr/bin/java -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+DisableExplicitGC -Djava.awt.headless=true -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError -Xmx1g -Xms256m -Xss2048k -Djffi.boot.library.path=/usr/share/logstash/vendor/jruby/lib/jni -Xbootclasspath/a:/usr/share/logstash/vendor/jruby/lib/jruby.jar -classpath : -Djruby.home=/usr/share/logstash/vendor/jruby -Djruby.lib=/usr/share/logstash/vendor/jruby/lib -Djruby.script=jruby -Djruby.shell=/bin/sh org.jruby.Main /usr/share/logstash/lib/bootstrap/environment.rb logstash/runner.rb --path.settings /etc/logstash`

depending on your settings)

---

<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:** [May 30, 2017, 2:38pm UTC](https://discuss.elastic.co/t/logstash-process-as-startup-process/84205/9 "2017-05-30T14:38:26Z")

</div>

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