Skip to content

Missing HTTP status codes for cancelled search requests #73849

Closed
@jporter-dev

Description

@jporter-dev

Kibana version: 7.8.1

Elasticsearch version: 7.8.1

Server OS version: Ubuntu 16.04.6 LTS

Browser version: Firefox 79.0b9

Browser OS version: macOS Catalina 10.15.6

Original install method (e.g. download page, yum, from source, etc.): apt

Describe the bug: Some responses from /internal/search/es respond with empty status code, header, and body. Presumably from cancelled queries.

Steps to reproduce:

  1. Load up a dashboard and query/filter
  2. Remove filters
  3. Re-add filters
  4. Observe network tab with blank status codes, zero headers, and no response body.

Expected behavior:
Network log should contain proper queries to the ES API with corresponding responses. Cancelled queries should respond with a proper HTTP status code (204 seems appropriate).

Screenshots (if relevant):
kibana-statuscode-issue

Errors in browser console (if relevant):
Failed to load resource: the server responded with a status of 502 (Proxy Error) - this only occurs when Kibana is reverse proxied.

Any additional context:
This is primarily an issue when reverse proxying Kibana. Apache fusses when it receives an upstream response that doesn't have a valid header or is missing the response code.

A temporary remediation for this with Apache is setting ProxyBadHeader Ignore in the server config. Obviously this is not the ideal solution, since the cancelled inflight requests should return a valid HTTP status code despite responding with no content.

Edit: The ProxyBadHeader fix doesn't fully resolve the problem. Not 100% why but I speculate that the upstream server is both sending empty responses and terminating requests early.

Metadata

Metadata

Assignees

Labels

Feature:SearchQuerying infrastructure in KibanabugFixes for quality problems that affect the customer experienceregression

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions