2.0 Elasticsearch7.1 ES在Linux下安裝問題處理(外網訪問良心優化版)
下載解壓
各個版本都有
https://elasticsearch.cn/download/
[root@localhost hadoop]# tar -zxf jdk-11.0.8_linux-x64_bin.tar.gz -C /usr/local/java
[root@localhost hadoop]# tar -zxf elasticsearch-7.1.0-linux-x86_64.tar.gz -C /usr/local
[root@localhost hadoop]# tar -zxf filebeat-7.1.0-linux-x86_64.tar.gz -C /usr/local
[root@localhost hadoop]# tar -zxf kibana-7.1.0-linux-x86_64.tar.gz -C /usr/local
[root@localhost hadoop]# tar -zxf logstash-7.1.0.tar.gz -C /usr/local
JVM配置
在es目錄修改JVM - config/jvm.options 7.1預設設定1GB
配置建議 Xmx 和 Xms一樣 Xmx不超過機器記憶體50% 不超過30GB
vim /etc/profile
export JAVA_HOME=/usr/local/install/jdk-11.0.8
export PATH=$JAVA_HOME/bin:$PATH
問題一 java.lang.RuntimeException: can not runelasticsearch as root
[root@iZbp1bb2egi7w0ueys548pZ local]# chown -R hadoop elasticsearch-6.0.0
切換至elasticsearch使用者
[root@iZbp1bb2egi7w0ueys548pZ etc]# su elasticsearch
使用後臺啟動方式啟動:./elasticsearch -d
問題二 ES不能外網訪問
elasticsearch.yml
network.host: 192.168.188.100
# 本機地址或者 network.host: 0.0.0.0
# Set a custom port for HTTP:
#
http.port: 9200
問題三 ES不能外網訪問 解決了一大波問題但是還不能訪問
試試關了防火牆
service firewalld stop
#檢視防火牆狀態
systemctl status firewalld.service
#臨時關閉防火牆
systemctl stop firewalld.service
#禁止firewall開機啟動
systemctl disable firewalld.service
問題四 failed to obtain node locks
Caused by: java.lang.IllegalStateException: failed to obtain node locks, tried [[/usr/local/elasticsearch-7.1.0/data]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max_local_storage_nodes] (was [1])?
先前啟動的沒殺乾淨
[hadoop@fly elasticsearch-7.1.0]$ jps
23696 Elasticsearch
24314 Jps
[hadoop@fly elasticsearch-7.1.0]$ kill -9 23696
問題五 seccomp unavailable 錯誤 這個我7.1我沒遇到
解決方法:elasticsearch.yml 配置
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
問題六 max file descriptors [4096] for elasticsearch process likely too low, increase to at least [65536]
vim /etc/security/limits.conf ***填啟動es使用者 我的是hadoop
*** hard nofile 80000
*** soft nofile 80000
To Increase the File Descriptor Limit (Linux) 其他材料我就用了第六招:
不見效果 記得重啟 reboot
ulimit -Hn 立馬變了
1. Display the current hard limit of your machine.
The hard limit is the maximum server limit that can be set without tuning the kernel parameters in proc file system.
$ ulimit -aH
core file size (blocks) unlimited
data seg size (kbytes) unlimited
file size (blocks) unlimited
max locked memory (kbytes) unlimited
max memory size (kbytes) unlimited
open files 1024
pipe size (512 bytes) 8
stack size (kbytes) unlimited
cpu time (seconds) unlimited
max user processes 4094
virtual memory (kbytes) unlimited
2. Edit the /etc/security/limits.conf and add the lines:
* soft nofile 1024
* hard nofile 65535
3. Edit the /etc/pam.d/login by adding the line:
session required /lib/security/pam_limits.so
4. Use the system file limit to increase the file descriptor limit to 65535.
The system file limit is set in /proc/sys/fs/file-max .
echo 65535 > /proc/sys/fs/file-max
5. Use the ulimit command to set the file descriptor limit to the hard limit specified in /etc/security/limits.conf.
ulimit -n unlimited
6. Restart your system.
問題七 max virtual memory areas vm.max_map_count [65530] is too low
vim /etc/sysctl.conf
vm.max_map_count = 262144
然後 sysctl -p
生效
問題八 the default discovery settings are unsuitable…, last least one of […] must be configured
解決方法:elasticsearch.yml 開啟配置:
node.name: node-1
cluster.initial_master_nodes: ["node-1"]
相關文章
- Linux 中安裝redis 外網可訪問LinuxRedis
- 請文在EJB2.0下處理漢字問題
- playwright 在 Centos 的安裝和問題處理CentOS
- ubuntu mysql 安裝和外網訪問配置UbuntuMySql
- ORACLE LINUX 6 安裝telnet包問題處理OracleLinux
- 外網訪問內網LINUX內網Linux
- centos7 安裝 ElasticSearch 配置外網訪問CentOSElasticsearch
- Mac遊戲安裝常見問題處理Mac遊戲
- mysql5.7安裝及問題處理MySql
- Docker Centos安裝Redis以及問題處理DockerCentOSRedis
- servlet處理下載的問題,要考慮訪問量大時的效率問題Servlet
- 在S/390下安裝 SuSE Linux 問題解答(轉)Linux
- 賜教在windows下安裝linux的問題(轉)WindowsLinux
- 解決ubuntu下安裝phpmyadmin訪問不了的問題UbuntuPHP
- 在Ubuntu上原始碼安裝MySQL+安裝問題解決+安全優化Ubuntu原始碼MySql優化
- 在CentOS上原始碼安裝MySQL+安裝問題解決+安全優化CentOS原始碼MySql優化
- 解決內、外網同時訪問問題
- 設定linux 可以訪問外網Linux
- RHEL/CentOS/Oracle Linux7/8版本安裝Openonload驅動問題處理CentOSOracleLinux
- Oracle外網訪問Oracle
- PHP7.1.0安裝Zabbix3.0.7問題處理PHP
- lama-cleaner 安裝時tokenizers問題的處理
- BizTalk Adapter for FTP訪問小型機問題及處理APTFTP
- Linux 問題處理集錦Linux
- GitHub 訪問優化Github優化
- macbook 下安裝Goglang 以及安裝svn外掛所遇到的問題MacGo
- ES外掛常見問題
- 禪道PMS在lnmp下的安裝問題LNMP
- linux下安裝mysql的問題解決LinuxMySql
- LINUX下安裝oracle的java字型問題LinuxOracleJava
- linux 下 wu-ftp的安裝問題LinuxFTP
- 在Linux中,假如公司網站訪問速度變的很慢很慢,該如何處理?Linux網站
- 網站訪問優化,未完待續網站優化
- DEDECMS在linux下問題Linux
- 本地網站外網訪問網站
- Mysql安裝過程問題總結及處理方法MySql
- 外網訪問本地sqlserverSQLServer
- ES報錯Result window is too large問題處理薦