Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/tensorflow/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
<img src="//i.stack.imgur.com/RUiNP.png" height="16" width="18" alt="" class="sponsor tag img">elasticsearch 如何在局域网上启用Elasticsearch_<img Src="//i.stack.imgur.com/RUiNP.png" Height="16" Width="18" Alt="" Class="sponsor Tag Img">elasticsearch_Logstash - Fatal编程技术网 elasticsearch 如何在局域网上启用Elasticsearch,elasticsearch,logstash,elasticsearch,Logstash" /> elasticsearch 如何在局域网上启用Elasticsearch,elasticsearch,logstash,elasticsearch,Logstash" />

elasticsearch 如何在局域网上启用Elasticsearch

elasticsearch 如何在局域网上启用Elasticsearch,elasticsearch,logstash,elasticsearch,Logstash,我刚刚在我的ubuntu服务器上安装了Elasticsarch 7.5.0。我可以从本地主机获得elasticsearch,我希望能够从另一台计算机访问它,但这不起作用。我尝试从以下位置进行配置:network.host:0.0.0,network.host:192.168.1.2,但当我在更改配置后重新启动elasticseach时,我得到以下信息: Job for elasticsearch.service failed because the control process exited

我刚刚在我的ubuntu服务器上安装了Elasticsarch 7.5.0。我可以从本地主机获得elasticsearch,我希望能够从另一台计算机访问它,但这不起作用。我尝试从以下位置进行配置:
network.host:0.0.0
network.host:192.168.1.2
,但当我在更改配置后重新启动elasticseach时,我得到以下信息:

Job for elasticsearch.service failed because the control process exited with error code.
See "systemctl status elasticsearch.service" and "journalctl -xe" for details.
我也尝试过网络。主持人:全球,但似乎没有任何效果。你知道这里有什么问题吗? 我的elasticsearch.yml文件如下所示:

# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
#       Before you set out to tweak and tune the configuration, make sure you
#       understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
#cluster.name: my-application
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
#node.name: node-1
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /var/lib/elasticsearch
#
# Path to log files:
#
path.logs: /var/log/elasticsearch
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):



#network.host: 0.0.0.0
#network.bind_host: 0.0.0.0
#network.publish_host: 0.0.0.0
#



#
#network.host: 192.168.0.1
#network.host: 10.10.10.16
#network.host: 0.0.0.0
network.host: '_global_'
#
# Set a custom porti for HTTP:
#
#http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
#discovery.seed_hosts: ["127.0.0.1", "0.0.0.0"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
#cluster.initial_master_nodes: ["node-1", "node-2"]
#
# For more information, consult the discovery and cluster formation module documentation.
#
# ---------------------------------- Gateway -----------------------------------
#
# Block initial recovery after a full cluster restart until N nodes are started:
#
#gateway.recover_after_nodes: 3
#
# For more information, consult the gateway module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
#action.destructive_requires_name: true

我终于发现了问题:

network.host: _enp0s3_
discovery.seed_hosts: 0.0.0.0

设置这些参数后,它可以找到。

查看/var/log/elasticsearch/*.log文件。。。。里面有什么。。。当您绑定到0.0.0.0时,它会执行额外的测试,因为它认为您已经准备好投入生产。