# java.lang.IllegalStateException while running logstash

**URL:** <https://discuss.elastic.co/t/java-lang-illegalstateexception-while-running-logstash/185343>\
**Category:** Logstash\
**Created:** [June 12, 2019, 7:02am UTC](https://discuss.elastic.co/t/java-lang-illegalstateexception-while-running-logstash/185343 "2019-06-12T07:02:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![s23deepak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/s23deepak/32/47921_2.png) [@s23deepak](https://discuss.elastic.co/u/s23deepak)\
**Post date:** [June 12, 2019, 7:02am UTC](https://discuss.elastic.co/t/java-lang-illegalstateexception-while-running-logstash/185343/1 "2019-06-12T07:02:59Z")

</div>

I have tried to run logstash using the following command on Centos:

> sudo -u logstash /usr/share/logstash/bin/logstash -f /etc/logstash/conf.d/indexing.conf --path.settings /etc/logstash

After running the above command i got the following error:

> 2019-06-12 12:04:40,936 main ERROR Null object returned for RollingFile in Appenders.  
> 2019-06-12 12:04:40,937 main ERROR Null object returned for RollingFile in Appenders.  
> 2019-06-12 12:04:40,937 main ERROR Unable to locate appender "plain\_rolling" for logger config "root"  
> 2019-06-12 12:04:40,938 main ERROR Unable to locate appender "plain\_rolling\_slowlog" for logger config "slowlog"  
> [2019-06-12T12:04:41,385][WARN][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified  
> ERROR: Settings 'path.config' (-f) or 'config.string' (-e) can't be used in conjunction with (--modules) or the "modules:" block in the logstash.yml file.  
> usage:  
> bin/logstash -f CONFIG\_PATH [-t] [-r] [\*] [-w COUNT] [-l LOG]  
> bin/logstash --modules MODULE\_NAME [-M "MODULE\_NAME.var.PLUGIN\_TYPE.PLUGIN\_NAME.VARIABLE\_NAME=VALUE"] [-t] [-w COUNT] [-l LOG]  
> bin/logstash -e CONFIG\_STR [-t] [--log.level fatal|error|warn|info|debug|trace] [-w COUNT] [-l LOG]  
> bin/logstash -i SHELL [--log.level fatal|error|warn|info|debug|trace]  
> bin/logstash -V [--log.level fatal|error|warn|info|debug|trace]  
> bin/logstash --help  
> [2019-06-12T12:04:41,412][ERROR][org.logstash.Logstash] java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit

the only part i have changed in /etc/logstash/logstash.yml file is:

> # ------------ Module Settings ---------------
> 
> modules:  
> - name: netflow  
> var.input.udp.port: 5044

And if i comment the whole Module settings and run the first specified sudo command, then i get the following:

> 2019-06-12 12:28:11,227 main ERROR Null object returned for RollingFile in Appenders.  
> 2019-06-12 12:28:11,228 main ERROR Null object returned for RollingFile in Appenders.  
> 2019-06-12 12:28:11,228 main ERROR Unable to locate appender "plain\_rolling" for logger config "root"  
> 2019-06-12 12:28:11,229 main ERROR Unable to locate appender "plain\_rolling\_slowlog" for logger config "slowlog"  
> [2019-06-12T12:28:11,685][WARN][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified  
> [2019-06-12T12:28:12,229][INFO][logstash.runner] Starting Logstash {"logstash.version"=\>"6.3.1"}  
> [2019-06-12T12:28:16,196][INFO][logstash.pipeline] Starting pipeline {:pipeline\_id=\>"main", "pipeline.workers"=\>8, "pipeline.batch.size"=\>125, "pipeline.batch.delay"=\>50}  
> [2019-06-12T12:28:36,670][INFO][logstash.pipeline] Pipeline started successfully {:pipeline\_id=\>"main", :thread=\>"#\<Thread:0x68354a8a sleep\>"}  
> [2019-06-12T12:28:36,732][INFO][logstash.agent] Pipelines running {:count=\>1, :running\_pipelines=\>[:main], :non\_running\_pipelines=\>}  
> [2019-06-12T12:28:36,965][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=\>9601}

At this point it just stops there and also doesn't take any inputs.

Please let me know how to resolve this issue. I am beginner in ELK stack.  
Thank you.

---

<div class="post-metadata">

**Author:** ![yaauie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yaauie/32/23363_2.png) [@yaauie](https://discuss.elastic.co/u/yaauie)\
**Post date:** [June 13, 2019, 1:14am UTC](https://discuss.elastic.co/t/java-lang-illegalstateexception-while-running-logstash/185343/2 "2019-06-13T01:14:10Z")

</div>

> [@s23deepak](#):
>
> `ERROR: Settings 'path.config' (-f) or 'config.string' (-e) can't be used in conjunction with (--modules) or the "modules:" block in the logstash.yml file.`

Unfortunately, the logstash modules cannot be run simultaneously in the same process with other pipelines; your solution to comment out modules was the correct path forward if you intend to run the pipelines configured in `/etc/logstash/conf.d/indexing.conf`.

* * *

Once you did that, Logstash started up normally. I can see that one pipeline started.

What inputs do you have defined in `/etc/logstash/conf.d/indexing.conf`, and how are you sending data to the Logstash node?

---

<div class="post-metadata">

**Author:** ![s23deepak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/s23deepak/32/47921_2.png) [@s23deepak](https://discuss.elastic.co/u/s23deepak)\
**Post date:** [June 13, 2019, 11:04am UTC](https://discuss.elastic.co/t/java-lang-illegalstateexception-while-running-logstash/185343/3 "2019-06-13T11:04:29Z")

</div>

Hello yaauie,  
Thank you for explaining the error in detail, now that i have understood the error I have commented the path in `/etc/logstash/conf.d/indexing.conf` ,then ran the sudo command as I have specified at the beginning and logstash ran successfully .

---

<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:** [July 11, 2019, 11:19am UTC](https://discuss.elastic.co/t/java-lang-illegalstateexception-while-running-logstash/185343/4 "2019-07-11T11:19:23Z")

</div>

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