# 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:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Varun\_Saraf](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/varun_saraf/32/62182_2.png) [@Varun\_Saraf](https://discuss.elastic.co/u/Varun_Saraf)\
**Post date:** [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/1 "2020-02-06T10:37:34Z")

</div>

```
  input {
	file {
	  path => "/Applications/data/cars.csv"
	  start_position => "beginning"
	  sincedb_path => "/dev/null"
	}
 }

 filter {
      csv {
        seperator => ","
       
        columns => ["maker", "model", "mileage", "manufacture_year", "engine_displacement", "engine_power", "body_type", "colour_slug", "stk_year", "transmission", "door_count", "seat_count", "fuel_type", "date_created", "date_last_seen", "price_eur"]
    
    }

     mutate { convert => ["mileage", "integer"] }
     mutate { convert => ["price_eur", "float"] }
     mutate { convert => ["engine_power", "integer"] }
     mutate { convert => ["door_count", "integer"] }
     mutate { convert => ["seat_count", "integer"] }
 
 }

 output {
      elasticsearch {
         hosts => ["localhost:9200"]
         index => "logstash_cars"
         document_type => "sold_cars"
      }
       stdout {}
  }
```

---

<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, 1:07am 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/2 "2020-02-07T01:07:04Z")

</div>

Hi @Varun_Saraf - Welcome to our community forums!

It would be great if you provide the logs as well - so we can check what's going on. Please run Logstash with [debug logging](https://www.elastic.co/guide/en/logstash/current/running-logstash-command-line.html#command-line-flags) and provide the logs:

- `bin/logstash --debug -f <PATH_TO_CONFIG_FILE>`

Thank you.

---

<div class="post-metadata">

**Author:** ![Varun\_Saraf](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/varun_saraf/32/62182_2.png) [@Varun\_Saraf](https://discuss.elastic.co/u/Varun_Saraf)\
**Post date:** [February 7, 2020, 7:48am 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/3 "2020-02-07T07:48:32Z")

</div>

**It shows the following output-**

 ![Screenshot 2020-02-07 at 1.15.39 PM](https://us1.discourse-cdn.com/elastic/original/3X/9/7/97d5de706f3b31ff6145d1cef88a8b582ed30299.jpeg) ![Screenshot 2020-02-07 at 1.16.17 PM](https://us1.discourse-cdn.com/elastic/original/3X/e/d/edd88fdfd33a76aa7f74275c266531bd0662ad1c.jpeg)

---

<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.

---

<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:** [March 6, 2020, 8:02am 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/5 "2020-03-06T08:02:46Z")

</div>

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