【发布时间】:2020-08-15 03:29:35
【问题描述】:
(我是弹性搜索的新手)
我想将弹性搜索作为服务启动(sudo systemctl start elasticsearch),但它不会启动,并抛出错误,如下图所示
所以在那之后,我在/var/log/elasticsearch/my-application.log那里查看了elasticsearch日志的日志文件,我发现了一些超出我范围的问题,下面附加的错误日志文件是
https://filebin.net/ca3a5l67t2hqcexd
到目前为止我尝试过的一段代码
sudo apt-cache search openjdk
sudo apt-get install openjdk-11-jre openjdk-11-jdk
java -version (openjdk 14.0.1 2020-04-14 OpenJDK Runtime Environment (build 14.0.1+7-Ubuntu-1ubuntu1) OpenJDK 64-Bit Server VM (build 14.0.1+7-Ubuntu-1ubuntu1, mixed mode, sharing))
sudo gedit /etc/environment
JAVA_HOME="/usr/lib/jvm/java-14-openjdk-amd64"
echo $JAVA_HOME (/usr/lib/jvm/java-14-openjdk-amd64)
curl -fsSL https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - (OK)
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-7.x.list - (deb https://artifacts.elastic.co/packages/7.x/apt stable main)
sudo apt-get update && sudo apt-get install elasticsearch
sudo gedit /etc/elasticsearch/elasticsearch.yml
overwritted in yml file of elasticsearch
(cluster.name: my-application
node.name: magentocom
network.publish.host: localhost
discovery.seed_hosts: []
network.host: 127.0.0.1
http.port: 9200
cluster.initial_master_nodes: 127.0.0.1)
sudo systemctl start elasticsearch
我也根据建议的答案给予了许可,但仍然没有成功: https://stackoverflow.com/a/38539220/9427866
任何帮助将不胜感激!
【问题讨论】:
-
什么是es的错误日志?
-
抱歉打扰了,我在哪里可以找到 ES @ThanhNguyenVan 的日志
-
首先你应该分享 my-application.log 中的错误部分。其次,您将 java_home 设置为 java 版本 14?并安装了 java 版本 11?虽然不需要安装java,因为elasticsearch已经嵌入了java 11。
标签: elasticsearch ubuntu-20.04