Logstash hangs when trying to kill it in linux environment

i am parsing log files and filtering only errors out and putting the data in a json file. When i reach the end of file i stop the logstash using kill command,but i get the following error ->

"[2019-04-15T05:51:31,715][ERROR][logstash.shutdownwatcher ]

The shutdown process appears to be stalled due to busy or blocked plugins. Check the logs for more information."

I have tried both(kill -9, -15)