Splunk Enterprise

Connection reset by peer (Write failed) Microsoft SQL Server table data to Splunk index through Splunk DB Connect?

sveerapureddy26
Loves-to-Learn

Hi All, 

I am getting below error Send Microsoft SQL Server table data to splunk index through splunk DB Connect

2023-01-19 14:02:37.006 +0000 [QuartzScheduler_Worker-19] INFO c.s.dbx.server.dbinput.recordwriter.HecEventWriter - action=write_records batch_size=1000
2023-01-19 14:02:37.006 +0000 [QuartzScheduler_Worker-19] INFO c.s.d.s.dbinput.recordwriter.HttpEventCollector - action=writing_events_via_http_event_collector
2023-01-19 14:02:37.006 +0000 [QuartzScheduler_Worker-19] INFO c.s.d.s.dbinput.recordwriter.HttpEventCollector - action=writing_events_via_http_event_collector record_count=1000
2023-01-19 14:02:37.007 +0000 [QuartzScheduler_Worker-19] INFO org.apache.http.impl.execchain.RetryExec - I/O exception (java.net.SocketException) caught when processing request to {}->http://127.0.0.1:8088: Connection reset by peer (Write failed)
2023-01-19 14:02:37.007 +0000 [QuartzScheduler_Worker-19] INFO org.apache.http.impl.execchain.RetryExec - Retrying request to {}->http://127.0.0.1:8088
2023-01-19 14:02:37.007 +0000 [QuartzScheduler_Worker-19] INFO org.apache.http.impl.execchain.RetryExec - I/O exception (java.net.SocketException) caught when processing request to {}->http://127.0.0.1:8088: Connection reset by peer (Write failed)
2023-01-19 14:02:37.007 +0000 [QuartzScheduler_Worker-19] INFO org.apache.http.impl.execchain.RetryExec - Retrying request to {}->http://127.0.0.1:8088
2023-01-19 14:02:37.007 +0000 [QuartzScheduler_Worker-19] INFO org.apache.http.impl.execchain.RetryExec - I/O exception (java.net.SocketException) caught when processing request to {}->http://127.0.0.1:8088: Connection reset by peer (Write failed)
2023-01-19 14:02:37.007 +0000 [QuartzScheduler_Worker-19] INFO org.apache.http.impl.execchain.RetryExec - Retrying request to {}->http://127.0.0.1:8088
2023-01-19 14:02:37.008 +0000 [QuartzScheduler_Worker-19] ERROR c.s.d.s.task.listeners.RecordWriterMetricsListener - action=unable_to_write_batch
java.net.SocketException: Connection reset
at java.base/java.net.SocketInputStream.read(SocketInputStream.java:186)
at java.base/java.net.SocketInputStream.read(SocketInputStream.java:140)
at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:137)
at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:153)
at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:280)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:138)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:56)
at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:259)
at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:163)
at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:157)
at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125)
at com.codahale.metrics.httpclient.InstrumentedHttpRequestExecutor.execute(InstrumentedHttpRequestExecutor.java:46)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:272)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
at com.splunk.dbx.server.dbinput.recordwriter.HttpEventCollector.uploadEventBatch(HttpEventCollector.java:141)
at com.splunk.dbx.server.dbinput.recordwriter.HttpEventCollector.uploadEvents(HttpEventCollector.java:113)
at com.splunk.dbx.server.dbinput.recordwriter.HttpEventCollectorLoadBalancer.uploadEvents(HttpEventCollectorLoadBalancer.java:52)
at com.splunk.dbx.server.dbinput.recordwriter.HecEventWriter.writeRecords(HecEventWriter.java:36)
at org.easybatch.core.job.BatchJob.writeBatch(BatchJob.java:234)
at org.easybatch.core.job.BatchJob.call(BatchJob.java:102)
at org.easybatch.extensions.quartz.Job.execute(Job.java:59)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
2023-01-19 14:02:37.008 +0000 [QuartzScheduler_Worker-19] ERROR org.easybatch.core.job.BatchJob - Unable to write records
java.net.SocketException: Connection reset
at java.base/java.net.SocketInputStream.read(SocketInputStream.java:186)
at java.base/java.net.SocketInputStream.read(SocketInputStream.java:140)
at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:137)
at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:153)
at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:280)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:138)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:56)
at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:259)
at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:163)
at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:157)
at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125)
at com.codahale.metrics.httpclient.InstrumentedHttpRequestExecutor.execute(InstrumentedHttpRequestExecutor.java:46)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:272)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
at com.splunk.dbx.server.dbinput.recordwriter.HttpEventCollector.uploadEventBatch(HttpEventCollector.java:141)
at com.splunk.dbx.server.dbinput.recordwriter.HttpEventCollector.uploadEvents(HttpEventCollector.java:113)
at com.splunk.dbx.server.dbinput.recordwriter.HttpEventCollectorLoadBalancer.uploadEvents(HttpEventCollectorLoadBalancer.java:52)
at com.splunk.dbx.server.dbinput.recordwriter.HecEventWriter.writeRecords(HecEventWriter.java:36)
at org.easybatch.core.job.BatchJob.writeBatch(BatchJob.java:234)
at org.easybatch.core.job.BatchJob.call(BatchJob.java:102)
at org.easybatch.extensions.quartz.Job.execute(Job.java:59)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
2023-01-19 14:02:37.008 +0000 [QuartzScheduler_Worker-19] INFO org.easybatch.core.job.BatchJob - Job 'testing_1234' finished with status: FAILED
2023-01-19 14:02:37.008 +0000 [QuartzScheduler_Worker-19] DEBUG c.s.d.s.dbinput.recordreader.DbInputRecordReader - action=closing_db_reader task=testing_1234
2023-01-19 14:02:56.930 +0000 [dw-67 - PUT /api/inputs/testing_1234] INFO com.splunk.dbx.server.task.DefaultTaskService - action=removing_task_from_scheduler task=testing_1234 type=input
2023-01-19 14:02:56.931 +0000 [dw-67 - PUT /api/inputs/testing_1234] INFO org.easybatch.extensions.quartz.JobScheduler - Unscheduling job org.easybatch.core.job.BatchJob@279b98a9
2023-01-19 14:09:44.320 +0000 [Single-Thread-Executor-0] DEBUG com.splunk.dbx.connector.ConnectorFactory - action=clean_up_connection_pools current_connection_pools_size=1
2023-01-19 14:19:44.320 +0000 [Single-Thread-Executor-0] DEBUG com.splunk.dbx.connector.ConnectorFactory - action=clean_up_connection_pools current_connection_pools_size=1
2023-01-19 14:29:44.304 +0000 [Checkpoint-Cleaner-0] INFO c.s.d.s.m.CheckpointCleaner$CheckpointCleanerTask - action=start_checkpoint_cleaner_task
2023-01-19 14:29:44.305 +0000 [Checkpoint-Cleaner-0] INFO c.s.d.s.m.CheckpointCleaner$CheckpointCleanerTask - action=checkpoint_files_to_be_deleted []
2023-01-19 14:29:44.320 +0000 [Single-Thread-Executor-0] DEBUG com.splunk.dbx.connector.ConnectorFactory - action=clean_up_connection_pools current_connection_pools_size=1
2023-01-19 14:39:44.320 +0000 [Single-Thread-Executor-0] DEBUG com.splunk.dbx.connector.ConnectorFactory - action=clean_up_connection_pools current_connection_pools_size=1
2023-01-19 14:49:44.320 +0000 [Single-Thread-Executor-0] DEBUG com.splunk.dbx.connector.ConnectorFactory - action=clean_up_connection_pools current_connection_pools_size=1
2023-01-19 14:59:44.320 +0000 [Single-Thread-Executor-0] DEBUG com.splunk.dbx.connector.ConnectorFactory - action=clean_up_connection_pools current_connection_pools_size=1

Labels (1)
0 Karma

PaulPanther
Contributor

@sveerapureddy26 

1. Have you verified the connectivity between splunk and SQL server?

3. Have you verified user permissions?

2. Have you tried to write a single row into the database?

0 Karma

sveerapureddy26
Loves-to-Learn

Hi Paul, 

Thanks for your reply,  

1. Have you verified the connectivity between splunk and SQL server?

sveerapureddy26_0-1674218799130.png

I am able to read the data from database

sveerapureddy26_1-1674218872166.png

not able to write to index single data also

sveerapureddy26_2-1674218975978.png

3. Have you verified user permissions?

what permissions are your looking 

sveerapureddy26_3-1674219135898.png

 

sveerapureddy26_4-1674219182899.png

I have given above permissions

2. Have you tried to write a single row into the database?

I am not able to write single row please help me what I am missed

0 Karma

PaulPanther
Contributor

@sveerapureddy26 Okay, have you checked if the DB user, which is set up in DB Connect,  has the priviliges to write into the db table? I recommend to test it directly on the database just for verification that you have no permissions issue.

0 Karma

sveerapureddy26
Loves-to-Learn

Hi @PaulPanther , we are using below user

sveerapureddy26_0-1674220012430.png

He is having write access  from database side

sveerapureddy26_1-1674220229342.png

 

 

 

0 Karma

sveerapureddy26
Loves-to-Learn

Hi Paul, 

my issue is not resolved can you please help, is it possible to join 15 minutes call I will share my screen

 

Thank you so much in advance...

 

 

 

0 Karma

PaulPanther
Contributor

@sveerapureddy26 Sorry, I have no further idea how I can help you in that case.

0 Karma
Get Updates on the Splunk Community!

New Splunk Observability innovations: Deeper visibility and smarter alerting to ...

You asked, we delivered. Splunk Observability Cloud has several new innovations giving you deeper visibility ...

Synthetic Monitoring: Not your Grandma’s Polyester! Tech Talk: DevOps Edition

Register today and join TekStream on Tuesday, February 28 at 11am PT/2pm ET for a demonstration of Splunk ...

Instrumenting Java Websocket Messaging

Instrumenting Java Websocket MessagingThis article is a code-based discussion of passing OpenTelemetry trace ...