You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into same thing. Seems that Cassandra doesn't have a COUNT query.
It happens when debug/trace level is set.
As a workaround, i changed /vendor/bundle/jruby/1.9/gems/logstash-input-jdbc-4.1.3/lib/logstash/plugin_mixins/jdbc.rb to not call the qyery.count method.
Haven't got it all working yet.. still trudging through with the next error....
16:17:26.973 [[main]<jdbc] WARN logstash.inputs.jdbc - Exception when executing JDBC query {:exception=>#<Sequel::DatabaseError: Java::JavaLang::StringIndexOutOfBoundsException: >}
When executing Logstash with JDBC for Cassandra I am getting the error below
Java::ComDatastaxDriverCoreExceptions::SyntaxError: line 1:174 missing EOF at ')' (....logs_all_3_0_0 where event_id > '1970-01-01 00:00:00.000000'[)] AS...): SELECT count(*) AS "COUNT" FROM (select event_id, event_name, machine_name, payload from adamtestlog.logs_all_3_0_0 where event_id > '1970-01-01 00:00:00.000000') AS "T1" LIMIT 1 {:level=>:error, :file=>"sequel/database/logging.rb", :line=>"87", :method=>"lo
Exception when executing JDBC query {:exception=>#<Sequel::DatabaseError: Java::ComDatastaxDriverCoreExceptions::SyntaxError: line 1:174 missing EOF at ')' (....logs_all_3_0_0 where event_id > '1970-01-01 00:0[)] AS...)>, :level=>:warn, :file=>"logstash/plugin_mixins/jdbc.rb", :line=>"219", :method=>"execute_statement"}
The config file is as follows:
input {
jdbc {
jdbc_driver_library => "/opt/logstash/bin/jdbc-jar/cassandrajdbc1.1.jar"
jdbc_driver_class => "com.dbschema.CassandraJdbcDriver"
jdbc_connection_string => "jdbc:cassandra://172.30.0.96:9042/"
jdbc_user => "*_"
jdbc_password => "_"
schedule => " * * * *"
use_column_value => true
tracking_column => "event_id"
last_run_metadata_path => "/.logstash_jdbc_last_run"
statement => "select event_id, recorded_on, event_name, machine_name, payload from adamtestlog.logs_all_3_0_0 where event_id > :sql_last_value"
}
}
output{
stdout{
codec =>json_lines
}
}
My understanding is due to Cassandra it is unable to execute a select count(*) from (select * from ...) statement.
The text was updated successfully, but these errors were encountered: