# Could not index event to Elasticsearch due to opType: \[-1\]

**URL:** <https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-due-to-optype-1/311010>\
**Category:** Elasticsearch\
**Created:** [July 29, 2022, 5:41pm UTC](https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-due-to-optype-1/311010 "2022-07-29T17:41:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![co88liwan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/co88liwan/32/100345_2.png) [@co88liwan](https://discuss.elastic.co/u/co88liwan)\
**Post date:** [July 29, 2022, 5:41pm UTC](https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-due-to-optype-1/311010/1 "2022-07-29T17:41:48Z")

</div>

Hi all,

We encountered a transient issue with the [WARN] said:

```bash
Could not index event to Elasticsearch

```

From the log, the response is like

```bash
:response => {"create"=>{"_index"=>"zzzzzzzzzz"},
"_type"=>"_doc",
"_id"=>"xxxxxxxxx",
"status"=>"400",
"error"=>{"type"=>"illegal_argument_exception",
                  "reason"=>"Unknown opType: [-1]"}

```

This issue lasted 10+ seconds with 1000+ hits and disappeared by itself without any intervention.

I wonder what could be the possible cause? Another weird thing is I did not see any exception `IllegalArgumentException` from master node log.

Also, checked the index `zzzzzzzzzz` \_stats, the failed index number is 0, but I think it should not.

Thanks!

---

<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:** [August 26, 2022, 5:42pm UTC](https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-due-to-optype-1/311010/2 "2022-08-26T17:42:48Z")

</div>

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