Logstash Error to read SQL query for Firebird

I´m using Logstash in Raspiberry Pi with OS Raspbian Jesse. It´s works with API, but it don't works with a Firebird.
The error is :
[2020-02-07T14:43:11,666][ERROR][logstash.inputs.jdbc ] Java::JavaSql::SQLSyntaxErrorException: Dynamic SQL Error; SQL error code = -104; Token unknown - line 1, column 93; LIMIT [SQLState:42000, ISC error code:335544634]: SELECT count(*) AS "COUNT" FROM (SELECT * FROM SP_EFICIENCIA_MENSAL_FABRICACAO('')) AS "T1" LIMIT 1

My file .conf is:

jdbc_driver_library => "/usr/share/logstash/bin/jaybird-full-3.0.8.jar"
jdbc_driver_class => "org.firebirdsql.jdbc.FBDriver"
jdbc_connection_string => "jdbc:firebirdsql:IP_Adress:C:\X\XXX\my_data_base.FDB"
jdbc_user => "my-user"
jdbc_password => "my-passord"
schedule => "* * * * *"
jdbc_page_size => 0
jdbc_paging_enabled => false
clean_run => "true"
last_run_metadata_path => "/usr/share/logstash/bin/lat_run.txt"
hosts => "my-cloud:9200"
index => "my-index"
document_id => "%{id}"

The jdbc input attempts to count the number of rows that the query will return. When it does that it appends "LIMIT 1" to the query. However, Firebird uses a different syntax (FIRST 1). That should result in a single error message and the count feature being disabled. In other words, you should be able to ignore this.

1 Like

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