Splunk Search

Connection Reset with db-connect and MS SQL

bleinfelder
Path Finder

Hi there,

I struggled quite a time to make db-connect work with my splunk 6.0.3 installation.

Error Message in dbx.log is attached.

I solved the issue with replacing JRE8 with JRE7. I guess there is some issue with different encryption ciphers used in JRE7/8.

As I couldn't find anything on this issue maybe this note is helpful to others.

Regards,

Bernd

.....................

2014-05-16 09:05:12.994 dbx5589:ERROR:DatabaseList - Error fetching database catalogs: java.sql.SQLException: Network error IOException: Connection reset
java.sql.SQLException: Network error IOException: Connection reset
    at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:417)
    at net.sourceforge.jtds.jdbc.ConnectionJDBC3.<init>(ConnectionJDBC3.java:50)
    at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:185)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at com.splunk.dbx.sql.type.impl.AbstractDatabaseType.connect(AbstractDatabaseType.java:138)
    at com.splunk.dbx.sql.type.impl.MicrosoftSqlServer.connect(MicrosoftSqlServer.java:85)
    at com.splunk.dbx.sql.type.impl.AbstractJtdsDatabaseType.listCatalogs(AbstractJtdsDatabaseType.java:48)
    at com.splunk.dbx.info.DatabaseList.invoke(DatabaseList.java:34)
    at com.splunk.bridge.session.BridgeSession.call(BridgeSession.java:92)
    at com.splunk.bridge.session.BridgeSession.call(BridgeSession.java:30)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(Unknown Source)
    at java.net.SocketInputStream.read(Unknown Source)
    at net.sourceforge.jtds.ssl.TdsTlsInputStream.readFully(TdsTlsInputStream.java:131)
    at net.sourceforge.jtds.ssl.TdsTlsInputStream.primeBuffer(TdsTlsInputStream.java:100)
    at net.sourceforge.jtds.ssl.TdsTlsInputStream.read(TdsTlsInputStream.java:78)
    at sun.security.ssl.InputRecord.readFully(Unknown Source)
    at sun.security.ssl.InputRecord.read(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
    at net.sourceforge.jtds.ssl.SocketFactories$TdsTlsSocketFactory.createSocket(SocketFactories.java:101)
    at net.sourceforge.jtds.jdbc.SharedSocket.enableEncryption(SharedSocket.java:346)
    at net.sourceforge.jtds.jdbc.TdsCore.negotiateSSL(TdsCore.java:548)
    at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:346)
    ... 14 more
2014-05-16 09:05:13.010 dbx5589:INFO:BridgeSession - Caught Exit exception: JavaBridgeExitException{status=-1}
2014-05-16 09:05:13.010 dbx5589:INFO:BridgeSession - Execution finished in duration=341388 ms with status=-1

linu1988
Champion

Hi,
The below link will help in resolving the issue. I have used DBConnect 1.2.2 with the patched jar file.

http://sourceforge.net/p/jtds/bugs/725/?limit=10&page=1#7b2b

Search for the text and link:
Attachments
jtds-1.3.1-v20140512.jar

Thanks,
L

0 Karma

twellinghurst
Engager

I ran across this same issue and this post was extremely helpful. Thanks for sharing!

0 Karma

ipoy11
Engager

With Java 7 now it works. Thank you!

0 Karma

otaci
Explorer

Had same problem and solution. Thanks.

0 Karma

espositojli
Engager

thanks so much for posting, using jre7 fixed it for me too

0 Karma

paulbmxu
Explorer

2/2016, this issue of java 8 with SQL server is still not fixed!

0 Karma

rroussev_splunk
Splunk Employee
Splunk Employee

Thanks for the note. The jtds issue is in the process of being fixed (http://sourceforge.net/p/jtds/bugs/725/) and we'll pick it up as soon as practical.

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Take Action Automatically on Splunk Alerts with Red Hat Ansible Automation Platform

 Are you ready to revolutionize your IT operations? As digital transformation accelerates, the demand for ...

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...