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

Problems with basepath on 1.5.0.1 #3687

Closed
voiprodrigo opened this issue Jun 15, 2018 · 9 comments · Fixed by #3697
Closed

Problems with basepath on 1.5.0.1 #3687

voiprodrigo opened this issue Jun 15, 2018 · 9 comments · Fixed by #3697
Assignees
Milestone

Comments

@voiprodrigo
Copy link

Hello,

I'm having two problems with basepath after upgrading to 1.5.0.1. Previously I was using 1.4.4 without issue in this regard.

Problem 1: basepath "/whatever/chronograf-something" is considered invalid and service does not start.

Problem 2: basepath "/whatever/chronograf" service starts, but can't access it properly, just get "404 page not found".

I'm using CentOS 7 with systemd, basepath set via BASE_PATH in an EnvironmentFile.

Thanks

@russorat
Copy link
Contributor

@voiprodrigo thanks for the issue. Just to clarify, you've set your basepath to be BASE_PATH=/whatever/chronograf-something?

@voiprodrigo
Copy link
Author

To be exact: BASE_PATH="/whatever/chronograf-something"

@russorat
Copy link
Contributor

russorat commented Jun 15, 2018

hyphens are not allowed in basepaths. When i try to set that, i get:

ERRO[0000] Invalid basepath, must follow format "/mybasepath"  basepath=invalid component=server
2018/06/15 09:23:50 Invalid basepath, must follow format "/mybasepath"
make: *** [run-dev] Error 1

but setting to BASE_PATH="/whatever/chronografsomething" works fine.

image

@voiprodrigo
Copy link
Author

I reverted to 1.4.4 and both cases work fine again.

Please also see comments in 2ce7d8e#diff-91bbeda7eb98a7adc57b9e47e2cf5c2b

@russorat
Copy link
Contributor

thanks for the link. I connected this issue and your comment so we can review.

@jaredscheib
Copy link
Contributor

jaredscheib commented Jun 15, 2018

This was changed in 1.5.0, but we can revert that aspect to make it so that hyphens or any valid URL path will work.

@voiprodrigo
Copy link
Author

voiprodrigo commented Jun 21, 2018

(Sorry to comment on closed issue)

Thanks for addressing the hyphen situation, but regarding this:

Problem 2: basepath "/whatever/chronograf" service starts, but can't access it properly, just get "404 page not found".

Any hints? I assume it's a different root-cause, as the behaviour is different.

Thanks.

@jaredscheib @russorat

@voiprodrigo
Copy link
Author

voiprodrigo commented Jun 21, 2018

I managed to get it working again. But this seems to be an unexpected change in basepath handling.
I have an Apache in front of chronograf. If the ProxyPass is set to http://localhost:8888, it fails with 404 (it worked before). I changed the ProxyPass to forward to http://localhost:8888/basepath, and now it's ok.

@russorat russorat reopened this Jun 21, 2018
@russorat
Copy link
Contributor

@voiprodrigo i'm not sure i understand completely.

The expected behavior is that when basepath is enabled, accessing just the standard localhost:8888 should return a 404. accessing localhost:888/basepath should work. I'm not familair with ProxyPass specificially, but if forwarding to just localhost:8888 was working before, it was unintentional and incorrect. Forwarding to /basepath is the correct solution.

@russorat russorat added this to the 1.6.0 milestone Jun 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants