gpt4 book ai didi

elasticsearch - 异常:LogStash::ConfigurationError

转载 作者:行者123 更新时间:2023-12-03 00:53:03 27 4
gpt4 key购买 nike

我正在尝试通过logstash连接Oracle数据库,并遇到错误。

  Error: oracle.jdbc.OracleDriver not loaded. Are you sure you've included the correct jdbc driver in :jdbc_driver_library?
Exception: LogStash::ConfigurationError
Stack: D:/softwares/logstash-6.2.4/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc-4.3.9/lib/logstash/plugin_mixins/jdbc.rb:162:in `open_jdbc_connection'

请找到我的logstash配置文件:
input {
jdbc {
jdbc_driver_library => "D:\data\ojdbc14.jar"
jdbc_driver_class => "oracle.jdbc.OracleDriver"
jdbc_connection_string => "jdbc:oracle:thin:@localhost:1521:xe"
jdbc_user => "user_0ne"
jdbc_password => "xxxyyyzzz"
statement => "SELECT * FROM PRODUCT"
}
}

output {
elasticsearch {
hosts => ["localhost:9200"]
index => "my_index"
}
}

最佳答案

logstash配置文件:(已更正)

input {
jdbc {
jdbc_driver_library => "D:\Karthikeyan\data\ojdbc14.jar"
jdbc_driver_class => "Java::oracle.jdbc.OracleDriver" // problem in this line is corrected
jdbc_connection_string => "jdbc:oracle:thin:@localhost:1521:xe"
jdbc_user => "vb"
jdbc_password => "123456"
statement => "SELECT * FROM VB_PRODUCT"
}
}

output {
elasticsearch {
hosts => ["localhost:9200"]
index => "my_index"
}
}

关于elasticsearch - 异常:LogStash::ConfigurationError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50112635/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com