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

  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 {}
  }

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 and provide the logs:

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

Thank you.

It shows the following output-

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

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