'Error Could not contact Elasticsearch at http://localhost:9200.' - kibana - elasticsearch

'Error Could not contact Elasticsearch at http://localhost:9200. Please ensure that Elasticsearch is reachable from your system.'
Currently I am following http://packetbeat.com/getstarted
I installed
elastic search - running on localhost:9200 - returns the json,
2.packetbeat - running,
Kibana on port 8000
Now, I change my kibana/config.js file - enter ,
elasticsearch: "http://"localhost":9200",
under elasticsearch.
I get a plain white page with {{dashboard.current.title}} on top.
If I comment out elasticsearch: "http://"localhost":9200",
I get Error Could not contact Elasticsearch at http://localhost:9200. Please ensure that Elasticsearch is reachable from your system.
If I also enter it as elasticsearch: "http://localhost:9200",, I get the same error that it could not contact elasticsearch.
So, I am assuming elasticsearch: "http://"localhost":9200", is right, but it should render something. perhaps a UI

put hostname instead of localhost
for example
http://bilal:9200 (here bilal is my hostname)
if you dont know your hostname goto cmd or terminal type hostname

this works for me..
instead of localhost set your public ip or public dns for
elasticsearch: "http://public_dns:80",
and set the port forwarding from 80 to 9200.

Have Kibana auto-detect the ElasticSearch URL by using
elasticsearch: "http://"+window.location.hostname+":9200",
instead of elasticsearch: "http://"localhost":9200"

Dont change anything, for default elasticsearch is in port 9200:
The Elasticsearch instance to use for all your queries.
elasticsearch.url: "http://localhost:9200"
The problem is that perhaps you must put elasticsearch.url and you only put elasticsearch: "http://localhost:9200".

Related

Kibana is not responding but cluster is working fine

We are using the Kibana hosted endpoint that comes with Elasticsearch on AWS accessible with a URL like https://*******.us-east-1.es.amazonaws.com/_plugin/kibana/
As of a few days ago, Kibana became unaccessible and Chrome/cURL returns a ERR_TIMED_OUT error.
Telnet shows that the port 443 is timing out:
telnet ******.us-east-1.es.amazonaws.com 443
Trying 10.0.1.238...
telnet: connect to address 10.0.1.238: Operation timed out
Trying 10.0.0.28...
telnet: connect to address 10.0.0.28: Operation timed out
telnet: Unable to connect to remote host
Everything else on the cluster seems to be working fine. Accessing Elastic thru code works and the cluster status is "Status: Green". The "Cluster Health" page on AWS does not show any visible issues.
The only other issue I am aware of is our inability to migrate Elastic from 6.x to 7.x due to this error:
Checking upgrade eligibility - Failed
Cluster has 3082.0 shards per node which exceeds the setting cluster.max_shards_per_node value 1000
According to AWS documentation "The 7.x versions of Elasticsearch have a default setting of no more than 1,000 shards per node" so I am unsure if this is related to our inability to access Kibana or not.
Would anyone know of a good next step to re-gain access to Kibana?

How to Access ElasticSearch From Server?

I am using elastic search in my ubuntu16.04 server. When i am trying to access elasticsearch from browser by using url ip:port/_cat/indices?v. I am getting site can't be reached. After that i am change the network.host value to network.host: 0.0.0.0. After change the network.host ip the search engine not started. How can i access the elasticsearch in my browser.I changed the port also.
Thank you..
There can be many reasons for ES not being reachable. I would start with the obvious and make sure that:
ES is listening on the port: on the ES instance when you run 'curl
ip:port' you should get an answer. if not the service didn't start
well.
make sure there are no firewall rules/security groups that prevent
access from remote network.
make sure network.publish_host is configure correctly:
https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html#advanced-network-settings
more info here: ElasticSearch instance not reachable from outside the server - Azure Windows 2012

Kibana unable to connect to Elasticsearch

I am having trouble getting Kibana to connect to elasticsearch. The error I get is below;
plugin:elasticsearch#5.6.1 Request Timeout after 3000ms
Elasticsearch has been deployed via kubernetes and runs as a service called monitoring-es with a cluster IP of 100.63.124.194.
In my Kibana.yml file I have set the elasticsearch url as;
elasticsearch.url: "http://100.63.124.194:9200"
However I still get the same error. Is this the correct value or is there something I am missing?
Thanks

Elastic search and kibana not running in browser

I'm trying to install Elastic search and kibanna in my linux server, both elastic search and kibana service started, but i cannot able to to go the URL. [This site cannot be reached - http://127.0.0.1:9203/ http://localhost:5601
both i have tried]
Please help to update, what could be the issue. Is there any port level change i need to do ? please guide

Kibana asking for credentials

I set up a Kibana server that is accesing an External ElasticServer Datasource. Nignx is on top, and I access Kibana through it.
On the initial config, I set up the credentials of Kibana using:
sudo htpasswd -c /etc/nginx/htpasswd.users kibanaadmin
Then I was able to access the Kibana Web Console, and see it running. However, the external elasticServer was not configured, so I edited the kibana.yml file to point that external ElasticServer.
elasticsearch.url: "https://bluemix-sandbox-dal-9-portal0.dblayer.com:18671/"
elasticsearch.username: "admin"
elasticsearch.password: "mypass"
When I restarted Kibana, it was able to connect to the elasticsearch server, and in fact it seems that it wrote an entry on the index there.
However, now I am asked for some credentials to get connected to the Kibana Web interface. They are not the kibanaadmin I set up previously, or the ones on elasticsearch database. Which credentials should i use?
Are you sure you're not running Kibana from the wrong ES instance and both Kibana and Nginx are running on the same server. Haven't tried it out personally but then the below links could be handy.
Enabling Kibana Authentication with Nginx
Securing Elasticsearch, Kibana with nginx
Git- Kibana with Nginx Reverse Proxy

Resources