Kibana error "Client request error: Parse Error",

Hi All,

I have installed es and Kibana on ec2 cluster. everything works fine including search. I have strange issue where I have one query runs in ES but if I run same query in Kibana I get following error. I looked to Kibana and es logs but doesn't get any error info there. Do you know what could be the issue and where to look?

{
"message": "Client request error: Parse Error",
"statusCode": 502,
"error": "Bad Gateway"
}

It looks like that could be some setting preventing Kibana from correctly talk with Elasticsearch.
Is everything else works on Kibana?
Are you running that query from the Kibana dev tools?
What is the query actually?

Everything else works fine with kibana. Following is the query

search_object={'query': {'function_score': {'boost_mode': 'replace', 'query': {'bool': {'must': [{'match': {'enrichments.inspector.decision': 'green'}}, {'exists': {'field': 'enrichments.word2vec.embedded_vector'}}, {'exists': {'field': 'enrichments.outlet_matcher.matched_do_id'}}, {'match': {'address_countryCode': 'NL'}}, {'terms': {'enrichments.business_type.label': ['restaurant', 'discotheek', 'café']}}], 'must_not': [{'match': {'enrichments.existence.decision': 'red'}}]}}, 'functions': [{'script_score': {'script': {'source': 'staysense', 'lang': 'fast_cosine', 'params': {'field': 'enrichments.word2vec.embedded_vector', 'cosine': True, 'encoded_vector': 'P9wwnWAAAAA/4OfW4AAAAL/hwESgAAAAP+kmNkAAAAA/voykAAAAAD/wdbugAAAAP+pMmWAAAAA/1w2YQAAAAL/T8CLgAAAAv7RI50AAAAA/lh8koAAAAL/zr3pgAAAAv9zOxsAAAAA/ufWC4AAAAL+8lkJgAAAAv8doW0AAAAA/4JWy4AAAAD/zTSfgAAAAP+NPPGAAAAA/rnMvQAAAAD/kYRegAAAAP7N4mKAAAAC/5iNMAAAAAD/PtPAAAAAAv+wvFuAAAAC/6OhTQAAAAL/n1XOAAAAAP+yQdsAAAAC/tB+mIAAAAL/0nF4gAAAAP+15g+AAAAC/xOLZwAAAAMACFiIAAAAAv+0RpAAAAAA/4TbOwAAAAL/dDzKgAAAAv/OOdOAAAAC/y2xk4AAAAL/0Cz8AAAAAP/DEi6AAAAA/8PmYgAAAAL/21mlgAAAAP+Cmf6AAAAA/5CEy4AAA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/ZiSngAAAAv/IgRaAAAAC/z824AAAAAD/uwN/gAAAAv+KFD0AAAAC/wTA3QAAAAD/ZjKmAAAAAv+dqi+AAAAC/9FUjYAAAAD/f2j8AAAAAP/FhwyAAAAA/yuj1wAAAAD/8xCLAAAAAP8KvpEAAAAC//WASwAAAAD/RIEVgAAAAv/NKPmAAAAC/8o4Q4AAAAD/J40sAAAAAP+/oFuAAAAA/zTELwAAAAD/d3n+gAAAAP+sqOEAAAABAAqJn4AAAAD/5uOpgAAAAP/lUGMAAAAA/zi7UgAAAAL/UNgFgAAAAv/C5f4AAAAC/vj1E4AAAAL/aaq7gAAAAv8IgMqAAAAA/87/44AAAAL/RJdSgAAAAv/Uc2KAAAAC/+pqGQAAAAL/brobAAAAAv/py9EAAAAA/x9DlwAAAAD+3iN6gAAAAv8KdnaAAAAA/8YkGoAAAAL/WW+lAAAAAP9C1p4AAAAA/wkb2wAAAAD/KaN4gAAAAv+QfiwAAAAC/7jWvIAAAAD+Fk5mgAAAAP8EAFGAAAAA/9YkSoAAAAL+0QfQAAAAAv9ErDgAAAAC/4woGoAAAAL/UcuFAAAAAP66BwcAAAAC/36XSwAAAAL/7DlcAAAAAv+dDDkAAAAA/8LV6QAAAAD/qk8zgAAAA'}}}}]}}}

if i remove one character from embedded_vector. it doenst give that error

when i run same from the notebook i get ProtocolError: ('Connection aborted.', HTTPException('got more than 100 headers'))

when i run using CURL in ES server directly it doenst give error

@Ramu_Kamath could we try to increase server.maxPayloadBytes: in the kibana.yml config file?

tried and it didnt work. still the same error. in notebook i solved it by following. in our old environment(google) we dont have any special configuration

import http
http.client._MAXHEADERS = 10000

@tiagocosta any feedback?

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