Below is the setting from kibana.yml:
server.port: 5601
server.host: namenode2
elasticsearch.url: "http://namenode2:9200"
Below is the setting from elasticsearch.yml:
cluster.name: es-prod
node.name: master-1
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
network.host: ["namenode2", local]
When I tried vi /etc/hosts, I get:
172.15.7.169 namenode2
But when I typed http://172.15.7.169:5601, I get the following error message:
This site can’t be reached
172.15.7.169 refused to connect
Actually, it can be seen from the following results:
root@namenode2: /etc/elasticsearch> curl -X GET 'http://localhost:5601' -v
- About to connect() to localhost port 5601 (#0)
- Trying ::1...
- Connection refused
- Trying 127.0.0.1...
- Connected to localhost (127.0.0.1) port 5601 (#0)
*> GET / HTTP/1.1
*> User-Agent: curl/7.29.0
*> Host: localhost:5601
*> Accept: /
*>
*< HTTP/1.1 302 Found
*< location: /spaces/enter
*< kbn-name: namenode2
*< kbn-license-sig: *b9c6f9f9a3160f5ca28c2b723dfa02f5cc0901042cf3f9868f1f5ea0f48eb3a1
*< kbn-xpack-sig: a01841de727f78f70d3c61089bd6feac
*< cache-control: no-cache
*< content-length: 0
*< Date: Thu, 20 Feb 2020 00:46:38 GMT
*< Connection: keep-alive
*< - Connection #0 to host localhost left intact
root@namenode2: /etc/elasticsearch> curl -X GET 'http://localhost:9200' -v
- About to connect() to localhost port 9200 (#0)
- Trying ::1...
- Connected to localhost (::1) port 9200 (#0)
GET / HTTP/1.1
User-Agent: curl/7.29.0
Host: localhost:9200
Accept: /
< HTTP/1.1 200 OK
< content-type: application/json; charset=UTF-8
< content-length: 534
<
{
"name" : "namenode2",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "fKBvGU5HTmeBkh40Z3Umgg",
"version" : {
"number" : "7.6.0",
"build_flavor" : "default",
"build_type" : "rpm",
"build_hash" : "7f634e9f44834fbc12724506cc1da681b0c3b1e3",
"build_date" : "2020-02-06T00:09:00.449973Z",
"build_snapshot" : false,
"lucene_version" : "8.4.0",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
- Connection #0 to host localhost left intact
However, if I changed "localhost" to "172.15.7.169", I get:
root@namenode2: /etc/elasticsearch> curl -X GET 'http://172.15.7.169:9200' -v
- About to connect() to 172.15.7.169 port 9200 (#0)
- Trying 172.15.7.169...
- Connection refused
- Failed connect to 172.15.7.169:9200; Connection refused
- Closing connection 0
curl: (7) Failed connect to 172.15.7.169:9200; Connection refused
root@namenode2: /etc/elasticsearch> curl -X GET 'http://172.15.7.169:5601' -v
- About to connect() to 172.15.7.169 port 5601 (#0)
- Trying 172.15.7.169...
- Connection refused
- Failed connect to 172.15.7.169:5601; Connection refused
- Closing connection 0
curl: (7) Failed connect to 172.15.7.169:5601; Connection refused
What is wrong with my setting?