(我是弹性搜索的新手)
我想将弹性搜索作为服务启动(sudo systemctl start elasticsearch),但它无法启动,并引发如下图所示的错误
所以在那之后,我浏览了elasticsearch日志的日志文件,/var/log/elasticsearch/my-application.log
发现那里的问题超出了我的范围,下面附有错误日志的文件是
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
任何帮助将不胜感激!
只需尝试替换network.publish.host
为network.publish_host
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句