【发布时间】:2020-07-05 12:20:33
【问题描述】:
(像这样的论坛上的新人,对我来说太赤裸裸了哈哈)
无论如何只是想知道是否有人可以帮助我,我已经通过 DEB 包安装了 Elasticsearch 6.8.9,并通过 GitHub 安装了 Elasticsearch 头。在进行研究后,我做了以下事情,但由于某种原因,ElasticSearch 在启动后退出,因此无法正常运行。它在 ElasticSearch 2.4 上运行良好,但由于头部需要 5.x 通过 GitHub,我一直在努力让它工作。我尝试通过安装它
sudo apt-get install elasticsearch
还有这些 apt-get 安装脚本:
sudo apt-get install openjdk-8-jdk openjdk-8-jre-headless
但也不能正常工作。任何意见,将不胜感激。非常感谢:
/etc/elasticsearch/jvm.options
# Reduce RAM heap size to 128MB (was 1GB)
# Xms represents the initial size of total heap space
# Xmx represents the maximum size of total heap space
-Xms128m
-Xmx128m
/etc/elasticsearch/elasticsearch.yml
# Set network.host to 0.0.0.0
network.host: 0.0.0.0
sudo nano /etc/environment
# Set JAVA_HOME to target Java8 instead of Java11
JAVA_HOME="/usr/lib/jvm/java-8-openjdk-armhf/bin/java"
sudo update-alternatives --config java (选择选项2,按回车,没有问题)
There are 2 choices for the alternative java (providing /usr/bin/java).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/lib/jvm/java-11-openjdk-armhf/bin/java 1111 auto mode
1 /usr/lib/jvm/java-11-openjdk-armhf/bin/java 1111 manual mode
* 2 /usr/lib/jvm/java-8-openjdk-armhf/jre/bin/java 1081 manual mode
Press <enter> to keep the current choice[*], or type selection number: 2
来源 /etc/environment 回显 $JAVA_HOME
/usr/lib/jvm/java-8-openjdk-armhf/jre/bin/java
java -version
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (build 1.8.0_212-8u212-b01-1+rpi1-b01)
OpenJDK Client VM (build 25.212-b01, mixed mode)
我什至通过 /usr/share/elasticsearch 文件夹完成了这个命令
wget -qO - https://artifacts.elastic.co/GPG-KEY- **elasticsearch** | sudo apt-key add -
但这是我不断得到的最终结果。我试图通过日志查看任何特定错误,但无法过滤它。运行树莓派 3。
**●** elasticsearch.service - ElasticsearchLoaded: loaded (/usr/lib/systemd/system/elasticsearch.service; disabled; vendor preset: enabled)
Active: **failed** (Result: exit-code) since Sat 2020-07-04 15:48:04 BST; 20h ago
Docs: http://www.elastic.co
Process: 1066 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet **(code=exited, status=1/FAILURE)**
Main PID: 1066 (code=exited, status=1/FAILURE)
Jul 04 15:47:03 raspberrypi systemd[1]: Started Elasticsearch.
Jul 04 15:47:03 raspberrypi elasticsearch[1066]: warning: Falling back to java on path. This behavior is deprecated. Specify JAVA_HOME
Jul 04 15:48:04 raspberrypi systemd[1]: **elasticsearch.service: Main process exited, code=exited, status=1/FAILURE**
Jul 04 15:48:04 raspberrypi systemd[1]: **elasticsearch.service: Failed with result 'exit-code'.****~**
【问题讨论】:
标签: elasticsearch java-8 raspberry-pi3 java-11 elasticsearch-6