Reputation: 418
I'm new to Logstash and Elasticsearch. After some tests I want to restart and make a new index. However, I'm getting this:
root@imageoffice:/etc/logstash/conf.d# sudo -Hu root /usr/share/logstash/bin/logstash --path.settings /etc/logstash/
Sending Logstash logs to /usr/share/logstash/logs which is now configured via log4j2.properties
[2019-04-22T17:00:04,910][FATAL][logstash.runner ] 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.
[2019-04-22T17:00:04,965][ERROR][org.logstash.Logstash ] java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit
How can I simple reset everything and run the sudo -Hu root /usr/share/logstash/bin/logstash --path.settings /etc/logstash/
command succesfull?
Upvotes: 0
Views: 1322
Reputation: 11
Removed the .lock file from bin/data
and the error was gone.
Upvotes: 0
Reputation: 16362
The error message tells you that there's already a logstash running on your machine. If you don't want the old one running, shut it down or kill it.
Typically, logstash is managed through a startup script (systemd, etc).
Upvotes: 1