hi all, i am using following input jdbc in my logstash config file:
input {
jdbc {
jdbc_driver_library => "sqljdbc42.jar"
jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
jdbc_connection_string => "jdbc:sqlserver://localhost:3333;databaseName=Total"
jdbc_user => "****"
jdbc_password => "****"
schedule => "45 10-18/1 * * *"
jdbc_validate_connection => "true"
connection_retry_attempts => "1000"
connection_retry_attempts_wait_time => "60"
statement => "
DECLARE @DDate1 CHAR(10)
select @DDate1=REPLACE(MAX(FDate),'/','') from Total.dbo.TotalTxn_Control
select [BaseDate_Accept_Setel]
,[Resp_Code]
,[BANCS_Cycle_No] from dbo.ISC_TotalTXN where (@DDate1> :sql_last_value) and (BaseDate_Accept_Setel <= @DDate1) and BaseDate_Accept_Setel > :sql_last_value order by BaseDate_Accept_Setel
"
use_column_value => "true"
tracking_column => "basedate_accept_setel"
}
according to above configuration, logstash should try to connect to data base in "10:45 -11:45-12:45-13:45-14:45-15:45-16:45-17:45-18:45" time range, but when i checked the logstash log following message was unexpected:
[2019-04-07T07:59:19,102][ERROR][logstash.inputs.jdbc ] Unable to connect to database. Trying again {:error_message=>"Java::ComMicrosoftSqlserverJdbc::SQLServerException: The TCP/IP connection to the host localhost, port 3333 has failed. Error: \"Connection timed out: no further information. 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.\"."}
where it seems logstash try to connect at 07:59 which is not in schedule range. Could you please advise me about this?