elasticsearch Elasticsearch在启用x-pack后停止工作,elasticsearch,kibana,elasticsearch,Kibana" /> elasticsearch Elasticsearch在启用x-pack后停止工作,elasticsearch,kibana,elasticsearch,Kibana" />

elasticsearch Elasticsearch在启用x-pack后停止工作

elasticsearch Elasticsearch在启用x-pack后停止工作,elasticsearch,kibana,elasticsearch,Kibana,我有elasticsearch和kibana 7.3现在我想要什么当我从浏览器访问kibana时,它应该询问密码或用户ID,然后稍微搜索一下,然后找到这个x-pack,我设置了xpack.security.enabled:true,但现在elasticsearch给出了错误 这是elasticsearch.yml文件 # Use a descriptive name for your cluster: # cluster.name: ElasticsearchStaging #xpack.sec

我有elasticsearch和kibana 7.3现在我想要什么当我从浏览器访问kibana时,它应该询问密码或用户ID,然后稍微搜索一下,然后找到这个x-pack,我设置了
xpack.security.enabled:true
,但现在elasticsearch给出了错误

这是elasticsearch.yml文件

# Use a descriptive name for your cluster:
#
cluster.name: ElasticsearchStaging
#xpack.security.enabled: true
#xpack.security.audit.enabled: true
#
# ------------------------------------ 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
#
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
#
我注释
#xpack.security.audit.enabled:true
,因为它给出了错误。 此外,我的/var/log/elasticsearch/elasticsearch.log文件未得到更新

如果我使用
journalctl-u elasticsearch.service
,我会得到以下结果:

Aug 13 18:07:54 elastic-stage-vyakar systemd[1]: Started Elasticsearch.
Aug 13 18:07:57 elastic-stage-vyakar elasticsearch[3897]: OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Aug 13 18:08:21 elastic-stage-vyakar systemd[1]: elasticsearch.service: Main process exited, code=exited, status=78/n/a
Aug 13 18:08:21 elastic-stage-vyakar systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Aug 13 18:18:13 elastic-stage-vyakar systemd[1]: Started Elasticsearch.
Aug 13 18:18:15 elastic-stage-vyakar elasticsearch[4164]: OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Aug 13 18:18:40 elastic-stage-vyakar systemd[1]: elasticsearch.service: Main process exited, code=exited, status=78/n/a
Aug 13 18:18:40 elastic-stage-vyakar systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
这是我的kibana.yml文件:

server.port: 5601
# Specifies the address to which the Kibana server will bind. IP addresses and host names are both valid values.
# The default is 'localhost', which usually means remote machines will not be able to connect.
# To allow connections from remote users, set this parameter to a non-loopback address.
server.host: 10.***.*.**
# Enables you to specify a path to mount Kibana at if you are running behind a proxy.
# Use the `server.rewriteBasePath` setting to tell Kibana if it should remove the basePath
# from requests it receives, and to prevent a deprecation warning at startup.
# This setting cannot end in a slash.
#server.basePath: ""
# Specifies whether Kibana should rewrite requests that are prefixed with
# `server.basePath` or require that they are rewritten by your reverse proxy.
# This setting was effectively always `false` before Kibana 6.3 and will
# default to `true` starting in Kibana 7.0.
#server.rewriteBasePath: false
# The maximum payload size in bytes for incoming server requests.
#server.maxPayloadBytes: 1048576
# The Kibana server's name.  This is used for display purposes.
server.name: testing
# The URLs of the Elasticsearch instances to use for all your queries.
elasticsearch.hosts: http://10.***.*.**:9200
# When this setting's value is true Kibana uses the hostname specified in the server.host
# setting. When the value of this setting is false, Kibana uses the hostname of the host
# that connects to this Kibana instance.
#elasticsearch.preserveHost: true
# Kibana uses an index in Elasticsearch to store saved searches, visualizations and
# dashboards. Kibana creates a new index if the index doesn't already exist.
kibana.index: kibanaindx
# The default application to load.
#kibana.defaultAppId: "home"
# The Kibana server's name.  This is used for display purposes.
server.name: testing
# The default application to load.
#kibana.defaultAppId: "home"
# If your Elasticsearch is protected with basic authentication, these settings provide
# the username and password that the Kibana server uses to perform maintenance on the Kibana
# index at startup. Your Kibana users still need to authenticate with Elasticsearch, which
# is proxied through the Kibana server.
elasticsearch.username: "kibana"
elasticsearch.password: "pass"
# Enables SSL and paths to the PEM-format SSL certificate and SSL key files, respectively.
# These settings enable SSL for outgoing requests from the Kibana server to the browser.
#server.ssl.enabled: false
#server.ssl.certificate: /path/to/your/server.crt
#server.ssl.key: /path/to/your/server.key
# Optional settings that provide the paths to the PEM-format SSL certificate and key files.
# These files validate that your Elasticsearch backend uses the same key files.
#elasticsearch.ssl.certificate: /path/to/your/client.crt
#elasticsearch.ssl.key: /path/to/your/client.key
# Optional setting that enables you to specify a path to the PEM file for the certificate

检查您是否有
/var/log/elasticsearch/ElasticsearchStaging.log
。它应该指出在引导过程中可能发生的故障。如果只使用OSS版本,Elasticsearch将无法启动,因为它不随X-Pack提供

谢谢你的回复,我有这个文件,但问题是它没有得到更新,但是如果我使用
journalctl-u elasticsearch.service
,那么我会得到更新的日志,但我想要这个文件格式。在你的原始帖子中有重复的配置密钥。确保它们不存在于实际的elasticsearch.yml中。我建议卸下安装并重新开始清洁。卸下rpm包后,
rm-rf/etc/elasticsearch/var/lib/elasticsearch/usr/share/elasticsearch
。重新安装rpm,让服务运行并重新尝试安全配置。确保您使用的是非OSS Elasticsearch版本。