#执行报错
[root@logstash-95 ~]# logstash -f /etc/logstash/conf.d/stdin-test.conf Using bundled JDK: /usr/share/logstash/jdk OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release. WARNING: Could not find logstash.yml which is typically located in $LS_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continuing using the defaults Could not find log4j2 configuration at path /usr/share/logstash/config/log4j2.properties. Using default config which logs errors to the console [INFO ] 2023-03-21 12:30:38.780 [main] runner - Starting Logstash {"logstash.version"=>"7.17.9", "jruby.version"=>"jruby 9.2.20.1 (2.5.8) 2021-11-30 2a2962fbd1 OpenJDK 64-Bit Server VM 11.0.18+10 on 11.0.18+10 +indy +jit [linux-x86_64]"} [INFO ] 2023-03-21 12:30:38.787 [main] 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] [WARN ] 2023-03-21 12:30:39.038 [LogStash::Runner] multilocal - Ignoring the 'pipelines.yml' file because modules or command line options are specified [FATAL] 2023-03-21 12:30:39.042 [LogStash::Runner] 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. [FATAL] 2023-03-21 12:30:39.044 [LogStash::Runner] 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-9.2.20.1.jar:?] at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:710) ~[jruby-complete-9.2.20.1.jar:?] at usr.share.logstash.lib.bootstrap.environment.<main>(/usr/share/logstash/lib/bootstrap/environment.rb:94) ~[?:?]
#原因:之前运行的instance有缓冲,保存在path.data里面有.lock文件,删除掉就可以 [root@logstash-95 ~]# ls -alh /usr/share/logstash/data 总用量 8.0K drwxr-xr-x. 4 root root 69 3月 21 11:51 . drwxr-xr-x. 12 root root 4.0K 3月 21 10:51 .. drwxr-xr-x. 2 root root 6 3月 21 11:47 dead_letter_queue -rw-r--r--. 1 root root 0 3月 21 11:51 .lock drwxr-xr-x. 2 root root 6 3月 21 11:47 queue -rw-r--r--. 1 root root 36 3月 21 11:51 uuid [root@logstash-95 ~]# [root@logstash-95 ~]# rm -rf /usr/share/logstash/data/.lock
标签:because,21,Logstash,started,data,could,jruby,root,logstash From: https://www.cnblogs.com/tyjs09/p/17239587.html