Sequel::AdapterNotFound: mongodb.jdbc.MongoDriver not loaded


(zjr) #1

Hi,

I am getting below error while using Mongodb Java Driver to query data from MongoDB.
Error:
[2018-05-08T01:10:38,080][ERROR][logstash.agent ] Pipeline aborted due to error {:exception=>#
<Sequel::AdapterNotFound: mongodb.jdbc.MongoDriver not loaded>, :backtrace=>
["/opt/elk/logstash-5.6.4/vendor/bundle/jruby/1.9/gems/sequel-5.1.0/lib/sequel/adapters/jdbc.rb:44:in load_driver'", "/opt/elk/logstash-filter-jdbc_streaming-1.0.3/lib/logstash/plugin_mixins/jdbc_streaming.rb:47:inprepare_jdbc_connection'",
"/opt/elk/logstash-filter-jdbc_streaming-1.0.3/lib/logstash/filters/jdbc_streaming.rb:194:in prepare_connected_jdbc_cache'", "/opt/elk/logstash-filter-jdbc_streaming-1.0.3/lib/logstash/filters/jdbc_streaming.rb:116:inregister'",
"/opt/elk/logstash-5.6.4/logstash-core/lib/logstash/pipeline.rb:290:in register_plugin'", "/opt/elk/logstash-5.6.4/logstash-core/lib/logstash/pipeline.rb:301:inregister_plugins'",
"org/jruby/RubyArray.java:1613:in each'", "/opt/elk/logstash-5.6.4/logstash-core/lib/logstash/pipeline.rb:301:inregister_plugins'",
"/opt/elk/logstash-5.6.4/logstash-core/lib/logstash/pipeline.rb:311:in start_workers'", "/opt/elk/logstash-5.6.4/logstash-core/lib/logstash/pipeline.rb:235:inrun'",
"/opt/elk/logstash-5.6.4/logstash-core/lib/logstash/agent.rb:408:in `start_pipeline'"]}

Plateform
OS- Linux
Logstash- 5.6.4

Logstash config
filter{
jdbc_streaming {
jdbc_driver_library => "/opt/elk/mongodb/mongodb_unityjdbc_full.jar"
jdbc_driver_class => "mongodb.jdbc.MongoDriver"
jdbc_connection_string => "jdbc:mongo://xxx.xxx.xxx.xxx:27071/xxx"
jdbc_user => ""
jdbc_password => ""
statement => "SELECT * FROM tbl_test;"
target => "deviceInfo"
}
}

Start Logstash
/opt/elk/logstash-5.6.4/bin # ./logstash -f test_file_es.conf --config.reload.automatic

Please help me where I am wrong....


(system) #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.