# 502 bad gateway read ECONNRESET issue with custom plugin

**URL:** <https://discuss.elastic.co/t/502-bad-gateway-read-econnreset-issue-with-custom-plugin/237769>\
**Category:** Elasticsearch\
**Created:** [June 19, 2020, 9:15am UTC](https://discuss.elastic.co/t/502-bad-gateway-read-econnreset-issue-with-custom-plugin/237769 "2020-06-19T09:15:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dahea\_Moon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dahea_moon/32/50610_2.png) [@Dahea\_Moon](https://discuss.elastic.co/u/Dahea_Moon)\
**Post date:** [June 19, 2020, 9:15am UTC](https://discuss.elastic.co/t/502-bad-gateway-read-econnreset-issue-with-custom-plugin/237769/1 "2020-06-19T09:15:42Z")

</div>

hi, I have issues with my custom search plugin.

I have made search plugin to change scoring. It was okay till I have installed my plugin and start ES.  
But when I searched query, ES just shut down without any returning exceptions.  
In Kibana, it said {"statusCode":502,"error":"Bad Gateway","message":"read ECONNRESET"}.

I'm using 7.7 version and OS is window 10.

My plugin is based on Search plugin.

```
public class PayloadSimilarityPlugin extends Plugin implements SearchPlugin {
@Override
public List<QuerySpec<?>> getQueries() {
    return Collections.singletonList(new QuerySpec<>(PayloadQuery.NAME, PayloadQueryBuilder::new, PayloadQueryBuilder::fromXcontent));
}

```

}

I have sent a query like this. (PayloadQuery.NAME == payload\_score)

```
body = {
    "query": {
        "payload_score": {
            "query": {
                "match": {
                    "contents": "white"
                }
            }
        }
    }
}

```

How can I apply my plugin properly?  
If search plugin is not supported anymore, is there anyway to make Payload Scoring based on payload delimiter filter?

---

<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:** [July 17, 2020, 9:15am UTC](https://discuss.elastic.co/t/502-bad-gateway-read-econnreset-issue-with-custom-plugin/237769/2 "2020-07-17T09:15:53Z")

</div>

Closed on July 17, 2020, 9:15am UTC

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