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

Double redirect to /route-prefix/route-prefix/ #3082

Closed
candlerb opened this Issue Aug 16, 2017 · 4 comments

Comments

Projects
None yet
4 participants
@candlerb
Copy link

candlerb commented Aug 16, 2017

What did you do?

Run prometheus with flags:

--web.external-url=https://example.com/prometheus
--web.route-prefix=/prometheus

(intended for use with a reverse proxy). Then accessed it at /prometheus or /prometheus/

What did you expect to see?

Redirect to /prometheus/graph

What did you see instead? Under which circumstances?

Redirect to /prometheus/prometheus/graph, which gives a 404

# curl -Lv http://10.85.179.50:9090/prometheus
*   Trying 10.85.179.50...
* Connected to 10.85.179.50 (10.85.179.50) port 9090 (#0)
> GET /prometheus HTTP/1.1
> Host: 10.85.179.50:9090
> User-Agent: curl/7.47.0
> Accept: */*
>
< HTTP/1.1 301 Moved Permanently
< Location: /prometheus/
< Date: Wed, 16 Aug 2017 14:45:35 GMT
< Content-Length: 47
< Content-Type: text/html; charset=utf-8
<
* Ignoring the response-body
* Connection #0 to host 10.85.179.50 left intact
* Issue another request to this URL: 'http://10.85.179.50:9090/prometheus/'
* Found bundle for host 10.85.179.50: 0x557ddf43ff20 [can pipeline]
* Re-using existing connection! (#0) with host 10.85.179.50
* Connected to 10.85.179.50 (10.85.179.50) port 9090 (#0)
> GET /prometheus/ HTTP/1.1
> Host: 10.85.179.50:9090
> User-Agent: curl/7.47.0
> Accept: */*
>
< HTTP/1.1 302 Found
< Location: /prometheus/prometheus/graph
< Date: Wed, 16 Aug 2017 14:45:35 GMT
< Content-Length: 51
< Content-Type: text/html; charset=utf-8
<
* Ignoring the response-body
* Connection #0 to host 10.85.179.50 left intact
* Issue another request to this URL: 'http://10.85.179.50:9090/prometheus/prometheus/graph'
* Found bundle for host 10.85.179.50: 0x557ddf43ff20 [can pipeline]
* Re-using existing connection! (#0) with host 10.85.179.50
* Connected to 10.85.179.50 (10.85.179.50) port 9090 (#0)
> GET /prometheus/prometheus/graph HTTP/1.1
> Host: 10.85.179.50:9090
> User-Agent: curl/7.47.0
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Content-Type: text/plain; charset=utf-8
< X-Content-Type-Options: nosniff
< Date: Wed, 16 Aug 2017 14:45:35 GMT
< Content-Length: 19
<
404 page not found
* Connection #0 to host 10.85.179.50 left intact

Note: if the user goes directly to the path /prometheus/graph then they see the front page as expected.

Environment

  • System information:

    Linux 4.4.0-87-generic x86_64

  • Prometheus version:

    prometheus, version 2.0.0-beta.1 (branch: HEAD, revision: 4dcb465029f39a2a3030333a81753f8a40ec90ce)
      build user:       root@d3f9974fac5a
      build date:       20170811-12:12:36
      go version:       go1.8.3
    
  • Alertmanager version:

    n/a

  • Prometheus configuration file:

    default

  • Alertmanager configuration file:

    n/a

  • Logs:

    n/a

@candlerb

This comment has been minimized.

Copy link
Author

candlerb commented Aug 16, 2017

Note: this seems to be the same problem that #2832 was supposed to fix, which was merged on Jun 12.

However v2.0.0-beta.1 was cut on Aug 11.

@maximecharron

This comment has been minimized.

Copy link
Contributor

maximecharron commented Aug 29, 2017

@brian-brazil a #3091 has been to fix this issue. It can be closed :)

@brancz

This comment has been minimized.

Copy link
Member

brancz commented Aug 29, 2017

Thanks!

@brancz brancz closed this Aug 29, 2017

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 23, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 23, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.