Logstash-7.17.12 file input not working

I am using logstash-7.17.12 to input the contents of logstash-test.conf file. The contents of logstash-test.conf are as follows.

input {
  file {
    path => "C:/Users/user/logstash-7.17.12/config/filter-example.log"
    start_position => "beginning"
    sincedb_path => "nul"

output {
  stdout { }

And the filter-example.log file shown above is as follows.

[2020-01-02 14:17] [ID1] 9500 [INFO] - connected.
[2020/01/02 14:19:25] [ID2] 1070 [warn] - busy server.

However, an error occurs and the contents of the command are as follows.

C:\Users\user\logstash-7.17.12>.\bin\logstash.bat -f .\config\logstash-test.conf
"Using bundled JDK: C:\Users\user\logstash-7.17.12\jdk\bin\java.exe"
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Sending Logstash logs to C:/Users/user/logstash-7.17.12/logs which is now configured via log4j2.properties
[2023-08-24T11:53:36,568][INFO ][logstash.runner          ] Log4j configuration path used is: C:\Users\user\logstash-7.17.12\config\log4j2.properties
[2023-08-24T11:53:36,574][INFO ][logstash.runner          ] Starting Logstash {"logstash.version"=>"7.17.12", "jruby.version"=>"jruby (2.5.8) 2021-11-30 2a2962fbd1 OpenJDK 64-Bit Server VM 11.0.19+7 on 11.0.19+7 +indy +jit [mswin32-x86_64]"}
[2023-08-24T11:53:36,575][INFO ][logstash.runner          ] JVM bootstrap flags: [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djdk.io.File.enableADS=true, -Djruby.compile.invokedynamic=true, -Djruby.jit.threshold=0, -Djruby.regexp.interruptible=true, -XX:+HeapDumpOnOutOfMemoryError, -Djava.security.egd=file:/dev/urandom, -Dlog4j2.isThreadContextMapInheritable=true]
[2023-08-24T11:53:36,618][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2023-08-24T11:53:37,835][INFO ][logstash.config.source.local.configpathloader] No config files found in path {:path=>"C:/Users/ypwa1/logstash-7.17.12/config/logstash-test.conf"}
[2023-08-24T11:53:37,838][ERROR][logstash.config.sourceloader] No configuration found in the configured sources.
[2023-08-24T11:53:37,864][INFO ][logstash.agent           ] Successfully started Logstash API endpoint {:port=>9600, :ssl_enabled=>false}
[2023-08-24T11:53:43,080][INFO ][logstash.runner          ] Logstash shut down.
[2023-08-24T11:53:43,089][FATAL][org.logstash.Logstash    ] Logstash stopped processing because of an error: (SystemExit) exit
org.jruby.exceptions.SystemExit: (SystemExit) exit
        at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:747) ~[jruby-complete-]
        at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:710) ~[jruby-complete-]
        at C_3a_.Users.user.logstash_minus_7_dot_17_dot_12.lib.bootstrap.environment.<main>(C:\Users\user\logstash-7.17.12\lib\bootstrap\environment.rb:94) ~[?:?]

I think it's a problem with file input of logstash because it works normally with the -e option. How can I solve this problem?

It has nothing to do with the file input. logstash hasn't got as far as knowing it should use a file input. It cannot read the configuration file saying that. The relative path may be wrong, or the file (or directory) permissions/ownership may be wrong.

Ah.. I intentionally edited it as 'user' to hide the name 'ypwa1' when I posted it here, but there are places I missed.. T_T
I don't know if it's a path problem..

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