Kibana: Unable to connect to Elasticsearch at http://localhost:9200, elasticsearch

hi ,
im kinda new with elasticsearch, i used to work with Version 5.5 but as i upgraded elastic and kibana to 5.6.3 encountered this issue, my elasticsearch is up and working but kibana reports this error


i don't change config files at all! so its some how surprising ,i try to reinstall both but nothing worked, i checked another topics with the related error, but as far as i checked none of them helped me out!
every thing seems fine in elasticsearch log file

but in sys log i got this report whereas with netstat i can see elasticsearch is up and running in port 9200, even i checked it with curl and nothing was weird :

i guess the problem is with kibana , because while server is up and running there is nothing in neststat port 5601

Try telling kibana to connect to Elasticsearch at 5.9.40.181 or otherwise tell elasticsearch to listen on 127.0.0.1

@Conall_Prendergast tnx for you're reply , but truthfully i did that in kibana and elasticsearch yml files, i realy dont have any idea what the problem comes from, do you have any thing in mind?

Please don't post pictures of text, they are difficult to read and some people may not be even able to see them :slight_smile:

Are Elasticsearch and Kibana on the same host? If not did you point Kibana to the 5.9.40.181 IP as suggested? If so please post your configs as well.

Can you post your kibana.yml and elasticsearch.yml here please

this is my elasticsearch config:

---------------------------------- Network -----------------------------------

Set the bind address to a specific IP (IPv4 or IPv6):

network.host: 0.0.0.0

Set a custom port for HTTP:

#http.port: 9200

For more information, consult the network module documentation.

--------------------------------- Discovery ----------------------------------

Pass an initial list of hosts to perform discovery when new node is started:

The default list of hosts is ["127.0.0.1", "[::1]"]

#discovery.zen.ping.unicast.hosts: ["host1", "host2"]

Prevent the "split brain" by configuring the majority of nodes (total number of master-eligible nodes / 2 + 1):

#discovery.zen.minimum_master_nodes: 3

For more information, consult the zen discovery module documentation.

---------------------------------- Gateway -----------------------------------

Block initial recovery after a full cluster restart until N nodes are started:

#gateway.recover_after_nodes: 3

For more information, consult the gateway module documentation.

---------------------------------- Various -----------------------------------

Require explicit names when deleting indices:

#action.destructive_requires_name: true
#xpack.security.enabled: false
#script.inline: true
#script.stored: true

http.cors.enabled: true
http.cors.allow-origin: "*"


and as for kibana :slight_smile:
Kibana is served by a back end server. This setting specifies the port to use.
#server.port: 5601

Specifies the address to which the Kibana server will bind. IP addresses and host names are both valid values.

The default is 'localhost', which usually means remote machines will not be able to connect.

To allow connections from remote users, set this parameter to a non-loopback address.

server.host: "5.9.40.181"

Enables you to specify a path to mount Kibana at if you are running behind a proxy. This only affects

the URLs generated by Kibana, your proxy is expected to remove the basePath value before forwarding requests

to Kibana. This setting cannot end in a slash.

#server.basePath: ""

The maximum payload size in bytes for incoming server requests.

#server.maxPayloadBytes: 1048576

The Kibana server's name. This is used for display purposes.

#server.name: "your-hostname"

The URL of the Elasticsearch instance to use for all your queries.

#elasticsearch.url: "http://localhost:9200"

When this setting's value is true Kibana uses the hostname specified in the server.host

setting. When the value of this setting is false, Kibana uses the hostname of the host

that connects to this Kibana instance.

#elasticsearch.preserveHost: true

verify_ssl: false

Please edit your post and use the </> button to format the config code.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.