启用x-pack后Elasticsearch停止工作 [英] Elasticsearch stop working after enable x-pack
问题描述
我现在有elasticsearch和kibana 7.3,当我从浏览器访问kibana时我想要什么,它应该询问密码或用户ID,然后对其进行少量搜索,并提出了这个x-pack的东西,我设置了xpack.security.enabled: true
,但是现在elasticsearch是给出错误
I have elasticsearch and kibana 7.3 now what i want when i access kibana from browser it should ask for password or userid then search little about it and came up with this x-pack thing, i set xpack.security.enabled: true
but now elasticsearch is giving error
这是elasticsearch.yml文件
this is elasticsearch.yml file
# 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文件没有得到更新.
i comment #xpack.security.audit.enabled: true
because it was giving error.
also my /var/log/elasticsearch/elasticsearch.log file is not getting update.
如果我使用journalctl -u elasticsearch.service
,那么我会得到:
if i use journalctl -u elasticsearch.service
then i get this :
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文件:
Here is my kibana.yml file :
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一起提供.
Check if you have your /var/log/elasticsearch/ElasticsearchStaging.log
. It should indicate the failure that likely occurred during bootstrap. Elasticsearch would fail to start if using the OSS only version since it does not ship with X-Pack.
这篇关于启用x-pack后Elasticsearch停止工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!