Druid Coordinator and Overlord consoles cannot be reverse proxied
I'm attempting to setup a reverse proxy for serving the Druid Coordinator and Druid Overlord consoles.
Say I have a host druid-coordinator and druid-overlord, using nginx as a reverse proxy, with the following nginx configuration:
location /reverse-proxy/druid-coordinator/ {
proxy_pass http://druid-coordinator:8081/;
}
location /reverse-proxy/druid-overlord/ {
proxy_pass http://druid-overlord:8090/;
}
When attempting to access the druid-coordinator through the reverse proxy, a blank page loads, and the following shows up in the web error console:
GET https://nginx-server/druid.js 404 (Not Found)
GET https://nginx-server/css/bootstrap.css 404 (Not Found)
GET https://nginx-server/css/bootstrap-theme.css 404 (Not Found)
GET https://nginx-server/css/font-awesome.css 404 (Not Found)
GET https://nginx-server/druid.css 404 (Not Found)
So clearly here, even though the page is being access at /reverse-proxy/druid-coordinator/, the actual web application is thinking that / is the immediate parent it should be calling back to.
For the Overlord console, the situation is similar, but at the very least console.html loads, however all the API calls it sends out 404:
GET https://hodr/druid/indexer/v1/runningTasks 404 (Not Found)
GET https://hodr/druid/indexer/v1/pendingTasks 404 (Not Found)
GET https://hodr/druid/indexer/v1/waitingTasks 404 (Not Found)
GET https://hodr/druid/indexer/v1/workers 404 (Not Found)
GET https://hodr/druid/indexer/v1/completeTasks 404 (Not Found)
GET https://hodr/druid/indexer/v1/scaling 404 (Not Found)
Is there some way we could specify in the Druid configuration, what the base of the application should be when serving in order to satisfy a reverse proxy?
+1
@scot0357, right now the base URL is not configurable. A PR to make it configurable would be great.
Another way to resolve above issue would be to perform rewriting of the URLs in the proxy engine. We did similar rewriting when working on proxying druid UIs via Apache KNOX - https://issues.apache.org/jira/browse/KNOX-758
+1
This issue has been marked as stale due to 280 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the [email protected] list. Thank you for your contributions.
This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.
+1
With the druid router this seems nearly possible. Entry.ts seems to have a baseURL property which is loaded from window.consoleConfig. Everything works when I set that property in my browser before entry.ts runs, we just need some way to set it.
how can this be configured? https://github.com/apache/druid/blob/62ddeaf16f07e51d4bd35b3eaaaaab6f70f6fd71/web-console/console-config.js#L19
This seems to be a major issue for us
The idea is that you have your reverse proxy serve its own version of console-config.js that way someone accessing Druid via the reverse proxy and directly will be able to load the console correctly