Hi,
I am embedding kibana inside my application which has other features also.I use reverse proxy to do this mapping.
So,whenever I hit this URL /analytics/* all calls are redirected to kibana server.
Now with the new upgrade all my reverse proxy code is broken. It seems that the URL's returned are not relative anymore.Earlier i used to get subsequent URL's like http://host/analytics/bundles/commons.style.css?v=9689 but now the relative URL is gone and I am getting
only http://host/bundles/commons.style.css?v=9689.
This is my nginx config on kibana machine link. Please let me know if there is any work around for me.I tried URL.basepath property but I am not sure why I am not able to make that work.
Have you added /analytics to the basePath in your kibana.yml file.
If so, it sounds like this happened when upgrading Kibana versions. What version where you running before when it worked, and what version are you trying to run now?
Yes I have added this in the Kibana.yml file. Yes, this happened because of the upgrade.I was on Kibana 4.1 and now upgraded to Kibana 4.4 .I can see this issue here and here but these are already closed. But i can still reproduce them at my end.How do I proceed?
Both of those issues target older versions of Kibana, and the fixes are definitely in 4.4.x. Part of our development process includes running Kibana behind a reverse proxy, which we do explicitly to make sure we don't break the basePath stuff again (we also use SSL for the same reason).
One cause I can think of is that either the setting in the yml is somehow wrong (misspelled or something perhaps), but this should cause Kibana to fatal on startup. The other thing that comes to mind is maybe the file isn't being used (perhaps it's in the wrong path or has the wrong permissions or something?).
Can you try changing another setting to ensure that it's being used? A good candidate would be to change the elasticsearch.url setting to something invalid, like using the wrong hostname and/or port. Then, restart Kibana and ensure that it fails to connect to your ES instance. Let me know if you can do that, and how it goes.
Ok this is what I did.
1.Downloaded and started ES2.2.0
2.Indexed a document
3. Downloaded the latest Kibana4.4.1 zip via the downloads page.
4.Extracted and started Kibana.
6.Go to http://localhost:5601 I can see the indexed doc in the discover tab after I configure the index.
All working fine for me till now.Now the next steps
6. Un-commented the entry and added
server.basepath:"analytics"
server.basepath should be set to /analytics, note the slash that's included. Your nginx config then needs to listen for requests to localhost/analytics and pass them to kibana without the /analytics
Thanks @Bargs . If it's not too much trouble for you can you please share your config file. A sample should help me.
I was trying to find an example but couldn't find one.
@Bargs I tried what you mentioned here. So, redirecting from /ananlytics to localhot:5601 is working fine for me.
The issue is with Kibana. As I mentioned localhost:5601 redirects me to localhost:5601/analytics/app/kibana and it's throwing 404 error.
Or are you saying that nginx is proxying from localhost:80/analytics to localhost:5601, and kibana is returning a redirect to nginx for localhost:5601/analytics/app/kibana?
That's normal - when you set the basePath, Kibana will 301 all requests and re-write all asset URL paths to include your basePath prefix. You can no longer just hit localhost:5601, because Kibana doesn't actually this is expected. Once you specify a basePath, you need to actually observe that path, via your reverse proxy.
I did just set this up, and one catch here is that you won't be auto-redirected to /app/kibana from the proxy path (which seems like a bug, honestly). But, according to the nginx config you posted earlier, the following url should work, assuming you have running on the machine and running without ssl on port 5601: https://10.6.204.104/kibana4/app/kibana
@Bargs Sorry if I am not clear to you. I am trying to hit the URL from all sort of combinations. I think posting my configurations will make this more clear.
Here is my kibana.yml file configuration for base path
A single note on the above snippet, proxy_pass passes the entire path with the request, and we dont want to pass along the "/kibana" so we need to remove it with a rewrite! and that what is causing the 404.
I also had to set my basepath in kibana to "/kibana".
Thanks Guys. I was able to solve it long back. The key was to consume the server.basepath url on your request.It should be documented somewhere properly.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.