Multiple Logstash instances running

Hi,
I am newly started using Elasticsearch in Mac OS. The version is 6.3.0.
I am amble to create an index through curl commands in terminal. But wWhen I use Logstash to import data from a .cvs file, getting below error ij terminal.
I sued this command :

Admins-MacBook-Pro:logstash-6.3.0 admin$ bin/logstash -f test-logstash.conf
Sending Logstash's logs to /Users/admin/Documents/ELKStack/Downloads/logstash-6.3.0/logs which is now configured via log4j2.properties
[2018-06-25T09:56:11,870][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2018-06-25T09:56:11,950][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.
[2018-06-25T09:56:11,966][ERROR][org.logstash.Logstash ] java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit

Already checked the forum for this issue and found some suggestions to use the --path.data arguments in command line while running the logstash con file.

So used like these:

Admins-MacBook-Pro:logstash-6.3.0 admin$ bin/logstash -path.data -f test-logstash.conf

Admins-MacBook-Pro:logstash-6.3.0 admin$ bin/logstash -path data -f test-logstash.conf
(I am already in logstash foler)

Is the syntax correct or the -path.data? Because getting below kind of error now.

[main] Logstash - java.lang.IllegalStateException: Logstash stopped processing because of an error: (NameError) `@path.plugins' is not allowable as an instance variable name

Anyone could clarify and suggest how to fix it?

Thanks,
Preethi

1 Like

Facing the same problem in windows 7

Tried re-installing , no luck !

Admins-MacBook-Pro:logstash-6.3.0 admin$ bin/logstash -path.data -f test-logstash.conf

It's --path.data (two hyphens) and you need to supply a path (i.e. --path.data /some/path).

I'd look into why this happens. Do you have a Logstash processing running in the background, or why is there still a lockfile in the data directory? The error you get can happen if there's a leftover lockfile from a Logstash that has crashed.

Yes, thanks for the reply. It worked for me. When I run different config files, do I need to create those many data folder?

Thanks,
Preethi

You need one data directory per concurrent Logstash instance.

Ok, Could you clarify my below questions?

  1. Lets say I have a JSP form with an open text search and I have the data in ES indices, to call ES from my application, Does it require any settings or configuration to be done and call from Java class is the only step?

  2. Is it possible to integrate Kibana into my application?

Thanks

Lets say I have a JSP form with an open text search and I have the data in ES indices, to call ES from my application, Does it require any settings or configuration to be done and call from Java class is the only step?

ES provides a REST API so as long as you have the URL to your ES server (and login credentials, if applicable) you should be fine.

Is it possible to integrate Kibana into my application?

That depends on what you mean by "integrate". I suggest you ask a more specific version of your question in the Kibana category.

If I want to include the Kibana visualisation/Dashboard (with search option) as a part of my application UI, can it be achieved? like calling different application URL through iFrame

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