Erro ao tentar copiar dados mssql para elasticsearch usando o logstash


0

Estou tentando executar o logstash com o seguinte arquivo conf. Eu sou usuário windows10.

input {
  jdbc {
    jdbc_connection_string => "jdbc:sqlserver://localhost;databaseName=Northwind;integratedSecurity=true;"
    jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
    jdbc_user => "xxx"

    statement => "SELECT * FROM Customers"
  }
}

output {
  elasticsearch {
    hosts => ["localhost:9200"]
    index => "northwind_customers"
  }
}

Abaixo está o erro. Você pode me ajudar a resolver esse problema?

PS C:\ELK\logstash-6.1.2\bin> .\logstash -f .\testsqlserver.conf
Sending Logstash's logs to C:/ELK/logstash-6.1.2/logs which is now configured via log4j2.properties
[2019-01-26T00:39:21,080][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"fb_apache", :directory=>"C:/ELK/logstash-6.1.2/modules/fb_apache/configuration"}
[2019-01-26T00:39:21,092][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"netflow", :directory=>"C:/ELK/logstash-6.1.2/modules/netflow/configuration"}
[2019-01-26T00:39:21,254][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2019-01-26T00:39:21,654][INFO ][logstash.runner          ] Starting Logstash {"logstash.version"=>"6.1.2"}
[2019-01-26T00:39:21,956][INFO ][logstash.agent           ] Successfully started Logstash API endpoint {:port=>9600}
[2019-01-26T00:39:23,790][INFO ][logstash.outputs.elasticsearch] Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>[http://localhost:9200/]}}
[2019-01-26T00:39:23,797][INFO ][logstash.outputs.elasticsearch] Running health check to see if an Elasticsearch connection is working {:healthcheck_url=>http://localhost:9200/, :path=>"/"}
[2019-01-26T00:39:23,937][WARN ][logstash.outputs.elasticsearch] Restored connection to ES instance {:url=>"http://localhost:9200/"}
[2019-01-26T00:39:23,983][INFO ][logstash.outputs.elasticsearch] ES Output version determined {:es_version=>nil}
[2019-01-26T00:39:23,986][WARN ][logstash.outputs.elasticsearch] Detected a 6.x and above cluster: the `type` event field won't be used to determine the document _type {:es_version=>6}
[2019-01-26T00:39:23,998][INFO ][logstash.outputs.elasticsearch] Using mapping template from {:path=>nil}
[2019-01-26T00:39:24,013][INFO ][logstash.outputs.elasticsearch] Attempting to install template {:manage_template=>{"template"=>"logstash-*", "version"=>60001, "settings"=>{"index.refresh_interval"=>"5s"}, "mappings"=>{"_default_"=>{"dynamic_templates"=>[{"message_field"=>{"path_match"=>"message", "match_mapping_type"=>"string", "mapping"=>{"type"=>"text", "norms"=>false}}}, {"string_fields"=>{"match"=>"*", "match_mapping_type"=>"string", "mapping"=>{"type"=>"text", "norms"=>false, "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}}}}], "properties"=>{"@timestamp"=>{"type"=>"date"}, "@version"=>{"type"=>"keyword"}, "geoip"=>{"dynamic"=>true, "properties"=>{"ip"=>{"type"=>"ip"}, "location"=>{"type"=>"geo_point"}, "latitude"=>{"type"=>"half_float"}, "longitude"=>{"type"=>"half_float"}}}}}}}}
[2019-01-26T00:39:24,043][INFO ][logstash.outputs.elasticsearch] New Elasticsearch output {:class=>"LogStash::Outputs::ElasticSearch", :hosts=>["//localhost:9200"]}
[2019-01-26T00:39:24,058][INFO ][logstash.pipeline        ] Starting pipeline {:pipeline_id=>"main", "pipeline.workers"=>6, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>5, "pipeline.max_inflight"=>750, :thread=>"#<Thread:0x5e3f3444 run>"}
[2019-01-26T00:39:24,396][INFO ][logstash.pipeline        ] Pipeline started {"pipeline.id"=>"main"}
[2019-01-26T00:39:24,460][INFO ][logstash.agent           ] Pipelines running {:count=>1, :pipelines=>["main"]}
[2019-01-26T00:39:54,091][ERROR][logstash.inputs.jdbc     ] Unable to connect to database. Tried 1 times {:error_message=>"Java::ComMicrosoftSqlserverJdbc::SQLServerException: ?몄뒪??localhost, ?ы듃 1433?????TCP/IP ?곌껐???ㅽ뙣?덉뒿?덈떎. ?ㅻ쪟: \"Connection refused: connect. ?곌껐 ?띿꽦???뺤씤?섏떗?쒖삤. SQL Server???몄뒪?댁뒪媛 ?몄뒪?몄뿉???ㅽ뻾?섍퀬 ?덇퀬 ?ы듃?먯꽌 TCP/IP ?곌껐???덉슜?섍퀬 ?덈뒗吏 ?뺤씤?섏떗?쒖삤. ?먰븳 諛⑺솕踰쎌뿉???ы듃濡쒖쓽 TCP ?곌껐??李⑤떒? 섏? ?딅뒗吏 ?뺤씤?섏떗?쒖삤.\"."}
뿰寃곗쓣 李⑤떒?섏? ?딅뒗吏 ?뺤씤?섏떗?쒖삤.\"."}
"."}
[2019-01-26T00:39:54,110][ERROR][logstash.pipeline        ] A plugin had an unrecoverable error. Will restart this plugin.
  Pipeline_id:main
  Plugin: <LogStash::Inputs::Jdbc jdbc_connection_string=>"jdbc:sqlserver://localhost;databaseName=Northwind;integratedSecurity=true;", jdbc_driver_class=>"com.microsoft.sqlserver.jdbc.SQLServerDriver", jdbc_user=>"xxx", statement=>"SELECT * FROM Customers", id=>"795803d73f1e16c17f0ac119ef2139885d35fcc08e30d39a1c9a0b21ceb41941", enable_metric=>true, codec=><LogStash::Codecs::Plain id=>"plain_945af878-0c76-47c7-917c-fc03e5fad6ce", enable_metric=>true, charset=>"UTF-8">, jdbc_paging_enabled=>false, jdbc_page_size=>100000, jdbc_validate_connection=>false, jdbc_validation_timeout=>3600, jdbc_pool_timeout=>5, sql_log_level=>"info", connection_retry_attempts=>1, connection_retry_attempts_wait_time=>0.5, parameters=>{"sql_last_value"=>1970-01-01 00:00:00 UTC}, last_run_metadata_path=>"C:\\Users\\user/.logstash_jdbc_last_run", use_column_value=>false, tracking_column_type=>"numeric", clean_run=>false, record_last_run=>true, lowercase_column_names=>true>
  Error: Java::ComMicrosoftSqlserverJdbc::SQLServerException: ?몄뒪??localhost, ?ы듃 1433?????TCP/IP ?곌껐???ㅽ뙣?덉 뒿?덈떎. ?ㅻ쪟: "Connection refused: connect. ?곌껐 ?띿꽦???뺤씤?섏떗?쒖삤. SQL Server???몄뒪?댁뒪媛 ?몄뒪?몄뿉???ㅽ뻾?섍퀬 ?덇퀬 ?ы듃?먯꽌 TCP/IP ?곌껐???덉슜?섍퀬 ?덈뒗吏 ?뺤씤?섏떗?쒖삤. ?먰븳 諛⑺솕踰쎌뿉???ы듃濡쒖쓽 TCP ?곌껐??李⑤떒?섏? ?딅뒗吏 ?뺤씤?섏떗?쒖삤.".
  Exception: Sequel::DatabaseConnectionError
  Stack: com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(com/microsoft/sqlserver/jdbc/SQLServerException.java:191)
com.microsoft.sqlserver.jdbc.SQLServerException.ConvertConnectExceptionToSQLServerException(com/microsoft/sqlserver/jdbc/SQLServerException.java:242)
com.microsoft.sqlserver.jdbc.SocketFinder.findSocket(com/microsoft/sqlserver/jdbc/IOBuffer.java:2280)
com.microsoft.sqlserver.jdbc.TDSChannel.open(com/microsoft/sqlserver/jdbc/IOBuffer.java:493)
com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(com/microsoft/sqlserver/jdbc/SQLServerConnection.java:1388)
com.microsoft.sqlserver.jdbc.SQLServerConnection.login(com/microsoft/sqlserver/jdbc/SQLServerConnection.java:1069)
com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(com/microsoft/sqlserver/jdbc/SQLServerConnection.java:905)
com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(com/microsoft/sqlserver/jdbc/SQLServerConnection.java:452)
com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(com/microsoft/sqlserver/jdbc/SQLServerDriver.java:1014)
Ao utilizar nosso site, você reconhece que leu e compreendeu nossa Política de Cookies e nossa Política de Privacidade.
Licensed under cc by-sa 3.0 with attribution required.