winserver2008 安装logstash

winserver2008 安装logstash,第1张

一、安装

在官网下载:Download Logstash Free | Get Started Now | Elastic

并解压

二、运行:

在logstash>config

1、目录下创建:logstash.conf

2、输入内容:

input {

    stdin{ 
    }

}

output {

    stdout{

    }

}

3、在logstash>bin目录下命令行运行:logstash -f logstash.conf

遇到问题(一)

报错:

OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.

 解决办法:修改jvm.options文件配置 将 -XX:+UseConcMarkSweepGC 改为 -XX:+UseG1GC

遇到问题(二)

报错

[2022-04-24T17:40:09,374][INFO ][logstash.runner          ] Log4j configuration path used is: D:\Tools\logstash-8.1.3\config\log4j2.properties
[2022-04-24T17:40:09,406][INFO ][logstash.runner          ] Starting Logstash {"logstash.version"=>"8.1.3", "jruby.version"=>"jruby 9.2.20.1 (2.5.8) 2021-11-30 2a2962fbd1 OpenJDK 64-Bit Server VM 11.0.14.1+1 on 11.0.14.1+1 +indy +jit [mswin32-x86_64]"}
[2022-04-24T17:40:09,406][INFO ][logstash.runner          ] JVM bootstrap flags: [-Xms1g, -Xmx1g, -XX:+UseG1GC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djruby.compile.invokedynamic=true, -Djruby.jit.threshold=0, -Djruby.regexp.interruptible=true, -XX:+HeapDumpOnOutOfMemoryError, -Djava.security.egd=file:/dev/urandom, -Dlog4j2.isThreadContextMapInheritable=true, --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]
[2022-04-24T17:40:09,593][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2022-04-24T17:40:13,978][INFO ][logstash.config.source.local.configpathloader] No config files found in path {:path=>"D:/Tools/logstash-8.1.3/logstash.conf"}
[2022-04-24T17:40:13,993][ERROR][logstash.config.sourceloader] No configuration found in the configured sources.
[2022-04-24T17:40:14,182][INFO ][logstash.agent           ] Successfully started Logstash API endpoint {:port=>9600, :ssl_enabled=>false}
[2022-04-24T17:40:19,287][INFO ][logstash.runner          ] Logstash shut down.
[2022-04-24T17:40:19,318][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.jar:?]
    at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:710) ~[jruby.jar:?]
    at D_3a_.Tools.logstash_minus_8_dot_1_dot_3.lib.bootstrap.environment.

(D:\Tools\logstash-8.1.3\lib\bootstrap\environment.rb:94) ~[?:?]
[2022-04-24T17:43:50,487][INFO ][logstash.runner          ] Log4j configuration path used is: D:\Tools\logstash-8.1.3\config\log4j2.properties
[2022-04-24T17:43:50,503][INFO ][logstash.runner          ] Starting Logstash {"logstash.version"=>"8.1.3", "jruby.version"=>"jruby 9.2.20.1 (2.5.8) 2021-11-30 2a2962fbd1 OpenJDK 64-Bit Server VM 11.0.14.1+1 on 11.0.14.1+1 +indy +jit [mswin32-x86_64]"}
[2022-04-24T17:43:50,503][INFO ][logstash.runner          ] JVM bootstrap flags: [-Xms1g, -Xmx1g, -XX:+UseG1GC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djruby.compile.invokedynamic=true, -Djruby.jit.threshold=0, -Djruby.regexp.interruptible=true, -XX:+HeapDumpOnOutOfMemoryError, -Djava.security.egd=file:/dev/urandom, -Dlog4j2.isThreadContextMapInheritable=true, --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]
[2022-04-24T17:43:50,815][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2022-04-24T17:43:53,309][INFO ][logstash.config.source.local.configpathloader] No config files found in path {:path=>"D:/Tools/logstash-8.1.3/logstash.conf"}
[2022-04-24T17:43:53,324][ERROR][logstash.config.sourceloader] No configuration found in the configured sources.
[2022-04-24T17:43:53,402][INFO ][logstash.agent           ] Successfully started Logstash API endpoint {:port=>9600, :ssl_enabled=>false}
[2022-04-24T17:43:58,699][INFO ][logstash.runner          ] Logstash shut down.
[2022-04-24T17:43:58,715][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.jar:?]
    at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:710) ~[jruby.jar:?]
    at D_3a_.Tools.logstash_minus_8_dot_1_dot_3.lib.bootstrap.environment.
(D:\Tools\logstash-8.1.3\lib\bootstrap\environment.rb:94) ~[?:?]

原因是logstash虽然是在bin文件夹下启动,但是项目的启动路径还是在项目根目录(logstash-8.1.3)

所以运行命令应该是:logstash -f config/logstash.conf

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/729448.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-27
下一篇 2022-04-27

发表评论

登录后才能评论

评论列表(0条)

保存