'No config files found in path' error in Logstash 8.12v when trying to execute config file but works for Logstash 7.17.0

98 views Asked by At

When I am trying to execute my config file in logstash v8.12 using shell, it throws 'No config files found in path' error but the same works in v7.17. Objective is to discover the output in Kibana console. I am able to run kibana.bat, elasticsearch.bat files without any issues

while I am trying to run "logstash -f logstash-ShoppingMs.conf" getting the below stack trace.

Microsoft Windows [Version 10.0.22631.3155]
(c) Microsoft Corporation. All rights reserved.

E:\Programing Workspace\Java\ELK Stack\logstash-8.12.1\bin>logstash -f logstash-ShoppingMs.conf
"Using bundled JDK: E:\Programing Workspace\Java\ELK Stack\logstash-8.12.1\jdk\bin\java.exe"
E:/Programing Workspace/Java/ELK Stack/logstash-8.12.1/vendor/bundle/jruby/3.1.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/executor/java_thread_pool_executor.rb:13: warning: method redefined; discarding old to_int
E:/Programing Workspace/Java/ELK Stack/logstash-8.12.1/vendor/bundle/jruby/3.1.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/executor/java_thread_pool_executor.rb:13: warning: method redefined; discarding old to_f
Sending Logstash logs to E:/Programing Workspace/Java/ELK Stack/logstash-8.12.1/logs which is now configured via log4j2.properties
[2024-02-16T16:52:14,605][INFO ][logstash.runner          ] Log4j configuration path used is: E:\Programing Workspace\Java\ELK Stack\logstash-8.12.1\config\log4j2.properties
[2024-02-16T16:52:14,610][WARN ][logstash.runner          ] The use of JAVA_HOME has been deprecated. Logstash 8.0 and later ignores JAVA_HOME and uses the bundled JDK. Running Logstash with the bundled JDK is recommended. The bundled JDK has been verified to work with each specific version of Logstash, and generally provides best performance and reliability. If you have compelling reasons for using your own JDK (organizational-specific compliance requirements, for example), you can configure LS_JAVA_HOME to use that version instead.
[2024-02-16T16:52:14,611][INFO ][logstash.runner          ] Starting Logstash {"logstash.version"=>"8.12.1", "jruby.version"=>"jruby 9.4.5.0 (3.1.4) 2023-11-02 1abae2700f OpenJDK 64-Bit Server VM 17.0.10+7 on 17.0.10+7 +indy +jit [x86_64-mswin32]"}
[2024-02-16T16:52:14,613][INFO ][logstash.runner          ] JVM bootstrap flags: [-Xms1g, -Xmx1g, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djruby.compile.invokedynamic=true, -XX:+HeapDumpOnOutOfMemoryError, -Djava.security.egd=file:/dev/urandom, -Dlog4j2.isThreadContextMapInheritable=true, -Dlogstash.jackson.stream-read-constraints.max-string-length=200000000, -Dlogstash.jackson.stream-read-constraints.max-number-length=10000, -Djruby.regexp.interruptible=true, -Djdk.io.File.enableADS=true, --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED, --add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED, --add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED, --add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED, --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED, --add-opens=java.base/java.security=ALL-UNNAMED, --add-opens=java.base/java.io=ALL-UNNAMED, --add-opens=java.base/java.nio.channels=ALL-UNNAMED, --add-opens=java.base/sun.nio.ch=ALL-UNNAMED, --add-opens=java.management/sun.management=ALL-UNNAMED]
[2024-02-16T16:52:14,617][INFO ][logstash.runner          ] Jackson default value override `logstash.jackson.stream-read-constraints.max-string-length` configured to `200000000`
[2024-02-16T16:52:14,618][INFO ][logstash.runner          ] Jackson default value override `logstash.jackson.stream-read-constraints.max-number-length` configured to `10000`
[2024-02-16T16:52:14,679][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2024-02-16T16:52:16,381][INFO ][logstash.config.source.local.configpathloader] No config files found in path {:path=>"E:/Programing Workspace/Java/ELK Stack/logstash-8.12.1/logstash-ShoppingMs.conf"}
[2024-02-16T16:52:16,383][ERROR][logstash.config.sourceloader] No configuration found in the configured sources.
[2024-02-16T16:52:16,535][INFO ][logstash.agent           ] Successfully started Logstash API endpoint {:port=>9600, :ssl_enabled=>false}
[2024-02-16T16:52:16,551][INFO ][logstash.runner          ] Logstash shut down.
[2024-02-16T16:52:16,558][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:808) ~[jruby.jar:?]
        at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:767) ~[jruby.jar:?]
        at E_3a_.Programing_20_Workspace.Java.ELK_20_Stack.logstash_minus_8_dot_12_dot_1.lib.bootstrap.environment.<main>(E:\Programing Workspace\Java\ELK Stack\logstash-8.12.1\lib\bootstrap\environment.rb:90) ~[?:?]

Below is logstash-ShoppingMs.conf file

input {
  file {
    path => "e:/Programing Workspace/Java/ELK Stack/eureka_elk_log2.txt"
    start_position => "beginning"
  }
  file {
    path => "e:/Programing Workspace/Java/ELK Stack/billing_elk_log1.txt"
    start_position => "beginning"
  } 
  file {
    path => "e:/Programing Workspace/Java/ELK Stack/shopping_elk_log3.txt"
    start_position => "beginning"
  }
}
output {
  elasticsearch {
    hosts => ["localhost:9200"]
  }
  stdout { codec => rubydebug }
}

Location of logstash-ShoppingMs.conf file= E:/Programing Workspace/Java/ELK Stack/logstash-8.12.1/bin/logstash-ShoppingMs.conf

Can some please help me with why I am getting this error, googled many journals that didn't get any resolution? I can confirm that all paths provided were correct.

It worked for the logstash 7.17v but showing the error 'No config files found in path' as stated above.

I am trying to disply the logs in Kibana console in my local system.

1

There are 1 answers

0
Murat K. On

It looks like your user does not have sufficient permissions for conf file. Can you please check logstash and logstash-ShoppingMs.conf by clicking right->Properties->Security if your user is allowed to execute conf file?