Logstash cli with file option issue

  • Windows 10
  • Logstash for Windows 8.4.1

Good afternoon.
I've been working through some courseware on using logstash and have run into a problem while attempting to use the -f option with the logstash.bat file.
The file to the config file, e.g.,:

> logstash -f .\myconfigs\pipeline.conf

is not working... it's appending the file name fragment to the logstash directory and is complaining since it can't find it here. Well yeah, no kidding... what shows up in the error:

[2022-09-13T16:20:02,433][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2022-09-13T16:20:04,636][INFO ][logstash.config.source.local.configpathloader] No config files found in path {:path=>"c:/logstash-8.4.1/myconfigs/pipeline/pipeline.conf"}

I've also attempted changing slashes in the reference to forward slashes, and same result.

The only work around I've found for this is entering the fully qualified path for the -f value. Not ideal.

Please add --path.settings
logstash.bat -f c:\logstash-8.4.1\myconfigs\pipeline.conf --path.settings c:\logstash-8.4.1\config\
or if you running from bin, then relative path should be:
logstash.bat -f ..\myconfigs\pipeline.conf --path.settings ..\config\

Maybe I wasn't clear. I have the logstash bin in my path environment, so I can run logstash.bat from anywhere.
Now let's say my conf file is here:
c:\work\mylogstashstuff\pipelines\pipeline.conf

Now if I'm in my cmd console and my current location is:
c:\work\mylogstashstuff
And attempt to run:
logstash -f .\pipelines\pipeline.conf

I get the error that I mentioned in the original question.
I don't see where your recommended solution would apply here?
Thanks!

The path.settings is not related to the bin, it is related to the Logstash configurations.

Have you tried using --path.settings ?

Also, are you using the old Command prompt or a Powershell session?

I've tried from both a basic (old?) cmd console and git bash shell (but gave up on this since this probably adds Linux path format logic that wouldn't be recognized by the windows version of the distribution).
Frankly I'm not understanding how this
--path.settings
option is supposed to work from the above example.

The path.settings is the path were logstash config is, the logstash.yml and jvm.options file, it may have not influence in anything in your issue, but it is worth to try.

Also, try to run in Powershell, it is how the example in the documentation works.

Hi Leandro,
No, same problem in powershell. However...
I was attempting to run logstash.bat via being in my path settings in my environment.
If I run it explicitly from the bin of logstash:

PS C:\logstash-8.4.1\bin> .\logstash.bat -f ..\..\Users\me\work\logstash\config\pipeline\pipeline.conf

it works... but that's kind of funky.

thanks for your feedback.

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