Logstash how to end and start a new instance


(Jack Mc Aleese) #1

Hi! I am new to ELK, hopefully someone can understand my problem here.

I've ingested data via logstash into elasticsearch, but I need to clear all of that data and re-ingest it.

My goal is to time how long it takes to ingest a large data set using Logstash, but when I try to ingest the same data set again I get the message 'Logstash could not be started because there is already another instance using the configured data directory.' Using bash.

Thank you!


(Jack Mc Aleese) #2

How do I just start anew?


(Magnus Bäck) #3

Shut down any running Logstash instances, delete any indexes in ES, and delete any sincedb files. See the file input documentation for more on where the sincedb files are located.


(Jack Mc Aleese) #4

How do I shut down any running Logstash instances? I close Terminal and hit "terminate processes," but am still met with the same problem.

Thus, I have resulted to restarting my Mac every time this error happens. This works but is incredibly time-consuming.

Thank you


(Magnus Bäck) #5

How are you starting Logstash in the first place?


(Jack Mc Aleese) #6

Terminal (bash) on Mac. Using this command:

'bin/logstash -f /Users/user/Desktop/data/sampledata.config'

It works once or twice after restarting, but then gives me the 'another instance' error message. As I mentioned, I am not very experienced with this software, but need to test and ingest a lot of data.

Thank you!


(Magnus Bäck) #7

Hitting Ctrl+C should abort that process cleanly, but in any case the "Logstash could not be started because there is already another instance using the configured data directory" error happens when there's a lockfile in the data subdirectory. Normally that file shouldn't be left behind, but if it is and you really don't have any Logstash instances running you can delete the file.


(system) #8

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