I have below logstash configuration file by trying to connect to SAP HANA database(HANA DB and elk stack are not on same laptop). But there's error when executing logstash -f ../config/logstashJDBC.conf.
@Badger, updated and run again, still get the same error. I searched this error in this forum, and found that lots of user meet this error, but most of them are closed without solution or response.
jdbc{
jdbc_driver_library => "/app/tomcat/jdbc_lib/ngdbc-2.4.61.jar"
jdbc_driver_class => "com.sap.db.jdbc.Driver"
jdbc_connection_string => "jdbc:sap://qa13hdbbe901.lab.od.sap.biz:30115"
jdbc_user => "xxx"
jdbc_password => "xxx"
...}
[2019-10-16T15:31:39,226][ERROR][logstash.javapipeline ] A plugin had an unrecoverable error. Will restart this plugin.
Pipeline_id:main
Plugin: <LogStash::Inputs::Jdbc jdbc_user=>"xxx", use_column_value=>true, tracking_column=>"NOMINEE_ID", jdbc_validate_connection=>true, jdbc_password=><password>, statement=>"SELECT NOMINEE_ID, NOMINATION_ID, NOMINEE_USER_ID, READINESS, CREATED_DATE, CREATED_BY FROM SFBIZX3_TALSHELLEYH.SM_NOMINEE", tracking_column_type=>"numeric", jdbc_driver_library=>"/app/tomcat/jdbc_lib/ngdbc-2.4.61.jar", jdbc_connection_string=>"jdbc:sap://qa13hdbbe901.lab.od.sap.biz:30115", id=>"239d99b038d185ac811062a18a344f7ccd7ca811cd122b99f98c086968a5b55c", jdbc_driver_class=>"Java::com.sap.db.jdbc.Driver", enable_metric=>true, codec=><LogStash::Codecs::Plain id=>"plain_70cb23ec-f1ec-4c21-9770-6240751ed824", enable_metric=>true, charset=>"UTF-8">, jdbc_paging_enabled=>false, jdbc_page_size=>100000, jdbc_validation_timeout=>3600, jdbc_pool_timeout=>5, sql_log_level=>"info", connection_retry_attempts=>1, connection_retry_attempts_wait_time=>0.5, parameters=>{"sql_last_value"=>0}, last_run_metadata_path=>"C:\\Users\\I073341/.logstash_jdbc_last_run", clean_run=>false, record_last_run=>true, lowercase_column_names=>true>
Error: Java::com.sap.db.jdbc.Driver not loaded. Are you sure you've included the correct jdbc driver in :jdbc_driver_library?
Exception: LogStash::ConfigurationError
Stack: C:/elkstack/logstash-7.0.1/logstash-7.0.1/vendor/bundle/jruby/2.5.0/gems/logstash-input-jdbc-4.3.13/lib/logstash/plugin_mixins/jdbc/jdbc.rb:163:in `open_jdbc_connection'
You could try adding the driver jar file to <logstash install dir>/logstash-core/lib/jars/, but be aware that could get removed during a logstash upgrade.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.