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.

Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...