ElasticSearch - 指定确切的端口(无端口范围)

时间:2014-03-13 00:15:49

标签: elasticsearch

我想为ElasticSearch指定一个确切的端口用于HTTP流量。我怎么能这样做?在配置文件中,它表示它默认侦听端口范围。如何将此端口范围限制为仅1个端口?

Elasticsearch, by default, binds itself to the 0.0.0.0 address, and listens
on port [9200-9300] for HTTP traffic and on port [9300-9400] for node-to-node
communication. (the range means that if the port is busy, it will automatically
try the next port).

1 个答案:

答案 0 :(得分:3)

在配置文件夹中。有一个名为" elasticsearch.Yml"的文件。在那里面 端口的参数被注释。只需在http.port之前删除哈希并为其添加端口值..

    http.port : 5000

您可以为tcp和http

执行此操作