这些设置如何使 Elasticsearch 在开发模式下达到 运行?
What do these settings do to make Elasticsearch to run in development mode?
我一直在 Docker 容器中使用 Elasticsearch 进行测试。我发现从我的生产服务器导入一个小数据集并将其用作测试数据,而不是通过其他方式模拟响应,这样更容易、更易于维护和更可靠。
我最近遇到了一个问题,我无法访问主机系统的配置设置来将 vm.max_map_count 提升到 262144。 ES 无法启动。
所以,在努力寻找替代方案之后,我意识到我可以通过设置以下内容将 ES 设置为 运行 开发模式:
http.host=0.0.0.0
transport.host=127.0.0.1
通过阅读文档,我知道这些参数指的是什么。
但仍然不清楚为什么它使 ES 在开发模式下变为 运行。限制是什么。
有人知道为什么吗?
提前致谢。
参考资料:
Elasticsearch 5.x 有一系列 "bootstrap checks",其中 运行 当 Elasticsearch 启动时检查可能导致节点在其 运行 期间发生故障的配置问题。如果这些检查中的任何一项失败,节点将在启动期间中止 如果它绑定到非本地 IP 地址。
基本上,开发模式 = 运行在本地 IP 地址上 。一旦您定义了一个非本地 IP 地址,就会认为您正在 运行 生产中的那个节点(这很有意义),检查会被强制执行,并且您基本上会受到保护,免受您自己的影响 运行那个节点。
您可以阅读更多相关信息 here。
此处描述:https://www.elastic.co/guide/en/elasticsearch/reference/master/system-config.html
Development mode vs production mode
By default, Elasticsearch assumes that you are working in development mode. If any of the above settings are not configured correctly, a warning will be written to the log file, but you will be able to start and run your Elasticsearch node.
As soon as you configure a network setting like network.host
, Elasticsearch assumes that you are moving to production and will upgrade the above warnings to exceptions. These exceptions will prevent your Elasticsearch node from starting. This is an important safety measure to ensure that you will not lose data because of a malconfigured server.
默认安装不允许集群网络(传输绑定到本地主机):
By default, Elasticsearch binds to localhost for HTTP and transport (internal) communication. This is fine for downloading and playing with Elasticsearch, and everyday development but it’s useless for production systems. To form a cluster, Elasticsearch instances must be reachable via transport communication so they must bind transport to an external interface. Thus, we consider an Elasticsearch instance to be in development mode if it does not bind transport to an external interface (the default), and is otherwise in production mode if it does bind transport to an external interface. Note that HTTP can be configured independently of transport
我一直在 Docker 容器中使用 Elasticsearch 进行测试。我发现从我的生产服务器导入一个小数据集并将其用作测试数据,而不是通过其他方式模拟响应,这样更容易、更易于维护和更可靠。
我最近遇到了一个问题,我无法访问主机系统的配置设置来将 vm.max_map_count 提升到 262144。 ES 无法启动。
所以,在努力寻找替代方案之后,我意识到我可以通过设置以下内容将 ES 设置为 运行 开发模式:
http.host=0.0.0.0
transport.host=127.0.0.1
通过阅读文档,我知道这些参数指的是什么。
但仍然不清楚为什么它使 ES 在开发模式下变为 运行。限制是什么。
有人知道为什么吗?
提前致谢。
参考资料:
Elasticsearch 5.x 有一系列 "bootstrap checks",其中 运行 当 Elasticsearch 启动时检查可能导致节点在其 运行 期间发生故障的配置问题。如果这些检查中的任何一项失败,节点将在启动期间中止 如果它绑定到非本地 IP 地址。
基本上,开发模式 = 运行在本地 IP 地址上 。一旦您定义了一个非本地 IP 地址,就会认为您正在 运行 生产中的那个节点(这很有意义),检查会被强制执行,并且您基本上会受到保护,免受您自己的影响 运行那个节点。
您可以阅读更多相关信息 here。
此处描述:https://www.elastic.co/guide/en/elasticsearch/reference/master/system-config.html
Development mode vs production mode By default, Elasticsearch assumes that you are working in development mode. If any of the above settings are not configured correctly, a warning will be written to the log file, but you will be able to start and run your Elasticsearch node.
As soon as you configure a network setting like
network.host
, Elasticsearch assumes that you are moving to production and will upgrade the above warnings to exceptions. These exceptions will prevent your Elasticsearch node from starting. This is an important safety measure to ensure that you will not lose data because of a malconfigured server.
默认安装不允许集群网络(传输绑定到本地主机):
By default, Elasticsearch binds to localhost for HTTP and transport (internal) communication. This is fine for downloading and playing with Elasticsearch, and everyday development but it’s useless for production systems. To form a cluster, Elasticsearch instances must be reachable via transport communication so they must bind transport to an external interface. Thus, we consider an Elasticsearch instance to be in development mode if it does not bind transport to an external interface (the default), and is otherwise in production mode if it does bind transport to an external interface. Note that HTTP can be configured independently of transport