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

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