我试过在 elasticsearch.yaml 文件中给出以下配置network.host: aa.bbb.ccc.dd
那是我的 IPv4 地址
和 http.port: 9200
当我尝试在我的 Windows 机器上运行 elasticsearch.bat 时,对此的响应如下:the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
我真的不太确定为集群初始化配置什么。默认值为 discovery.seed_hosts: ["host1", "host2"]
和 cluster.initial_master_nodes: ["node-1", "node-2"]
最佳答案
简而言之,如果您在本地运行 Elasticsearch(单个节点)或仅在云上使用单个节点,那么只需在您的 elasticsearch.yml
中使用以下配置即可。为了避免生产检查并使其正常工作,在 this SO 中提供了有关此配置的更多信息回答:
discovery.type: single-node
关于ElasticSearch 启动错误——默认发现设置不适合生产使用;,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59350069/