我已经建立了一个6节点(3个主节点+ 3个数据)集群。
我还设置了第7个协调节点,以仅显示here概述的kibana
。
现在集群端点是什么?
在我的elasticsearch.yml
cluster.name: es-staging
bootstrap.memory_lock: true
transport.host: 10.11.27.27
network.host: 127.0.0.1
discovery.ec2.endpoint: ec2.eu-west-1.amazonaws.com
discovery.ec2.host_type: private_ip
discovery.zen.hosts_provider: ec2
http.port: 9200
discovery.zen.minimum_master_nodes: 2
node.master: false
node.data: false
node.ingest: false
s3.client.default.endpoint: s3-eu-west-1.amazonaws.com
transport.tcp.port: 9300
node.name: elastic-staging-coord
action.auto_create_index: true
以及我的kibana.yml
elasticsearch.url: "http://localhost:9200"
server.port: 80
server.host: 10.11.27.27
但是
$ curl -IL http://<public_ip_of_coordinating_node>:9200
curl: (7) Failed to connect to <public_ip_of_coordinating_node> port 9200: Connection refused
我的集群端点现在是什么?所有elasticsearch请求都发送到哪里?
群集运行状况由特定节点btw报告为正常
{
"cluster_name" : "es-esa-staging",
"status" : "green",
"timed_out" : false,
"number_of_nodes" : 7,
"number_of_data_nodes" : 3,
"active_primary_shards" : 1,
"active_shards" : 2,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 0,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 100.0
}
(Ι正在以kibana
的身份运行root
,以便能够将其公开给80
)
编辑:当以0.0.0.0
设置切换到network.host
时,我得到以下信息:
$ curl -IL http://<public_ip_or_coordinating_node>:9200
HTTP/1.1 503 Service Unavailable
Content-Type: text/html; charset=UTF-8
Content-Length: 959
Connection: close
P3P: CP="CAO PSA OUR"
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
同时:
elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2018-12-12 08:08:24 UTC; 4min 39s ago
Docs: http://www.elastic.co
Main PID: 9872 (java)
Tasks: 52 (limit: 4704)
CGroup: /system.slice/elasticsearch.service
├─9872 /usr/bin/java -Xms1g -Xmx1g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UT
└─9952 /usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/bin/controller
答案 0 :(得分:0)
由于network.host
设置[1],您的实例绑定到127.0.0.1。因此,您的es实例仅可用于localhost。
您应该将此设置更改为可从网络访问的某些IP或主机名。