LogStash JDBC input Error - sqlanywhere - Sybase - undefined method `new

I have been trying to use the JDBC input plugin to connect to my Sybase database (running on a SUSE server) and I think that I have it close but it is throwing a strange error at the moment:

[2018-05-23T00:47:43,415][ERROR][logstash.inputs.jdbc     ] Unable to connect to database. Tried 1 times {:error_message=>"NoMethodError: undefined method `new' for #<Array:0x6b29b1a4>"}

[2018-05-23T00:47:43,416][ERROR][logstash.pipeline ] A plugin had an unrecoverable error. Will restart this plugin.

Here is the full stack trace that loops over and over again:

[2018-05-23T00:51:39,594][ERROR][logstash.inputs.jdbc     ] Unable to connect to database. Tried 1 times {:error_message=>"NoMethodError: undefined method `new' for #<Array:0x6b29b1a4>"}

[2018-05-23T00:51:39,595][ERROR][logstash.pipeline ] A plugin had an unrecoverable error. Will restart this plugin.
Pipeline_id:main
Plugin: <LogStash::Inputs::Jdbc jdbc_connection_string=>"jdbc:sqlanywhere://localhost:2638/BI4_Audit", jdbc_user=>"dba", jdbc_driver_library=>"/opt/sap/sqlanywhere/java/sajdbc4.jar", jdbc_driver_class=>" ", jdbc_password=>, statement=>"SELECT * from dba.ADS_EVENT", id=>"9d6bf0203ba84c0e0b18ae38326fd9d45faa9a25fa1559537cb5986443b6469c", enable_metric=>true, codec=><LogStash::Codecs::Plain id=>"plain_09f9b51d-42a0-403f-aad1-55827c2831e7", 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, parameters=>{"sql_last_value"=>1970-01-01 00:00:00 +0000}, last_run_metadata_path=>"/home/ec2-user/.logstash_jdbc_last_run", use_column_value=>false, tracking_column_type=>"numeric", clean_run=>false, record_last_run=>true, lowercase_column_names=>true>
Error: NoMethodError: undefined method new' for #<Array:0x6b29b1a4> Exception: Sequel::DatabaseConnectionError Stack: /opt/logstash/logstash/vendor/bundle/jruby/2.3.0/gems/sequel-5.7.1/lib/sequel/adapters/jdbc.rb:203:inconnect'
/opt/logstash/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/sequel-5.7.1/lib/sequel/connection_pool.rb:126:in make_new' /opt/logstash/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/sequel-5.7.1/lib/sequel/connection_pool/threaded.rb:192:inassign_connection'
/opt/logstash/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/sequel-5.7.1/lib/sequel/connection_pool/threaded.rb:133:in acquire' /opt/logstash/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/sequel-5.7.1/lib/sequel/connection_pool/threaded.rb:90:inhold'
/opt/logstash/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/sequel-5.7.1/lib/sequel/database/connecting.rb:269:in synchronize' /opt/logstash/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/sequel-5.7.1/lib/sequel/database/connecting.rb:279:intest_connection'
/opt/logstash/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/sequel-5.7.1/lib/sequel/database/connecting.rb:58:in connect' /opt/logstash/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/sequel-5.7.1/lib/sequel/core.rb:116:inconnect'
/opt/logstash/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc-4.3.9/lib/logstash/plugin_mixins/jdbc.rb:114:in block in jdbc_connect' org/jruby/RubyKernel.java:1292:inloop'
/opt/logstash/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc-4.3.9/lib/logstash/plugin_mixins/jdbc.rb:111:in jdbc_connect' /opt/logstash/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc-4.3.9/lib/logstash/plugin_mixins/jdbc.rb:164:inopen_jdbc_connection'
/opt/logstash/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc-4.3.9/lib/logstash/plugin_mixins/jdbc.rb:220:in execute_statement' /opt/logstash/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc-4.3.9/lib/logstash/inputs/jdbc.rb:264:inexecute_query'
/opt/logstash/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc-4.3.9/lib/logstash/inputs/jdbc.rb:250:in run' /opt/logstash/logstash/logstash-core/lib/logstash/pipeline.rb:514:ininputworker'
/opt/logstash/logstash/logstash-core/lib/logstash/pipeline.rb:507:in `block in start_input'

Here is the basic configuration that I am running for the input:
input {
jdbc {
# Postgres jdbc connection string to our database, mydb
jdbc_connection_string => "jdbc:sqlanywhere://localhost:2638/BI4_Audit"
# The user we wish to execute our statement as
jdbc_user => "user"
# The path to our downloaded jdbc driver
jdbc_driver_library => "/opt/sap/sqlanywhere/java/sajdbc4.jar"
# The name of the driver class for Postgresql
jdbc_driver_class => " "
# Add the password for the DB user
jdbc_password => "password"
# Add a schedule (run every 5 minutes)
#schedule => "30 * * * * *"
# our query
statement => "SELECT * from dba.ADS_EVENT"
}
}

I have gotten past the driver class errors which I had before but am not sure about this undefined method `new

Help is appreciated

I have seen this error in a few threads, however the moderators just seem to let it close.

I know it is not as simple as postgres or mySQL connections but has anyone in the last 2 years been able to at least figure out why this error always appears?

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