I'm using following config file:
input {
jdbc {
jdbc_validate_connection => true
jdbc_driver_library => "/app/logstash-5.6.2/lib/ojdbc7.jar"
jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
jdbc_connection_string => "jdbc:oracle:thin:@localhost:1521/apextest"
jdbc_user => ""
jdbc_password => ""
statement => "SELECT sysdate from dual"
}
}
output {
stdout { codec => rubydebug }
}
I ran this file, Getting following error:
[2017-10-07T21:42:29,342][ERROR][logstash.inputs.jdbc ] Unable to connect to database. Tried 1 times {:error_message=>"Java::JavaSql::SQLRecoverableException: Listener refused the connection with the following error:\nORA-12514, TNS:listener does not currently know of service requested in connect descriptor\n "}
[2017-10-07T21:42:29,343][WARN ][logstash.inputs.jdbc ] Exception when executing JDBC query {:exception=>#<Sequel::DatabaseConnectionError: Java::JavaSql::SQLRecoverableException: Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
}
[2017-10-07T21:42:29,344][WARN ][logstash.inputs.jdbc ] Attempt reconnection.
Could you please tell me what is issue?