热修复logstash未连接到Elasticsearch

krcsximq  于 2023-06-21  发布在  ElasticSearch
关注(0)|答案(1)|浏览(138)

我在官方网站上安装了ElasticSearch、Kibana和Logstash。
每个版本都是8.8.1。
没有其他设置完全未修改,并且kibanaelasticsearch都已执行。
但是,logstash生成错误,并且不运行。
下面是一个错误和logstash设置文件。

[2023-06-16T17:55:34,000][ERROR][logstash.agent           ] Failed to execute action {:id=>:main, :action_type=>LogStash::ConvergeResult::FailedAction, :message=>"Could not execute action: PipelineAction::Create<main>, action_result: false", :backtrace=>nil}
[2023-06-16T17:55:34,042][INFO ][logstash.runner          ] Logstash shut down.
[2023-06-16T17:55:34,062][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:790) ~[jruby.jar:?]
    at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:753) ~[jruby.jar:?]
    at Users.kun.Downloads.ElasticSearch.logstash_minus_8_dot_8_dot_1.lib.bootstrap.environment.<main>(/Users/kun/Downloads/ElasticSearch/logstash-8.8.1/lib/bootstrap/environment.rb:91) ~[?:?]
input {
    jdbc {
        jdbc_driver_library => "./mysql-connector-java-5.1.48.jar"
        jdbc_driver_class => "com.mysql.jdbc.Driver" 
        jdbc_connection_string => "jdbc:mysql://localhost:3306/test_db" 
        jdbc_user => "root" 
        jdbc_password =>"root"
        schedule => "* * * * *"
        statement => "SELECT id, name, createdTime at FROM user limit 500"
    }
}

output {
    elasticsearch {
        hosts => ["localhost:9200"]
        index => "music_user"
        document_id =>"%{id}"

    } stdout {
        codec => rubydebug
    }
}

可能是SSL的问题。
如果ElasticsearchSSL被释放,Kibana不会运行,但logstash会被执行。
但是我认为你不应该发布SSL
当我设置SSL时,我不能通过HTTP访问它,但我在本地运行它,所以我没有HTTPS地址。
我该如何解决这部分?

mcdcgff0

mcdcgff01#

我的代码是这样工作的

hosts => ["https://localhost:9200"]
user => "xxxx"
password => "xxxx"
ssl_certificate_verification => false

相关问题