# Contention of logstash in sql server

**URL:** https://discuss.elastic.co/t/contention-of-logstash-in-sql-server/100108
**Category:** Logstash
**Created:** [September 11, 2017, 5:35pm UTC](https://discuss.elastic.co/t/contention-of-logstash-in-sql-server/100108 "2017-09-11T17:35:49Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Santos\_Javier\_Salaza](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/santos_javier_salaza/32/21978_2.png) [@Santos\_Javier\_Salaza](https://discuss.elastic.co/u/Santos_Javier_Salaza)
#### Post date: [September 11, 2017, 5:35pm UTC](https://discuss.elastic.co/t/contention-of-logstash-in-sql-server/100108/1 "2017-09-11T17:35:50Z")

</div>

good morning  
I have a detail with a connection of database sql server to logstash earlier this one worked correctly but when changing the table for the query this mara the following error:

[2017-09-11T12: 24: 05,936] [ERROR] [logstash.pipeline] Error al registrar el complemento {: plugin =\> "" C: \ ELK \ logstash-5.5.2 \ driver \ sqljdbc\_6.2 \ enu \ mssql-jdbc-6.2.1.jre8 \ ", jdbc\_driver\_class =\> " com.microsoft.sqlserver.jdbc.SQLServerDriver \ ", jdbc\_connection\_string =\> " jdbc: sqlserver: // localhost: 1433; databaseName = gestion\_documental\_dev \ ", jdbc\_user =\> " sa \ ", jdbc\_password =\>, instrucción =\> " SELECT \* FROM Fondo \ ", jdbc\_paging\_enabled =\> true, jdbc\_page\_size =\> 50000, id =\> " 8160dda28248e023f005898ec3c93a762767f1c7-1 \ , enable\_metric =\> true, codec =\> \ "plain\_f66905f9-2cff-4d13-b867-6730dd968f15 ", enable\_metric =\> true, charset =\> \ "UTF-8 "\>, 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, last\_run\_metadata\_path =\> \ "C: \ Windows \ system32 \ config \ systemprofile / .logstash\_jdbc\_last\_run ", use\_column\_value =\> false, tracking\_column\_type =\> \ "numeric ", clean\_run =\> falso, record\_last\_run =\> true, lowercase\_column\_names =\> true\> ",: error =\>" \ nen \ "lector ", posición 0 en la línea 0 columna 0 "} [2017-09-11T12: 24: 06,670] [ERROR] [logstash.agent] Pipeline abortado debido a un error {: excepción =\> #): 'caracteres lectores' inaceptables '' (0x0) caracteres especiales no están permitidos en "'lector ', posición 0 en la línea 0 columna 0\>,: backtrace =\> ["org / jruby / ext / psych / PsychParser.java: 232: inparse'",  
"C:/ELK/logstash-5.5.2/vendor/jruby/lib/ruby/1.9/psych.rb:375:in  
parse\_stream '"," C: /ELK/logstash-5.5.2/vendor/jruby/lib/ruby/1.9/psych.rb: 323: en parse'",  
"C:/ELK/logstash-5.5.2/vendor/jruby/lib/ruby/1.9/psych.rb:250:in  
carga' "," C: /ELK/logstash-5.5.2/vendor /bundle/jruby/1.9/gems/logstash-input-jdbc-4.2.2/lib/logstash/inputs/jdbc.rb:222:in register'",  
"C:/ELK/logstash-5.5.2/logstash-core/lib/logstash/pipeline.rb:281:in  
register\_plugin '"," C: /ELK/logstash-5.5.2/logstash- core / lib / logstash / pipeline.rb: 292: en register\_plugins'", "org/jruby/RubyArray.java:1613:incada "", "C: /ELK/logstash-5.5.2/logstash-core/lib/logstash/pipeline.rb: 292: in register\_plugins'",  
"C:/ELK/logstash-5.5.2/logstash-core/lib/logstash/pipeline.rb:442:in  
start\_inputs '", "C : /ELK/logstash-5.5.2/logstash-core/lib/logstash/pipeline.rb: 336: en start\_workers'",  
"C:/ELK/logstash-5.5.2/logstash-core/lib/logstash/pipeline.rb:226:in  
ejecución '"," C: /ELK/logstash-5.5.2/logstash-core/lib/logstash/agent .rb: 398: en `start\_pipeline '"]}

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [September 11, 2017, 6:21pm UTC](https://discuss.elastic.co/t/contention-of-logstash-in-sql-server/100108/2 "2017-09-11T18:21:16Z")

</div>

It would be easier to help if the messages weren't in Spanish, but it looks like there's garbage data in the .logstash\_jdbc\_last\_run file. If you've changed the source table and the data in the file isn't usable anymore you can just delete the file.

---

<div class="post-metadata">

### Author: ![Santos\_Javier\_Salaza](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/santos_javier_salaza/32/21978_2.png) [@Santos\_Javier\_Salaza](https://discuss.elastic.co/u/Santos_Javier_Salaza)
#### Post date: [September 11, 2017, 6:40pm UTC](https://discuss.elastic.co/t/contention-of-logstash-in-sql-server/100108/3 "2017-09-11T18:40:22Z")

</div>

Thank you very much, the problem was solved

I have a doubt for all my database is in elaticsearch that I can do?

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [September 11, 2017, 8:22pm UTC](https://discuss.elastic.co/t/contention-of-logstash-in-sql-server/100108/4 "2017-09-11T20:22:53Z")

</div>

> I have a doubt for all my database is in elaticsearch that I can do?

You could e.g. use the Elasticsearch count API to count the number of docs in the index. Hopefully it matches the number of rows in your database.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [October 9, 2017, 8:23pm UTC](https://discuss.elastic.co/t/contention-of-logstash-in-sql-server/100108/5 "2017-10-09T20:23:00Z")

</div>

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