0

i am using ELK stack 7.15.2 jdk-11.0.12 jre1.8.0_311

        at C_3a_.ELK_20_Stack.logstash_minus_7_dot_15_dot_2.logstash_minus_core.lib.logstash.java_pipeline.RUBY$block$start_input$1(C:/ELK Stack/logstash-7.15.2/logstash-core/lib/logstash/java_pipeline.rb:396) [jruby-complete-9.2.19.0.jar:?]
        at org.jruby.runtime.CompiledIRBlockBody.callDirect(CompiledIRBlockBody.java:138) [jruby-complete-9.2.19.0.jar:?]
        at org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:58) [jruby-complete-9.2.19.0.jar:?]
        at org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:52) [jruby-complete-9.2.19.0.jar:?]
        at org.jruby.runtime.Block.call(Block.java:139) [jruby-complete-9.2.19.0.jar:?]
        at org.jruby.RubyProc.call(RubyProc.java:318) [jruby-complete-9.2.19.0.jar:?]
        at org.jruby.internal.runtime.RubyRunnable.run(RubyRunnable.java:105) [jruby-complete-9.2.19.0.jar:?]
        at java.lang.Thread.run(Thread.java:829) ~[?:?]
[2021-11-15T19:45:14,247][ERROR][logstash.inputs.jdbc     ][main][3c418844ae06ddde4bc1309536933bd04f219ac568ba4ca9da6c0f1ecce32969] Unable to connect to database. Tried 1 times {:message=>"Java::ComMicrosoftSqlserverJdbc::SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: \"No appropriate protocol (protocol is disabled or cipher suites are inappropriate)\". ClientConnectionId:addec613-a945-4cc2-a9ee-736ef1dce911", :exception=>Sequel::DatabaseConnectionError, :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: "No appropriate protocol (protocol is disabled or cipher suites are inappropriate)". ClientConnectionId:addec613-a945-4cc2-a9ee-736ef1dce911, :backtrace=>["com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(com/microsoft/sqlserver/jdbc/SQLServerConnection.java:2892)", "com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(com/microsoft/sqlserver/jdbc/IOBuffer.java:1881)", "com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(com/microsoft/sqlserver/jdbc/SQLServerConnection.java:2452)", "com.microsoft.sqlserver.jdbc.SQLServerConnection.login(com/microsoft/sqlserver/jdbc/SQLServerConnection.java:2103)", "com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(com/microsoft/sqlserver/jdbc/SQLServerConnection.java:1950)", "com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(com/microsoft/sqlserver/jdbc/SQLServerConnection.java:1162)", "com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(com/microsoft/sqlserver/jdbc/SQLServerDriver.java:735)", "jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)", "jdk.internal.reflect.NativeMethodAccessorImpl.invoke(jdk/internal/reflect/NativeMethodAccessorImpl.java:62)", "jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(jdk/internal/reflect/DelegatingMethodAccessorImpl.java:43)", "java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:566)", "org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(org/jruby/javasupport/JavaMethod.java:426)", "org.jruby.javasupport.JavaMethod.invokeDirect(org/jruby/javasupport/JavaMethod.java:293)", "C_3a_.ELK_20_Stack.logstash_minus_7_dot_15_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.sequel_minus_5_dot_50_dot_0.lib.sequel.adapters.jdbc.connect(C:/ELK Stack/logstash-7.15.2/vendor/bundle/jruby/2.5.0/gems/sequel-5.50.0/lib/sequel/adapters/jdbc.rb:239)", "C_3a_.ELK_20_Stack.logstash_minus_7_dot_15_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.sequel_minus_5_dot_50_dot_0.lib.sequel.adapters.jdbc.RUBY$method$connect$0$__VARARGS__(C_3a_/ELK_20_Stack/logstash_minus_7_dot_15_dot_2/vendor/bundle/jruby/$2_dot_5_dot_0/gems/sequel_minus_5_dot_50_dot_0/lib/sequel/adapters/C:/ELK Stack/logstash-7.15.2/vendor/bundle/jruby/2.5.0/gems/sequel-5.50.0/lib/sequel/adapters/jdbc.rb)", "C_3a_.ELK_20_Stack.logstash_minus_7_dot_15_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.sequel_minus_5_dot_50_dot_0.lib.sequel.connection_pool.make_new(C:/ELK Stack/logstash-7.15.2/vendor/bundle/jruby/2.5.0/gems/sequel-5.50.0/lib/sequel/connection_pool.rb:122)", "C_3a_.ELK_20_Stack.logstash_minus_7_dot_15_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.sequel_minus_5_dot_50_dot_0.lib.sequel.connection_pool.RUBY$method$make_new$0$__VARARGS__(C_3a_/ELK_20_Stack/logstash_minus_7_dot_15_dot_2/vendor/bundle/jruby/$2_dot_5_dot_0/gems/sequel_minus_5_dot_50_dot_0/lib/sequel/C:/ELK Stack/logstash-7.15.2/vendor/bundle/jruby/2.5.0/gems/sequel-5.50.0/lib/sequel/connection_pool.rb)", "C_3a_.ELK_20_Stack.logstash_minus_7_dot_15_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.sequel_minus_5_dot_50_dot_0.lib.sequel.connection_pool.threaded.assign_connection(C:/ELK Stack/logstash-7.15.2/vendor/bundle/jruby/2.5.0/gems/sequel-5.50.0/lib/sequel/connection_pool/threaded.rb:209)", "C_3a_.ELK_20_Stack.logstash_minus_7_dot_15_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.sequel_minus_5_dot_50_dot_0.lib.sequel.connection_pool.threaded.RUBY$method$assign_connection$0$__VARARGS__(C_3a_/ELK_20_Stack/logstash_minus_7_dot_15_dot_2/vendor/bundle/jruby/$2_dot_5_dot_0/gems/sequel_minus_5_dot_50_dot_0/lib/sequel/connection_pool/C:/ELK Stack/logstash-7.15.2/vendor/bundle/jruby/2.5.0/gems/sequel-5.50.0/lib/sequel/connection_pool/threaded.rb)", "C_3a_.ELK_20_Stack.logstash_minus_7_dot_15_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.sequel_minus_5_dot_50_dot_0.lib.sequel.connection_pool.threaded.acquire(C:/ELK Stack/logstash-7.15.2/vendor/bundle/jruby/2.5.0/gems/sequel-5.50.0/lib/sequel/connection_pool/threaded.rb:139)", "C_3a_.ELK_20_Stack.logstash_minus_7_dot_15_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.sequel_minus_5_dot_50_dot_0.lib.sequel.connection_pool.threaded.RUBY$method$acquire$0$__VARARGS__(C_3a_/ELK_20_Stack/logstash_minus_7_dot_15_dot_2/vendor/bundle/jruby/$2_dot_5_dot_0/gems/sequel_minus_5_dot_50_dot_0/lib/sequel/connection_pool/C:/ELK Stack/logstash-7.15.2/vendor/bundle/jruby/2.5.0/gems/sequel-5.50.0/lib/sequel/connection_pool/threaded.rb)", "C_3a_.ELK_20_Stack.logstash_minus_7_dot_15_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.sequel_minus_5_dot_50_dot_0.lib.sequel.connection_pool.threaded.hold(C:/ELK Stack/logstash-7.15.2/vendor/bundle/jruby/2.5.0/gems/sequel-5.50.0/lib/sequel/connection_pool/threaded.rb:91)", "C_3a_.ELK_20_Stack.logstash_minus_7_dot_15_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.sequel_minus_5_dot_50_dot_0.lib.sequel.database.connecting.synchronize(C:/ELK Stack/logstash-7.15.2/vendor/bundle/jruby/2.5.0/gems/sequel-5.50.0/lib/sequel/database/connecting.rb:269)", "C_3a_.ELK_20_Stack.logstash_minus_7_dot_15_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.sequel_minus_5_dot_50_dot_0.lib.sequel.database.connecting.test_connection(C:/ELK Stack/logstash-7.15.2/vendor/bundle/jruby/2.5.0/gems/sequel-5.50.0/lib/sequel/database/connecting.rb:278)", "C_3a_.ELK_20_Stack.logstash_minus_7_dot_15_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.sequel_minus_5_dot_50_dot_0.lib.sequel.database.misc.initialize(C:/ELK Stack/logstash-7.15.2/vendor/bundle/jruby/2.5.0/gems/sequel-5.50.0/lib/sequel/database/misc.rb:175)", "org.jruby.RubyClass.newInstance(org/jruby/RubyClass.java:939)", "org.jruby.RubyClass$INVOKER$i$newInstance.call(org/jruby/RubyClass$INVOKER$i$newInstance.gen)", "C_3a_.ELK_20_Stack.logstash_minus_7_dot_15_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.sequel_minus_5_dot_50_dot_0.lib.sequel.database.connecting.connect(C:/ELK Stack/logstash-7.15.2/vendor/bundle/jruby/2.5.0/gems/sequel-5.50.0/lib/sequel/database/connecting.rb:57)", "C_3a_.ELK_20_Stack.logstash_minus_7_dot_15_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.sequel_minus_5_dot_50_dot_0.lib.sequel.core.connect(C:/ELK Stack/logstash-7.15.2/vendor/bundle/jruby/2.5.0/gems/sequel-5.50.0/lib/sequel/core.rb:124)", "C_3a_.ELK_20_Stack.logstash_minus_7_dot_15_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.logstash_minus_integration_minus_jdbc_minus_5_dot_1_dot_8.lib.logstash.plugin_mixins.jdbc.jdbc.jdbc_connect(C:/ELK Stack/logstash-7.15.2/vendor/bundle/jruby/2.5.0/gems/logstash-integration-jdbc-5.1.8/lib/logstash/plugin_mixins/jdbc/jdbc.rb:114)", "org.jruby.RubyKernel.loop(org/jruby/RubyKernel.java:1442)", "org.jruby.RubyKernel$INVOKER$s$0$0$loop.call(org/jruby/RubyKernel$INVOKER$s$0$0$loop.gen)", "C_3a_.ELK_20_Stack.logstash_minus_7_dot_15_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.logstash_minus_integration_minus_jdbc_minus_5_dot_1_dot_8.lib.logstash.plugin_mixins.jdbc.jdbc.jdbc_connect(C:/ELK Stack/logstash-7.15.2/vendor/bundle/jruby/2.5.0/gems/logstash-integration-jdbc-5.1.8/lib/logstash/plugin_mixins/jdbc/jdbc.rb:111)", "C_3a_.ELK_20_Stack.logstash_minus_7_dot_15_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.logstash_minus_integration_minus_jdbc_minus_5_dot_1_dot_8.lib.logstash.plugin_mixins.jdbc.jdbc.RUBY$method$jdbc_connect$0$__VARARGS__(C_3a_/ELK_20_Stack/logstash_minus_7_dot_15_dot_2/vendor/bundle/jruby/$2_dot_5_dot_0/gems/logstash_minus_integration_minus_jdbc_minus_5_dot_1_dot_8/lib/logstash/plugin_mixins/jdbc/C:/ELK Stack/logstash-7.15.2/vendor/bundle/jruby/2.5.0/gems/logstash-integration-jdbc-5.1.8/lib/logstash/plugin_mixins/jdbc/jdbc.rb)", "C_3a_.ELK_20_Stack.logstash_minus_7_dot_15_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.logstash_minus_integration_minus_jdbc_minus_5_dot_1_dot_8.lib.logstash.plugin_mixins.jdbc.jdbc.open_jdbc_connection(C:/ELK Stack/logstash-7.15.2/vendor/bundle/jruby/2.5.0/gems/logstash-integration-jdbc-5.1.8/lib/logstash/plugin_mixins/jdbc/jdbc.rb:154)", "C_3a_.ELK_20_Stack.logstash_minus_7_dot_15_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.logstash_minus_integration_minus_jdbc_minus_5_dot_1_dot_8.lib.logstash.plugin_mixins.jdbc.jdbc.RUBY$method$open_jdbc_connection$0$__VARARGS__(C_3a_/ELK_20_Stack/logstash_minus_7_dot_15_dot_2/vendor/bundle/jruby/$2_dot_5_dot_0/gems/logstash_minus_integration_minus_jdbc_minus_5_dot_1_dot_8/lib/logstash/plugin_mixins/jdbc/C:/ELK Stack/logstash-7.15.2/vendor/bundle/jruby/2.5.0/gems/logstash-integration-jdbc-5.1.8/lib/logstash/plugin_mixins/jdbc/jdbc.rb)", "C_3a_.ELK_20_Stack.logstash_minus_7_dot_15_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.logstash_minus_integration_minus_jdbc_minus_5_dot_1_dot_8.lib.logstash.plugin_mixins.jdbc.jdbc.execute_statement(C:/ELK Stack/logstash-7.15.2/vendor/bundle/jruby/2.5.0/gems/logstash-integration-jdbc-5.1.8/lib/logstash/plugin_mixins/jdbc/jdbc.rb:211)", "C_3a_.ELK_20_Stack.logstash_minus_7_dot_15_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.logstash_minus_integration_minus_jdbc_minus_5_dot_1_dot_8.lib.logstash.plugin_mixins.jdbc.jdbc.RUBY$method$execute_statement$0$__VARARGS__(C_3a_/ELK_20_Stack/logstash_minus_7_dot_15_dot_2/vendor/bundle/jruby/$2_dot_5_dot_0/gems/logstash_minus_integration_minus_jdbc_minus_5_dot_1_dot_8/lib/logstash/plugin_mixins/jdbc/C:/ELK Stack/logstash-7.15.2/vendor/bundle/jruby/2.5.0/gems/logstash-integration-jdbc-5.1.8/lib/logstash/plugin_mixins/jdbc/jdbc.rb)", "C_3a_.ELK_20_Stack.logstash_minus_7_dot_15_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.logstash_minus_integration_minus_jdbc_minus_5_dot_1_dot_8.lib.logstash.inputs.jdbc.execute_query(C:/ELK Stack/logstash-7.15.2/vendor/bundle/jruby/2.5.0/gems/logstash-integration-jdbc-5.1.8/lib/logstash/inputs/jdbc.rb:335)", "C_3a_.ELK_20_Stack.logstash_minus_7_dot_15_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.logstash_minus_integration_minus_jdbc_minus_5_dot_1_dot_8.lib.logstash.inputs.jdbc.RUBY$method$execute_query$0$__VARARGS__(C_3a_/ELK_20_Stack/logstash_minus_7_dot_15_dot_2/vendor/bundle/jruby/$2_dot_5_dot_0/gems/logstash_minus_integration_minus_jdbc_minus_5_dot_1_dot_8/lib/logstash/inputs/C:/ELK Stack/logstash-7.15.2/vendor/bundle/jruby/2.5.0/gems/logstash-integration-jdbc-5.1.8/lib/logstash/inputs/jdbc.rb)", "C_3a_.ELK_20_Stack.logstash_minus_7_dot_15_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.logstash_minus_integration_minus_jdbc_minus_5_dot_1_dot_8.lib.logstash.inputs.jdbc.run(C:/ELK Stack/logstash-7.15.2/vendor/bundle/jruby/2.5.0/gems/logstash-integration-jdbc-5.1.8/lib/logstash/inputs/jdbc.rb:303)", "C_3a_.ELK_20_Stack.logstash_minus_7_dot_15_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.logstash_minus_integration_minus_jdbc_minus_5_dot_1_dot_8.lib.logstash.inputs.jdbc.RUBY$method$run$0$__VARARGS__(C_3a_/ELK_20_Stack/logstash_minus_7_dot_15_dot_2/vendor/bundle/jruby/$2_dot_5_dot_0/gems/logstash_minus_integration_minus_jdbc_minus_5_dot_1_dot_8/lib/logstash/inputs/C:/ELK Stack/logstash-7.15.2/vendor/bundle/jruby/2.5.0/gems/logstash-integration-jdbc-5.1.8/lib/logstash/inputs/jdbc.rb)", "C_3a_.ELK_20_Stack.logstash_minus_7_dot_15_dot_2.logstash_minus_core.lib.logstash.java_pipeline.inputworker(C:/ELK Stack/logstash-7.15.2/logstash-core/lib/logstash/java_pipeline.rb:405)", "C_3a_.ELK_20_Stack.logstash_minus_7_dot_15_dot_2.logstash_minus_core.lib.logstash.java_pipeline.RUBY$method$inputworker$0$__VARARGS__(C_3a_/ELK_20_Stack/logstash_minus_7_dot_15_dot_2/logstash_minus_core/lib/logstash/C:/ELK Stack/logstash-7.15.2/logstash-core/lib/logstash/java_pipeline.rb)", "C_3a_.ELK_20_Stack.logstash_minus_7_dot_15_dot_2.logstash_minus_core.lib.logstash.java_pipeline.start_input(C:/ELK Stack/logstash-7.15.2/logstash-core/lib/logstash/java_pipeline.rb:396)", "org.jruby.RubyProc.call(org/jruby/RubyProc.java:318)", "java.lang.Thread.run(java/lang/Thread.java:829)"]}
[2021-11-15T19:45:14,263][WARN ][logstash.inputs.jdbc     ][main][3c418844ae06ddde4bc1309536933bd04f219ac568ba4ca9da6c0f1ecce32969] Exception when executing JDBC query {:exception=>"Java::ComMicrosoftSqlserverJdbc::SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: \"No appropriate protocol (protocol is disabled or cipher suites are inappropriate)\". ClientConnectionId:addec613-a945-4cc2-a9ee-736ef1dce911"}
[2021-11-15T19:45:15,255][INFO ][logstash.javapipeline    ][main] Pipeline terminated {"pipeline.id"=>"main"}
[2021-11-15T19:45:15,582][INFO ][logstash.pipelinesregistry] Removed pipeline from registry successfully {:pipeline_id=>:main}
[2021-11-15T19:45:15,649][INFO ][logstash.runner          ] Logstash shut down.

C:\ELK Stack\logstash-7.15.2>

I am trying to communicate with MySQL server Getting this issue Please help ComMicrosoftSqlserverJdbc::SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: \"No appropriate protocol (protocol is disabled or cipher suites are inappropriate)

test.conf file enter image description here

2
  • is the database name correct? alphai_nstitute seems a typo
    – glenacota
    Commented Nov 15, 2021 at 15:55
  • Yes database name is correct Commented Nov 16, 2021 at 10:32

1 Answer 1

0

First confirm that TCP is enabled, else try to enable it with the below steps

  1. Open SQL Server Configuration Manager
  2. Expand “SQL Server Network Configuration” and click on “Protocols for MSSQLSERVER”
  3. Right click on “TCP/IP” and choose “Enable”
  4. Click “OK” on the Warning that the service will have to be restarted
  5. Click on “SQL Server Services”
  6. Right click on “SQL Server (MSSQLSERVER) and choose “Restart”

Confirm your jdbc driver path below and specify it in the connection too

jdbc_driver_library => "/etc/logstash/sqljdbc_9.4/enu/mssql-jdbc-9.4.0.jre8.jar"
jdbc_driver_class => "Java::com.microsoft.sqlserver.jdbc.SQLServerDriver"
jdbc_connection_string => "jdbc:sqlserver://localhost:1433:alphai_nstitute"
8
  • Thanks for your reply i do all above steps that you mention but now i am getting different type of error org.jruby.exceptions.SystemExit: (SystemExit) exit at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:747) ~[jruby-complete-9.2.19.0.jar:?] at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:710) ~[jruby-complete-9.2.19.0.jar:?] at C_3a_.ELK_20_Stack.logstash_minus_7_dot_15_dot_2.lib.bootstrap.environment.<main>(C:\ELK Stack\logstash-7.15.2\lib\bootstrap\environment.rb:94) ~[?:?] Commented Nov 23, 2021 at 12:57
  • Sir Getting this issue [2021-11-23T18:32:00,862][WARN ][logstash.inputs.jdbc ][main][e9c4db4e3f1cd9e5b60e74315884750f1c29dac2dc7868d0280893eb5f8b6983] Exception when executing JDBC query {:exception=>"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:70a926d7-60f4-4cb4-bf0f-e1d453ee424a"} Commented Nov 23, 2021 at 13:33
  • Hi, please confirm if you have downloaded the Microsoft jdbc driver? and what version? there's also a post on the TLS errors here >> stackoverflow.com/questions/67246010/… you can also check that out. Commented Nov 24, 2021 at 9:27
  • i am using ELK stack 7.15.2 , SQL JDBC: sqljdbc_6.0.8112.200_enu and JDK: 17.0.1 Commented Nov 24, 2021 at 13:27
  • Thanks Mian, apologies for the late response, what version of SQL are you trying to connect, can you also try to use a more recent sqljdbc, I wish there's a way I could connect with you and see what you are trying to do and see if we can close this out as soon as possible. Commented Nov 25, 2021 at 11:30

Not the answer you're looking for? Browse other questions tagged or ask your own question.