# My Logstash throws error stating JavaLang::illegal state exception. I have attached my config file below. can someone help me out?

**URL:** <https://discuss.elastic.co/t/my-logstash-throws-error-stating-javalang-illegal-state-exception-i-have-attached-my-config-file-below-can-someone-help-me-out/218143>\
**Category:** Logstash\
**Created:** [February 6, 2020, 10:37am UTC](https://discuss.elastic.co/t/my-logstash-throws-error-stating-javalang-illegal-state-exception-i-have-attached-my-config-file-below-can-someone-help-me-out/218143 "2020-02-06T10:37:34Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![ropc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ropc/32/47022_2.png) [@ropc](https://discuss.elastic.co/u/ropc)\
**Post date:** [February 7, 2020, 8:01am UTC](https://discuss.elastic.co/t/my-logstash-throws-error-stating-javalang-illegal-state-exception-i-have-attached-my-config-file-below-can-someone-help-me-out/218143/4 "2020-02-07T08:01:37Z")

</div>

@Varun_Saraf - In the future, it would be best if you share the debug logs in a text format and use the formatting feature provided in the forum.

The following error message is observed in your debug logs:

`Logstash could not be started because there is already another instance using the configured data directory. If you wish to run multiple instances, you must change the "path.data" setting.`

This indicates that you are running multiple instances of Logstash in your host and that's why you are facing such problem.

This [topic](https://discuss.elastic.co/t/logstash-could-not-be-started-because-there-is-already-another-instance/171306/5) looks related and could help you. Essentially, you would need to check if you are running Logstash as a service, check how many instances of Logstash are currently running in your host and ensure that you have only one Logstash instance running at a time.

---

_[View the full topic](https://discuss.elastic.co/t/my-logstash-throws-error-stating-javalang-illegal-state-exception-i-have-attached-my-config-file-below-can-someone-help-me-out/218143)._
