# Logstash service fails to start due to Ruby Error

**URL:** <https://discuss.elastic.co/t/logstash-service-fails-to-start-due-to-ruby-error/300902>\
**Category:** Logstash\
**Created:** [March 29, 2022, 1:51am UTC](https://discuss.elastic.co/t/logstash-service-fails-to-start-due-to-ruby-error/300902 "2022-03-29T01:51:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ASA01](https://avatars.discourse-cdn.com/v4/letter/a/e19adc/32.png) [@ASA01](https://discuss.elastic.co/u/ASA01)\
**Post date:** [March 29, 2022, 1:51am UTC](https://discuss.elastic.co/t/logstash-service-fails-to-start-due-to-ruby-error/300902/1 "2022-03-29T01:51:45Z")

</div>

I cannot get logstash to start and keep running. I have verified all my logstash confs work individually with test\_and\_exit, but when I try to start it as a service I get the following error.

```auto
[2022-03-29T01:37:10,010][INFO][logstash.runner] Starting Logstash {"logstash.version"=>"7.17.1", "jruby.version"=>"jruby 9.2.20.1 (2.5.8) 2021-11-30 2a2962fbd1 OpenJDK 64-Bit Server VM 11.0.13+8 on 11.0.13+8 +indy +jit [linux-x86_64]"}
[2022-03-29T01:37:10,012][INFO][logstash.runner] JVM bootstrap flags: [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djruby.compile.invokedynamic=true, -Djruby.jit.threshold=0, -Djruby.regexp.interruptible=true, -XX:+HeapDumpOnOutOfMemoryError, -Djava.security.egd=file:/dev/urandom, -Dlog4j2.isThreadContextMapInheritable=true]
[2022-03-29T01:37:10,126][FATAL][org.logstash.Logstash] Logstash stopped processing because of an error: (SystemExit) exit
org.jruby.exceptions.SystemExit: (SystemExit) exit
        at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:747) ~[jruby-complete-9.2.20.1.jar:?]
        at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:710) ~[jruby-complete-9.2.20.1.jar:?]
        at usr.share.logstash.lib.bootstrap.environment.<main>(/usr/share/logstash/lib/bootstrap/environment.rb:94) ~[?:?]

```

This is running in CentOS. Let me know what additional information you need and thank you for your help.

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [March 29, 2022, 2:05am UTC](https://discuss.elastic.co/t/logstash-service-fails-to-start-due-to-ruby-error/300902/2 "2022-03-29T02:05:58Z")

</div>

This is the entire log error?

Please share the configs you are trying to run.

Are you using multiple pipelines with `pipelines.yml` ?

Also, do you have anything about logstash in `/var/log/messages` when you are trying to start logstash as a service?

---

<div class="post-metadata">

**Author:** ![ASA01](https://avatars.discourse-cdn.com/v4/letter/a/e19adc/32.png) [@ASA01](https://discuss.elastic.co/u/ASA01)\
**Post date:** [March 29, 2022, 12:45pm UTC](https://discuss.elastic.co/t/logstash-service-fails-to-start-due-to-ruby-error/300902/3 "2022-03-29T12:45:25Z")

</div>

Thank you so much for your time. I appreciate your help. I have ironed out the problem. Someone updated the system and in the process also adjusted the time zone incorrectly. Once I was looking at the correct timeframe I found the messages to adjust a couple permissions and set some environment variables. It is running now.

---

<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:** [April 26, 2022, 12:46pm UTC](https://discuss.elastic.co/t/logstash-service-fails-to-start-due-to-ruby-error/300902/4 "2022-04-26T12:46:04Z")

</div>

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