# Elasticsearch: Duplicate Documents

**URL:** <https://discuss.elastic.co/t/elasticsearch-duplicate-documents/286478>\
**Category:** Elasticsearch\
**Created:** [October 12, 2021, 10:51am UTC](https://discuss.elastic.co/t/elasticsearch-duplicate-documents/286478 "2021-10-12T10:51:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Isekai](https://avatars.discourse-cdn.com/v4/letter/i/eb9ed0/32.png) [@Isekai](https://discuss.elastic.co/u/Isekai)\
**Post date:** [October 12, 2021, 10:51am UTC](https://discuss.elastic.co/t/elasticsearch-duplicate-documents/286478/1 "2021-10-12T10:51:40Z")

</div>

Hi everyone,

I have an occasional problem that sometimes there are several duplicate documents generated.

This is part of our CI and it should upload data to elastic with details about our build failure.

After analysis, i found out it's done in a bash script invoked by ansible and that this curl command is responsible for the upload of Elasticsearch data:

```auto
http_result=$(curl --netrc \
              --retry 3 \
              --max-time 60 \
              --speed-time 10 --speed-limit 50 \
              --connect-timeout 5 \
              --write-out "%{response_code}" \
              --output "/dev/null" \
              --silent \
              --show-error \
              --request POST \
              -H "Content-Type: application/json; charset=utf-8" \
              --data-binary @"${file_path}" \
              "{{ mon_url }}${index}/${path}")

```

However after debugging the bash script i couldn't find multiple uploads attempts.  
Is there anything wrong with this curl command?  
Is there anyway i can debug this in elastic?

I'm currently using Elasticsearch 7.10.1

Thanks

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 13, 2021, 1:10am UTC](https://discuss.elastic.co/t/elasticsearch-duplicate-documents/286478/2 "2021-10-13T01:10:38Z")

</div>

Are you storing the results of the request being made?

---

<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 10, 2021, 1:11am UTC](https://discuss.elastic.co/t/elasticsearch-duplicate-documents/286478/3 "2021-11-10T01:11:07Z")

</div>

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