Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermittent 406 with short URLs #10456

Closed
ceeeekay opened this issue Feb 19, 2017 · 5 comments
Closed

Intermittent 406 with short URLs #10456

ceeeekay opened this issue Feb 19, 2017 · 5 comments
Labels
bug Fixes for quality problems that affect the customer experience

Comments

@ceeeekay
Copy link

ceeeekay commented Feb 19, 2017

Kibana version: 5.2.0
Elasticsearch version: 5.2.0
Server OS version: Ubuntu 16.04.2
Browser version: Firefox 50.1.0
Browser OS version: Ubuntu 14.04.5
Original install method (e.g. download page, yum, from source, etc.): Apt
Description of the problem including expected versus actual behavior: Visiting a short URL sometimes produces a 406 error, rather than the expected dashboard.

Steps to reproduce:

  1. Share and create shortened URL for Kibana dashboard
  2. Visit shortened URL
  3. Occasionally a shortened URL is created which produces this error:
    {"statusCode":406,"error":"Not Acceptable","message":"Short url target path must be in the format \"/app/{{appId}}\", found \"/\""}

I have only seen this error twice and am unable to reproduce it for this issue. However I did notice that although the error persists over time (days), as soon as a second short URL is created for the same dashboard, the error no longer occurs.

First occurred immediately after upgrading from 5.1.0 to 5.2.0 .

@tbragin tbragin added :Sharing bug Fixes for quality problems that affect the customer experience labels Feb 20, 2017
@kobelb kobelb self-assigned this Feb 21, 2017
@macro
Copy link

macro commented Mar 22, 2017

I'm seeing this as well after upgrading from 4.4.2 to 4.6.4.

It seems target URL validation landed in the following commit:
bc118d9

However, this breaks older existing short URLs which seemed to have absolute URLs in the target URL.

This can be seen when looking at _type:url objects in the .kibana index.

@spalger
Copy link
Contributor

spalger commented Apr 7, 2017

This is also the error returned when a short url is not found, instead of a 404.

@ceeeekay
Copy link
Author

Is there any update on this? Currently running 5.3.0 and it's become impossible to share links with people.

@kobelb kobelb removed their assignment Apr 10, 2017
@stacey-gammon
Copy link
Contributor

@ceeeekay Sounds like you are running into this issue: #10951. There was an issue in 5.3.0 which broke the share urls, it will be fixed in 5.3.1.

@reembs
Copy link

reembs commented Apr 19, 2017

This error occurs when Kibana gets an error while querying it's ES index for the short-url document. The true error is swallowed and a default value of "/" is returned when trying to get the target path for the short URL. In our case this was due to our ES using authentication which the server-side code failed to supply.

The problem is that short_url_lookup.js->getUrlDoc uses callWithRequest to access ES. callWithRequest tries to use the credentials passed to the request kibana got, but requests to /goto/{id} path do not require auth, and hence will be missing it in some cases.

Hacky workaround: I just changed getUrlDoc code to use callWithInternalUser instead. This bypasses the need for authentication. Works perfectly for us. Not sure, but maybe forcing auth on the goto path might be a more reasonable approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience
Projects
None yet
Development

No branches or pull requests

7 participants