A plugin had an unrecoverable error. Will restart this plugin

Hi Team,

I am trying to read my Sql Server table from the DB and here is my .conf file,
when i am trying to read the table through logstash i am getting the below error.


input {

jdbc {

jdbc_driver_library => "C:/Program Files/Java/sqljdbc_8.4.1.0_enu/sqljdbc_8.4/enu"

jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"

jdbc_connection_string => "jdbc:sqlserver://Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=B2BWebService;Data Source=TOUCHDB05;"

jdbc_user => "xxxxxxxxxx"

jdbc_password => "xxxxx"

statement => "SELECT count(*) from ediGuidExtracted"

}

}

output {

elasticsearch {

hosts => "localhost:9200"

index => "montreal"

}

}

You did not show the error

Hi Badger,
here it is.

[ERROR][logstash.javapipeline ][main][10243dd96cbc3a21d2105c489922606e379ce63693dc4526f78e24b1ee195258] A plugin had an unrecoverable error. Will restart this plugin.
Pipeline_id:main
Plugin: <LogStash::Inputs::Jdbc jdbc_user=>"b2bdev", jdbc_password=>, statement=>"SELECT count(*) from ediGuidExtracted", jdbc_driver_library=>"C:\Program Files\Java\sqljdbc_8.4.1.0_enu\sqljdbc_8.4\enu", jdbc_connection_string=>"jdbc:sqlserver://Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=B2BWebService;Data Source=TOUCHDB05;", id=>"10243dd96cbc3a21d2105c489922606e379ce63693dc4526f78e24b1ee195258", jdbc_driver_class=>"com.microsoft.sqlserver.jdbc.SQLServerDriver", enable_metric=>true, codec=><LogStash::Codecs::Plain id=>"plain_c950034b-7696-4351-9c19-e45fba45f791", enable_metric=>true, charset=>"UTF-8">, jdbc_paging_enabled=>false, jdbc_page_size=>100000, jdbc_validate_connection=>false, jdbc_validation_timeout=>3600, jdbc_pool_timeout=>5, sql_log_level=>"info", connection_retry_attempts=>1, connection_retry_attempts_wait_time=>0.5, plugin_timezone=>"utc", last_run_metadata_path=>"C:\Users\skkoganti/.logstash_jdbc_last_run", use_column_value=>false, tracking_column_type=>"numeric", clean_run=>false, record_last_run=>true, lowercase_column_names=>true, use_prepared_statements=>false>
Error: unable to load C:\Program Files\Java\sqljdbc_8.4.1.0_enu\sqljdbc_8.4\enu from :jdbc_driver_library, no such file to load -- C:/Program Files/Java/sqljdbc_8.4.1.0_enu/sqljdbc_8.4/enu
Exception: LogStash::PluginLoadingError
Stack: C:/ELK/logstash-7.9.1/logstash-7.9.1/vendor/bundle/jruby/2.5.0/gems/logstash-integration-jdbc-5.0.6/lib/logstash/plugin_mixins/jdbc/common.rb:53:in block in load_driver_jars' org/jruby/RubyArray.java:1809:in each'
C:/ELK/logstash-7.9.1/logstash-7.9.1/vendor/bundle/jruby/2.5.0/gems/logstash-integration-jdbc-5.0.6/lib/logstash/plugin_mixins/jdbc/common.rb:42:in load_driver_jars' C:/ELK/logstash-7.9.1/logstash-7.9.1/vendor/bundle/jruby/2.5.0/gems/logstash-integration-jdbc-5.0.6/lib/logstash/plugin_mixins/jdbc/common.rb:25:in load_driver'
C:/ELK/logstash-7.9.1/logstash-7.9.1/vendor/bundle/jruby/2.5.0/gems/logstash-integration-jdbc-5.0.6/lib/logstash/inputs/jdbc.rb:275:in run' C:/ELK/logstash-7.9.1/logstash-7.9.1/logstash-core/lib/logstash/java_pipeline.rb:378:in inputworker'
C:/ELK/logstash-7.9.1/logstash-7.9.1/logstash-core/lib/logstash/java_pipeline.rb:369:in `block in start_input'

It is saying that file does not exist.

It's exist badger for some reason it is quitting. Please find the screen shot for your reference.

jdbc_driver_library should point to the jar file, not the directory that contains it.

like below?

jdbc_driver_library => "C:\Program Files\Java\sqljdbc_8.4.1.0_enu\sqljdbc_8.4\enu\mssql-jdbc-8.4.1.jre11.jar"

Yes.

Error: Java::ComMicrosoftSqlserverJdbc::SQLServerException: The TCP/IP connection to the host Provider=SQLOLEDB.1, port 1433 has failed. Error: "Provider=SQLOLEDB.1. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".
Exception: Sequel::DatabaseConnectionError

I think there is problem with firewall isuee badger :), I will try to find it.

Hi Badger, Good Morning,

I tried to resolve the issue but unfortunately no luck. when i try to connect the database normally i can connect but through logstash i could not able to connect.

can you help me to resolve this issue.

I cannot. What you have now is not a logstash question. It is either an SQLserver question or a general networking question.

Yeah Badger, Something related to network.

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