Hi i am new to the internals of ELK stack
running a logstash process in background, and when it got picked up the matching file pattern, it says as in below
i want to understand here what is the importance of path.data
option, Please help me out
[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.
Logstash is a light-weight, open-source, server-side data processing pipeline that allows you to collect data from a variety of sources, transform it on the fly, and send it to your desired destination. It is most often used as a data pipeline for Elasticsearch, an open-source analytics and search engine.
[2019-03-11T10:47:12,719] [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. could you help me please,
Check the services that are running on your server: If you run this, and it says Active: active (running) then you already have logstash running. To temporarily stop this instance you can run: If you run through multiple tests, you may have to continually stop the service.
Step 1: Create a data sync conf file in the Logstash directory Step 2: Ensure Identical Names: When configuring the conf file, ensure that the index names are identical in both the target and source clusters. Refer to the screenshot below. Step 3: Running Logstash: Once you have configured the conf file, run Logstash
After running the command, Logstash will copy all of the indexes in the source cluster to the target cluster, carrying with it the mapping information. Next, it will begin gradually migrating the data inside the indexes.
That means you have two Logstash instances running and they cannot share the same data directory. You either need to kill the other instance or if you really want to have two instances running, you need to configure them to have different data directories.
Inside logstash.yml
, you need to change the path.data
setting for each instance.
path.data
directory is used by Logstash and its plugins for any persistent needs to store data, and it need to be different for each instance you are running, since Logstash does not allow multiple instances to share the same path.data
.
By default its value is set to, LOGSTASH_HOME/data
, which, under debian and rpm is /usr/share/logstash/data
, and it is automatically assigned to first logstash instance unless explicitly specified.
If you want to run multiple logstash instances, you need to define the path.data
either by command,
bin/logstash -f <config_file.conf> --path.data PATH
(make sure the directory is writable)
or specify in logstash.yml
file under /etc/logstash/
for each instance.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With