Hello, I have an issue in connecting Kibana (7.8.0 OSS) running on my local machine to our Elasticsearch (7.8.0) instance on our Kubernates cluster.
The initial connection works and Kibana creates the index .kibana_1 on Elasticsearch. However, when I try to run a search, it fails with a 500 error with following message:
log [13:52:56.588] [error][http] Error: expected 'location' header to be set
at HapiResponseAdapter.toRedirect (/Users/ttakamiy@us.ibm.com/kibana/kibana-7.8.0-darwin-x86_64/src/core/server/http/router/response_adapter.js:112:13)
at HapiResponseAdapter.toHapiResponse (/Users/ttakamiy@us.ibm.com/kibana/kibana-7.8.0-darwin-x86_64/src/core/server/http/router/response_adapter.js:94:19)
at HapiResponseAdapter.handle (/Users/ttakamiy@us.ibm.com/kibana/kibana-7.8.0-darwin-x86_64/src/core/server/http/router/response_adapter.js:81:17)
at Router.handle (/Users/ttakamiy@us.ibm.com/kibana/kibana-7.8.0-darwin-x86_64/src/core/server/http/router/router.js:160:34)
at process._tickCallback (internal/process/next_tick.js:68:7)
error [13:52:56.429] Error: Internal Server Error
at HapiResponseAdapter.toInternalError (/Users/ttakamiy@us.ibm.com/kibana/kibana-7.8.0-darwin-x86_64/src/core/server/http/router/response_adapter.js:69:19)
at Router.handle (/Users/ttakamiy@us.ibm.com/kibana/kibana-7.8.0-darwin-x86_64/src/core/server/http/router/router.js:163:34)
at process._tickCallback (internal/process/next_tick.js:68:7)
Can anybody see anything that potentially causes this kind of errors? Thank you!
Can you click the "Wrench" icon, select "Copy as cURL", and then try pasting it into your terminal and running it from there? The cURL request should be something like this:
curl -XGET "http://localhost:9200/"
I'm trying to narrow down whether this is an issue within Console or a problem with the way Kibana is interacting with the Kubernetes cluster. Thanks.
"Wrench" icon gave me the correct URL without user/password. By providing the user/password with curl's -p option, I could run the generated curl command successfully.
Among them x-forwarded-proto: http is the one causing this. If I send a valid Elasticsearch query with it using curl, I got:
<html>
<head><title>301 Moved Permanently</title></head>
<body>
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>
So I guess our nginx (Kubernetes Ingress) is configured in that way.
My workaround is to force Kibana not to generate those headers, i.e. edit kibana-7.8.0-darwin-x86_64/src/plugins/console/server/routes/api/console/proxy/create_handler.js and comment out following lines:
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.