Jdbc streaming and sql error

I am using the jdbc streaming and below is my code

jdbc_streaming {
jdbc_driver_library => "C:\logstash-7.0.0\bin\sqljdbc42.jar"
jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
jdbc_connection_string => "jdbc:sqlserver://ltgsql.database.windows.net;databaseName=RHA;user=;password=;"
jdbc_user => ""
jdbc_password => ""
parameters => { "hname" => "[agent][hostname]"}
parameters => { "username" => "[userid]"}
statement => "select SiteName,Latitude,Longitude FROM Session_Key WHERE HostedMachineName like lower(:hname) and UserName like :username"
target => "site_data"
}

the error that I am getting is

[2019-06-20T16:27:48,970][ERROR][logstash.javapipeline ] tdsparser.java:83)", "com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(com/microsoft/sqlserver/jdbc/SQLServerConnection.java:2532)", "com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(com/microsoft/sqlserver/jdbc/SQLServerConnection.java:1929)", "com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(com/microsoft/sqlserver/jdbc/SQLServerConnection.java:41)", "com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(com/microsoft/sqlserver/jdbc/SQLServerConnection.java:1917)", "com.microsoft.sqlserver.jdbc.TDSCommand.execute(com/microsoft/sqlserver/jdbc/IOBuffer.java:4026)", "com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(com/microsoft/sqlserver/jdbc/SQLServerConnection.java:1416)", "com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(com/microsoft/sqlserver/jdbc/SQLServerConnection.java:1061)", "com.microsoft.sqlserver.jdbc.SQLServerConnection.login(com/microsoft/sqlserver/jdbc/SQLServerConnection.java:833)"

[2019-06-20T16:27:48,985][ERROR][logstash.agent ] Failed to execute action {:id=>:ltg_beats, :action_type=>LogStash::ConvergeResult::FailedAction, :message=>"Could not execute action: PipelineAction::Create<ltg_beats>, action_result: false", :backtrace=>nil}

Can anyone explain what this error is.
I thought that maybe a connection issue but I can connect to the database from this VM

thanks

As an update I found that for the sqljdbc jar file there needs to be all the libraries. So for those that need the info make sure that the jar file you download for the streaming that it has all the libraries.

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