# Bulk insert from file, SSL record too big

**URL:** <https://discuss.elastic.co/t/bulk-insert-from-file-ssl-record-too-big/366839>\
**Category:** Elastic Search\
**Created:** [September 20, 2024, 2:18am UTC](https://discuss.elastic.co/t/bulk-insert-from-file-ssl-record-too-big/366839 "2024-09-20T02:18:55Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Terry\_Lowery](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/terry_lowery/32/137736_2.png) [@Terry\_Lowery](https://discuss.elastic.co/u/Terry_Lowery)\
**Post date:** [September 20, 2024, 2:18am UTC](https://discuss.elastic.co/t/bulk-insert-from-file-ssl-record-too-big/366839/1 "2024-09-20T02:18:55Z")

</div>

Hello all,  
I am trying to following along with an acloud.guru ES deep dive and there is a section that you bulk insert ndjson files.

I also tried the curl examples from [elasic.co](http://elasic.co)

I receive the follow from curl:

```curl

* About to connect() to localhost port 9200 (#0)
* Trying ::1...
* Connected to localhost (::1) port 9200 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* NSS error -12263 (SSL_ERROR_RX_RECORD_TOO_LONG)
* SSL received a record that exceeded the maximum permissible length.
* Closing connection 0
curl: (35) SSL received a record that exceeded the maximum permissible length.

```

I moved the heap to 4gb and ran it on a data only node to rule out any memory issues with the master node and still the same error.

Any suggestions? Is this a curl issue maybe?  
Thanks in advance for help

---

<div class="post-metadata">

**Author:** ![joemcelroy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joemcelroy/32/103757_2.png) [@joemcelroy](https://discuss.elastic.co/u/joemcelroy)\
**Post date:** [September 20, 2024, 7:17am UTC](https://discuss.elastic.co/t/bulk-insert-from-file-ssl-record-too-big/366839/2 "2024-09-20T07:17:09Z")

</div>

Hey,

Could you share how you're starting elasticsearch locally and your curl example please?

---

<div class="post-metadata">

**Author:** ![Terry\_Lowery](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/terry_lowery/32/137736_2.png) [@Terry\_Lowery](https://discuss.elastic.co/u/Terry_Lowery)\
**Post date:** [September 23, 2024, 3:34pm UTC](https://discuss.elastic.co/t/bulk-insert-from-file-ssl-record-too-big/366839/3 "2024-09-23T15:34:11Z")

</div>

In a 3 node cluster and running curl from the nodes to localhost. Here is the curl command:

`curl -u elastic --insecure -H 'Content-Type: application/x-ndjson' -X POST https://localhost:9200/bank/_bulk --data-binary @accounts.json -v`

---

<div class="post-metadata">

**Author:** ![joemcelroy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joemcelroy/32/103757_2.png) [@joemcelroy](https://discuss.elastic.co/u/joemcelroy)\
**Post date:** [September 24, 2024, 10:10am UTC](https://discuss.elastic.co/t/bulk-insert-from-file-ssl-record-too-big/366839/4 "2024-09-24T10:10:51Z")

</div>

Can you perform a normal curl request to elasticsearch? Just to double check its not to do with the SSL cert here.

---

<div class="post-metadata">

**Author:** ![Terry\_Lowery](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/terry_lowery/32/137736_2.png) [@Terry\_Lowery](https://discuss.elastic.co/u/Terry_Lowery)\
**Post date:** [September 24, 2024, 12:35pm UTC](https://discuss.elastic.co/t/bulk-insert-from-file-ssl-record-too-big/366839/5 "2024-09-24T12:35:49Z")

</div>

yes normal curls work including creating indicies so POST, PUT, and GET all working it is only when I try to do a bulk insert. I also tried to do a bullk with only a few records and I even shortened the records. I also tried the [elastic.co](http://elastic.co) example that was a small record and count of records.

---

<div class="post-metadata">

**Author:** ![joemcelroy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joemcelroy/32/103757_2.png) [@joemcelroy](https://discuss.elastic.co/u/joemcelroy)\
**Post date:** [September 27, 2024, 8:04am UTC](https://discuss.elastic.co/t/bulk-insert-from-file-ssl-record-too-big/366839/6 "2024-09-27T08:04:32Z")

</div>

could you try with a single node example and worth following our documentation to start this node. I get the feeling theres something up with the communication between the nodes as it propagates the change across nodes.

> **[Run Elasticsearch locally in Docker | Elasticsearch Guide \[8.15\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/run-elasticsearch-locally.html)**

---

<div class="post-metadata">

**Author:** ![apal](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@apal](https://discuss.elastic.co/u/apal)\
**Post date:** [October 8, 2024, 4:37pm UTC](https://discuss.elastic.co/t/bulk-insert-from-file-ssl-record-too-big/366839/7 "2024-10-08T16:37:10Z")

</div>

Any update on this @Terry_Lowery ?

---

<div class="post-metadata">

**Author:** ![Terry\_Lowery](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/terry_lowery/32/137736_2.png) [@Terry\_Lowery](https://discuss.elastic.co/u/Terry_Lowery)\
**Post date:** [October 8, 2024, 4:48pm UTC](https://discuss.elastic.co/t/bulk-insert-from-file-ssl-record-too-big/366839/8 "2024-10-08T16:48:34Z")

</div>

No update. I am manly focused on a cluster

---

<div class="post-metadata">

**Author:** ![apal](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@apal](https://discuss.elastic.co/u/apal)\
**Post date:** [October 8, 2024, 4:52pm UTC](https://discuss.elastic.co/t/bulk-insert-from-file-ssl-record-too-big/366839/9 "2024-10-08T16:52:29Z")

</div>

Are you still facing issues with SSL or is it something else?

---

<div class="post-metadata">

**Author:** ![Artem\_Shelkovnikov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/artem_shelkovnikov/32/134322_2.png) [@Artem\_Shelkovnikov](https://discuss.elastic.co/u/Artem_Shelkovnikov)\
**Post date:** [October 16, 2024, 3:20pm UTC](https://discuss.elastic.co/t/bulk-insert-from-file-ssl-record-too-big/366839/10 "2024-10-16T15:20:43Z")

</div>

Is your Elasticsearch running with SSL enabled?

What if you post to `http://` instead of `https://`?

---

<div class="post-metadata">

**Author:** ![Terry\_Lowery](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/terry_lowery/32/137736_2.png) [@Terry\_Lowery](https://discuss.elastic.co/u/Terry_Lowery)\
**Post date:** [October 16, 2024, 3:41pm UTC](https://discuss.elastic.co/t/bulk-insert-from-file-ssl-record-too-big/366839/11 "2024-10-16T15:41:16Z")

</div>

Only SSL is enabled http is not allowed. All calls and verbs work except for doing a bulk insert from file. I can preform any actions except this one.

---

<div class="post-metadata">

**Author:** ![Artem\_Shelkovnikov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/artem_shelkovnikov/32/134322_2.png) [@Artem\_Shelkovnikov](https://discuss.elastic.co/u/Artem_Shelkovnikov)\
**Post date:** [October 17, 2024, 8:08am UTC](https://discuss.elastic.co/t/bulk-insert-from-file-ssl-record-too-big/366839/12 "2024-10-17T08:08:33Z")

</div>

I see.

What is the size of the file?

Have you tried breaking the file into halves and try to ingest them separately?

The error is confusing to me - it does not feel directly related to Elasticsearch

---

<div class="post-metadata">

**Author:** ![Terry\_Lowery](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/terry_lowery/32/137736_2.png) [@Terry\_Lowery](https://discuss.elastic.co/u/Terry_Lowery)\
**Post date:** [October 17, 2024, 1:48pm UTC](https://discuss.elastic.co/t/bulk-insert-from-file-ssl-record-too-big/366839/13 "2024-10-17T13:48:41Z")

</div>

Yeah I even broke the record down to something smaller and removed a lot of the fields, I also tried using the ES examples on bulk and it didn't work. I was also leaning towards maybe it is a curl issue.

---

<div class="post-metadata">

**Author:** ![Artem\_Shelkovnikov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/artem_shelkovnikov/32/134322_2.png) [@Artem\_Shelkovnikov](https://discuss.elastic.co/u/Artem_Shelkovnikov)\
**Post date:** [October 18, 2024, 3:53pm UTC](https://discuss.elastic.co/t/bulk-insert-from-file-ssl-record-too-big/366839/14 "2024-10-18T15:53:09Z")

</div>

Interesting..

You can try debugging it by sending bulk requests from different clients: CURL, Postman, maybe a small python script.

When you send the payload, do you see anything interesting in Elasticsearch logs? You might need to enable debug logs for it.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 15, 2024, 3:53pm UTC](https://discuss.elastic.co/t/bulk-insert-from-file-ssl-record-too-big/366839/15 "2024-11-15T15:53:47Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
