ERROR Failed to send bulk request from batch 142 of 1 records (io.aiven.kafka.connect.opensearch.BulkProcessor)

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
version is 1.2.3 opensearch

Describe the issue:

while sending data from python to opensearch we are getting below errors
[2023-01-04 11:00:28,844] WARN request [POST https://datastream-search-opensearch.sero.wh.rnd.internal.ericsson.com/_bulk?timeout=1m] returned 1 warnings: [299 OpenSearch-1.2.3-8a529d77c7432bc45b005ac1c4ba3b2741b57d4a “this request accesses system indices: [.opensearch_dashboards_1], but in a future major version, direct access to system indices will be prevented by default”] (org.opensearch.client.RestClient)
[2023-01-04 11:00:28,863] WARN request [POST https://datastream-search-opensearch.sero.wh.rnd.internal.ericsson.com/_bulk?timeout=1m] returned 1 warnings: [299 OpenSearch-1.2.3-8a529d77c7432bc45b005ac1c4ba3b2741b57d4a “this request accesses system indices: [.opensearch_dashboards_1], but in a future major version, direct access to system indices will be prevented by default”] (org.opensearch.client.RestClient)
[2023-01-04 11:00:28,890] WARN request [POST https://datastream-search-opensearch.sero.wh.rnd.internal.ericsson.com/_bulk?timeout=1m] returned 1 warnings: [299 OpenSearch-1.2.3-8a529d77c7432bc45b005ac1c4ba3b2741b57d4a “this request accesses system indices: [.opensearch_dashboards_1], but in a future major version, direct access to system indices will be prevented by default”] (org.opensearch.client.RestClient)
[2023-01-04 11:00:28,900] ERROR Failed to send bulk request from batch 142 of 1 records (io.aiven.kafka.connect.opensearch.BulkProcessor)
org.apache.http.ConnectionClosedException: Connection is closed
at org.opensearch.client.RestClient.extractAndWrapCause(RestClient.java:897)
at org.opensearch.client.RestClient.performRequest(RestClient.java:301)
at org.opensearch.client.RestClient.performRequest(RestClient.java:289)
at org.opensearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1762)
at org.opensearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1728)
at org.opensearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1696)
at org.opensearch.client.RestHighLevelClient.bulk(RestHighLevelClient.java:363)
at io.aiven.kafka.connect.opensearch.BulkProcessor$BulkTask.lambda$execute$0(BulkProcessor.java:356)
at io.aiven.kafka.connect.opensearch.RetryUtil.callWithRetry(RetryUtil.java:119)
at io.aiven.kafka.connect.opensearch.BulkProcessor$BulkTask.execute(BulkProcessor.java:353)
at io.aiven.kafka.connect.opensearch.BulkProcessor$BulkTask.call(BulkProcessor.java:342)
at io.aiven.kafka.connect.opensearch.BulkProcessor$BulkTask.call(BulkProcessor.java:323)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: org.apache.http.ConnectionClosedException: Connection is closed

Configuration:

Relevant Logs or Screenshots:

Hi @bhanuji ,

It seems like you are using [1] and not OpenSearch Python client [2], right? Could you please share the error log (if any) from the OpenSearch side when org.apache.http.ConnectionClosedException is raised by the BulkProcessor? Thank you.

[1] GitHub - aiven/opensearch-connector-for-apache-kafka: Aiven's OpenSearch® Connector for Apache Kafka®
[2] Python client - OpenSearch documentation