I am trying to use ElasticSearch as docker container and to use Log Stash in different container. I am trying to add jdbc jar file to my docker container using a trick I've seen in youtube video. The logstash directory contains the conf file and the jdbc Jar file.
(The ES container named elasticsearch)
The command I am using -
docker run -h logstash --name logstash --link elasticsearch:elasticsearch -it --rm -v "$PWD":/config-dir logstash:7.3.2 -f /config-dir/logstash.conf
in my conf file I have tried to change the "jdbc_driver_library" to
"/config-dir/connector.jar"
"./config-dir/connector.jar"
"connector.jar"
""
But non of them seems to work, I am keep getting the following error:
LogStash::ConfigurationError 2052
Java::net.sourceforge.jtds.jdbc.Driver not loaded. Are you sure you've included the correct jdbc driver in :jdbc_driver_library? 2052
/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-jdbc-4.3.13/lib/logstash/plugin_mixins/jdbc/jdbc.rb:163:inopen_jdbc_connection' 2052
execute_statement' 2052
/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-jdbc-4.3.13/lib/logstash/plugin_mixins/jdbc/jdbc.rb:221:in
/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-jdbc-4.3.13/lib/logstash/inputs/jdbc.rb:277:inexecute_query' 2052
block in run' 2052
/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-jdbc-4.3.13/lib/logstash/inputs/jdbc.rb:258:in
/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/rufus-scheduler-3.0.9/lib/rufus/scheduler/jobs.rb:234:indo_call' 2052
do_trigger' 2052
/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/rufus-scheduler-3.0.9/lib/rufus/scheduler/jobs.rb:258:in
/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/rufus-scheduler-3.0.9/lib/rufus/scheduler/jobs.rb:300:inblock in start_work_thread' 2052
block in start_work_thread' 2052
/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/rufus-scheduler-3.0.9/lib/rufus/scheduler/jobs.rb:299:in
org/jruby/RubyKernel.java:1425:inloop' 2052
block in start_work_thread'
/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/rufus-scheduler-3.0.9/lib/rufus/scheduler/jobs.rb:289:in
** Following similar question I had tried to use uppercase J in Java, while defining jdbc_driver_class. unfortunately it didn't help.