# Error sql server to elasticsearch TLS10

**URL:** <https://discuss.elastic.co/t/error-sql-server-to-elasticsearch-tls10/307244>\
**Category:** Logstash\
**Tags:** docker\
**Created:** [June 15, 2022, 9:06am UTC](https://discuss.elastic.co/t/error-sql-server-to-elasticsearch-tls10/307244 "2022-06-15T09:06:44Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![5k\_pwc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/5k_pwc/32/107057_2.png) [@5k\_pwc](https://discuss.elastic.co/u/5k_pwc)\
**Post date:** [June 15, 2022, 9:06am UTC](https://discuss.elastic.co/t/error-sql-server-to-elasticsearch-tls10/307244/1 "2022-06-15T09:06:44Z")

</div>

I am trying to communicate with sqlserver with logstash,  
I used : java version "11.0.14" 2022-01-18 LTS  
Myfile.conf

```auto
input {

jdbc 

jdbc_driver_library => "C:\Users\Lenovo\Desktop\ELK\logstash-8.1.0\logstash-core\lib\jars\mssql-jdbc-10.2.1.jre8.jar"
#Placed my mssql-jdbc-7.4.1.jre8 JRE file in logstash ..\logstash-core\lib\jars\

jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"

jdbc_connection_string => "jdbc:sqlserver://localhost:1433;databaseName=sales;integratedSecurity=true;"

jdbc_user => "DESKTOP-72D32P6\Lenovo"

statement => "SELECT * FROM Janvier"
}

}

output {
  stdout { }
}

```

i get this error when i execute logstash -f sql.conf  
[2022-06-15T10:04:50,181][WARN][logstash.inputs.jdbc][main][e19f080911532a0b3a2b7a97c8a03964c2d0dd49cbfd57c4dec8d41439afebcf] Exception when executing JDBC query {:exception=\>Sequel::DatabaseConnectionError, :message=\>"Java::ComMicrosoftSqlserverJdbc::SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "The server selected protocol version TLS10 is not accepted by client preferences [TLS13, TLS12]". ClientConnectionId:08c85704-17c9-4355-83fd-abdef1e01cf9", :cause=\>"com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "The server selected protocol version TLS10 is not accepted by client preferences [TLS13, TLS12]". ClientConnectionId:08c85704-17c9-4355-83fd-abdef1e01cf9"}

---

<div class="post-metadata">

**Author:** ![Justin\_Cranford](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/justin_cranford/32/85302_2.png) [@Justin\_Cranford](https://discuss.elastic.co/u/Justin_Cranford)\
**Post date:** [June 15, 2022, 1:00pm UTC](https://discuss.elastic.co/t/error-sql-server-to-elasticsearch-tls10/307244/2 "2022-06-15T13:00:06Z")

</div>

TLSv1 and TLSv1.1 are disabled by Java by default. The settings are in java.security.

Look for the disabled algorithm TLSv1 in java.security and remove it. If using a container, mount your custom java.security file to that file location inside the container to replace it.

---

<div class="post-metadata">

**Author:** ![5k\_pwc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/5k_pwc/32/107057_2.png) [@5k\_pwc](https://discuss.elastic.co/u/5k_pwc)\
**Post date:** [June 15, 2022, 3:15pm UTC](https://discuss.elastic.co/t/error-sql-server-to-elasticsearch-tls10/307244/3 "2022-06-15T15:15:06Z")

</div>

yes it worked thank you.  
but i have a new error

 ![img](https://us1.discourse-cdn.com/elastic/original/3X/c/b/cbe8ae217e61136dcc20a069d29254c373ea8231.png)  
knowing that my .conf file looks like this.

```auto
input {

jdbc 

jdbc_driver_library =>"C:\Users\Lenovo\Desktop\ELK\logstash-8.1.0\logstash-core\lib\jars\msi-mssql-jdbc-2.0.3.jar"
#Placed my mssql-jdbc-7.4.1.jre8 JRE file in logstash ..\logstash-core\lib\jars\

jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"

jdbc_connection_string => "jdbc:sqlserver://localhost:1433;databaseName=sales;integratedSecurity=false;"

jdbc_user => "DESKTOP-72D32P6\Lenovo"

statement => "SELECT * FROM Janvier"
}

}

output {
  stdout { }
}

```

---

<div class="post-metadata">

**Author:** ![Justin\_Cranford](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/justin_cranford/32/85302_2.png) [@Justin\_Cranford](https://discuss.elastic.co/u/Justin_Cranford)\
**Post date:** [June 15, 2022, 4:15pm UTC](https://discuss.elastic.co/t/error-sql-server-to-elasticsearch-tls10/307244/4 "2022-06-15T16:15:00Z")

</div>

Sorry, I don't know how to read that error message. It is a screenshot, so I cannot copy-and-paste the error text into Google search or Google translate. Screenshots are good, but a copy of the error text is ideal to accompany the screenshot.

---

<div class="post-metadata">

**Author:** ![5k\_pwc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/5k_pwc/32/107057_2.png) [@5k\_pwc](https://discuss.elastic.co/u/5k_pwc)\
**Post date:** [June 15, 2022, 5:07pm UTC](https://discuss.elastic.co/t/error-sql-server-to-elasticsearch-tls10/307244/5 "2022-06-15T17:07:14Z")

</div>

sorry, I thought it was clearer but I wouldn't do it again ,

```auto
.logstash.java_pipeline.inputworker(C:/Users/Lenovo/Desktop/ELK/logstash-8.1.0/logstash-core/lib/logstash/java_pipeline.rb:409)", "C_3a_.Users.Lenovo.Desktop.ELK.logstash_minus_8_dot_1_dot_0.logstash_minus_core.lib.logstash.java_pipeline.start_input(C:/Users/Lenovo/Desktop/ELK/logstash-8.1.0/logstash-core/lib/logstash/java_pipeline.rb:400)", "org.jruby.RubyProc.call(org/jruby/RubyProc.java:318)", "java.lang.Thread.run(java/lang/Thread.java:829)"]}
[2022-06-15T18:04:48,240][WARN][logstash.inputs.jdbc][main][e19f080911532a0b3a2b7a97c8a03964c2d0dd49cbfd57c4dec8d41439afebcf] Exception when executing JDBC query {:exception=>Sequel::DatabaseConnectionError, :message=>"Java::ComMicrosoftSqlserverJdbc::SQLServerException: ├ëchec de l'ouverture de session de l'utilisateur┬á''. ClientConnectionId:d49e4a16-7daf-4d95-8969-38f7bf4ab427", :cause=>"com.microsoft.sqlserver.jdbc.SQLServerException: ├ëchec de l'ouverture de session de l'utilisateur┬á''. ClientConnectionId:d49e4a16-7daf-4d95-8969-38f7bf4ab427"}
[2022-06-15T18:04:48,787][INFO][logstash.javapipeline][main] Pipeline terminated {"pipeline.id"=>"main"}
[2022-06-15T18:04:49,041][INFO][logstash.pipelinesregistry] Removed pipeline from registry successfully {:pipeline_id=>:main}
[2022-06-15T18:04:49,112][INFO][logstash.runner] Logstash shut down.

```

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [June 15, 2022, 5:14pm UTC](https://discuss.elastic.co/t/error-sql-server-to-elasticsearch-tls10/307244/6 "2022-06-15T17:14:36Z")

</div>

Check the SQL server logs. The reason for the login failure is not returned to the client, for security reasons, but is logged on the server side.

---

<div class="post-metadata">

**Author:** ![5k\_pwc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/5k_pwc/32/107057_2.png) [@5k\_pwc](https://discuss.elastic.co/u/5k_pwc)\
**Post date:** [June 15, 2022, 5:17pm UTC](https://discuss.elastic.co/t/error-sql-server-to-elasticsearch-tls10/307244/7 "2022-06-15T17:17:20Z")

</div>

![Capture d’écran 2022-06-15 053307](https://us1.discourse-cdn.com/elastic/original/3X/d/3/d3b06220639bf35eae12ed9438b30e6d9b08e4b1.png)  
how can i visualize the SQL server logs. thanks

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [June 15, 2022, 5:34pm UTC](https://discuss.elastic.co/t/error-sql-server-to-elasticsearch-tls10/307244/8 "2022-06-15T17:34:40Z")

</div>

That is an SQL Server question which I cannot answer. You could check the documentation [here](https://docs.microsoft.com/en-us/sql/tools/configuration-manager/viewing-the-sql-server-error-log?view=sql-server-ver16).

---

<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:** [July 13, 2022, 5:35pm UTC](https://discuss.elastic.co/t/error-sql-server-to-elasticsearch-tls10/307244/9 "2022-07-13T17:35:26Z")

</div>

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