# Discover: Bad Gateway issue in kibana

**URL:** <https://discuss.elastic.co/t/discover-bad-gateway-issue-in-kibana/174458>\
**Category:** Kibana\
**Created:** [March 29, 2019, 3:51am UTC](https://discuss.elastic.co/t/discover-bad-gateway-issue-in-kibana/174458 "2019-03-29T03:51:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sukku77](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sukku77/32/52068_2.png) [@sukku77](https://discuss.elastic.co/u/sukku77)\
**Post date:** [March 29, 2019, 3:51am UTC](https://discuss.elastic.co/t/discover-bad-gateway-issue-in-kibana/174458/1 "2019-03-29T03:51:52Z")

</div>

Hi All,  
I am facing "Discover Bad Gateway" issue while searching in Kibana UI for the field "message" and string contains the value something like below

```
  message: "7d5c65e2-e954-4de6-ae4f-f78s88c0dc4c"

```

But there is a record exists/indexed in elastic search with the above value.  
But I am able to search for other values seamlessly except the above search value. I am guessing that it is related to elastic search cache issue. Please advice on this issue.

Settings / Configurations in my system:

1. We are not using any proxy servers to process kibana to elastic searches or requests. There is no firewall issue here
2. Version of ELK stack using is 6.5.4

Kibana UI ERROR:  
**SearchError: Bad Gateway**  
at

```
 http://host1.corp.xxx.com:5661/bundles/commons.bundle.js:3:2531484
at processQueue (http://host1.corp.xxx.com:5661/bundles/vendors.bundle.js:257:199684)
at http://host1.corp.xxx.com:5661/bundles/vendors.bundle.js:257:200647
at Scope.$digest (http://host1.corp.xxx.com:5661/bundles/vendors.bundle.js:257:210409)
at Scope.$apply (http://host1.corp.xxx.com:5661/bundles/vendors.bundle.js:257:213216)
at done (http://host1.corp.xxx.com:5661/bundles/vendors.bundle.js:257:132715)
at completeRequest (http://host1.corp.xxx.com:5661/bundles/vendors.bundle.js:257:136327)
at XMLHttpRequest.requestLoaded (http://host1.corp.xxx.com:5661/bundles/vendors.bundle.js:257:135223)

```

Thanks  
Sukumar

---

<div class="post-metadata">

**Author:** ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)\
**Post date:** [March 29, 2019, 4:47pm UTC](https://discuss.elastic.co/t/discover-bad-gateway-issue-in-kibana/174458/2 "2019-03-29T16:47:03Z")

</div>

Bad Gateway means a proxy was not able to pass a request to server, successfully. It looks like in this case server that wasn't handling the request was the Elasticsearch server, so you'll want to check the logs on the proxy in front of Elasticsearch.

AFAIK, many things can cause a bad gateway:

- the upstream server was an unknown host
- the upstream server couldn't be connected
- a request to the upstream server timed out
- the upstream server wants to send a response that the proxy doesn't understand

I'm thinking that in this case, the problem is one of the last 2, since it only happens for that one search case.

Getting to the bottom of it will probably require looking at the Elasticsearch proxy logs. I would also try sending the same request to Elasticsearch directly by doing curl to localhost from the Elasticsearch server.

> [@sukku77](#):
>
> message: "7d5c65e2-e954-4de6-ae4f-f78s88c0dc4c"

Just to double-check, the `message` field is mapped as keyword type, correct? If it is an analyzed string, this query could cause problems. More info could be in the Elasticsearch logs.

---

<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:** [April 26, 2019, 4:47pm UTC](https://discuss.elastic.co/t/discover-bad-gateway-issue-in-kibana/174458/3 "2019-04-26T16:47:05Z")

</div>

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