# Logstash not starting

**URL:** https://discuss.elastic.co/t/logstash-not-starting/313807
**Category:** Logstash
**Created:** [September 6, 2022, 3:00pm UTC](https://discuss.elastic.co/t/logstash-not-starting/313807 "2022-09-06T15:00:11Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![mancharagopan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mancharagopan/32/60266_2.png) [@mancharagopan](https://discuss.elastic.co/u/mancharagopan)
#### Post date: [September 6, 2022, 3:00pm UTC](https://discuss.elastic.co/t/logstash-not-starting/313807/1 "2022-09-06T15:00:11Z")

</div>

I just installed logstash 8.4.1 on an Ubuntu VM. When i start the service It doesn't start and keep throwing this error.

```auto
Log4j configuration path used is: /etc/logstash/log4j2.properties
[2022-09-06T14:56:04,394][INFO][logstash.runner] Starting Logstash {"logstash.version"=>"8.4.1", "jruby.version"=>"jruby 9.3.6.0 (2.6.8) 2022-06-27 7a2cbcd376 OpenJDK 64-Bit Server VM 17.0.4+8 on 17.0.4+8 +indy +jit [x86_64-linux]"}
[2022-09-06T14:56:04,398][INFO][logstash.runner] JVM bootstrap flags: [-Xms1g, -Xmx1g, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djruby.compile.invokedynamic=true, -Djruby.jit.threshold=0, -XX:+HeapDumpOnOutOfMemoryError, -Djava.security.egd=file:/dev/urandom, -Dlog4j2.isThreadContextMapInheritable=true, -Djruby.regexp.interruptible=true, -Djdk.io.File.enableADS=true, --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED, --add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED, --add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED, --add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED, --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED, --add-opens=java.base/java.security=ALL-UNNAMED, --add-opens=java.base/java.io=ALL-UNNAMED, --add-opens=java.base/java.nio.channels=ALL-UNNAMED, --add-opens=java.base/sun.nio.ch=ALL-UNNAMED, --add-opens=java.management/sun.management=ALL-UNNAMED]
[2022-09-06T14:56:04,408][DEBUG][logstash.modules.scaffold] Found module {:module_name=>"fb_apache", :directory=>"/usr/share/logstash/modules/fb_apache/configuration"}
[2022-09-06T14:56:04,411][DEBUG][logstash.plugins.registry] Adding plugin to the registry {:name=>"fb_apache", :type=>:modules, :class=>#<LogStash::Modules::Scaffold:0x3261b8bf @directory="/usr/share/logstash/modules/fb_apache/configuration", @module_name="fb_apache", @kibana_version_parts=["6", "0", "0"]>}
[2022-09-06T14:56:04,414][DEBUG][logstash.modules.scaffold] Found module {:module_name=>"netflow", :directory=>"/usr/share/logstash/modules/netflow/configuration"}
[2022-09-06T14:56:04,416][DEBUG][logstash.plugins.registry] Adding plugin to the registry {:name=>"netflow", :type=>:modules, :class=>#<LogStash::Modules::Scaffold:0x2d550996 @directory="/usr/share/logstash/modules/netflow/configuration", @module_name="netflow", @kibana_version_parts=["6", "0", "0"]>}
[2022-09-06T14:56:04,457][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:790) ~[jruby.jar:?]
        at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:753) ~[jruby.jar:?]
        at usr.share.logstash.lib.bootstrap.environment.<main>(/usr/share/logstash/lib/bootstrap/environment.rb:91) ~[?:?]

```

But it is working when i run this  
`sudo /usr/share/logstash/bin/logstash -f /etc/logstash/conf.d/sophos.conf --config.reload.automatic`

---

<div class="post-metadata">

### Author: ![rugenl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rugenl/32/12887_2.png) [@rugenl](https://discuss.elastic.co/u/rugenl)
#### Post date: [September 6, 2022, 3:26pm UTC](https://discuss.elastic.co/t/logstash-not-starting/313807/2 "2022-09-06T15:26:47Z")

</div>

Were there any messages before these showing what logstash config file is being used?

It looks like it's trying to load modules from an old 6.0 install, but I'm not sure.

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [September 6, 2022, 3:39pm UTC](https://discuss.elastic.co/t/logstash-not-starting/313807/3 "2022-09-06T15:39:31Z")

</div>

> [@mancharagopan](#):
>
> When i start the service It doesn't start and keep throwing this error.

Is that from /var/log/logstash? If so, make sure you configure the service to capture stdout/stderr, since some errors can be logged there that are not logged using log4j.

---

<div class="post-metadata">

### Author: ![mancharagopan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mancharagopan/32/60266_2.png) [@mancharagopan](https://discuss.elastic.co/u/mancharagopan)
#### Post date: [September 6, 2022, 4:07pm UTC](https://discuss.elastic.co/t/logstash-not-starting/313807/4 "2022-09-06T16:07:38Z")

</div>

I don't have any other older versions installed. There isn't any logs before that

---

<div class="post-metadata">

### Author: ![mancharagopan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mancharagopan/32/60266_2.png) [@mancharagopan](https://discuss.elastic.co/u/mancharagopan)
#### Post date: [September 6, 2022, 4:08pm UTC](https://discuss.elastic.co/t/logstash-not-starting/313807/5 "2022-09-06T16:08:32Z")

</div>

Yes it is from /var/log/logstash/logstash-plain.log  
How do it get the stdout/stderr output?

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [September 6, 2022, 4:11pm UTC](https://discuss.elastic.co/t/logstash-not-starting/313807/6 "2022-09-06T16:11:15Z")

</div>

> [@mancharagopan](#):
>
> How do it get the stdout/stderr output?

If you are on Ubuntu your service manager is probably systemd, and if you are using systemd you will probably have to `sudo journalctl ...` to view the process output. It's more of a systemd question than a logstash question.

---

<div class="post-metadata">

### Author: ![mancharagopan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mancharagopan/32/60266_2.png) [@mancharagopan](https://discuss.elastic.co/u/mancharagopan)
#### Post date: [September 6, 2022, 4:41pm UTC](https://discuss.elastic.co/t/logstash-not-starting/313807/7 "2022-09-06T16:41:58Z")

</div>

I have reinstalled logstash and it seams to be working

---

<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: [October 4, 2022, 4:42pm UTC](https://discuss.elastic.co/t/logstash-not-starting/313807/8 "2022-10-04T16:42:01Z")

</div>

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