1、内存不够
Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00000006c5330000, 4207738880, 0) failed; error='Cannot allocate memory' (errno=12)
## There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 2103864440 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /home/user/hs_err_pid1375.log
elk默认启动需要2g的内存,可以根据本机环境调整
-Xms2g
-Xmx2g
2、其他主机不可访问
curl: connect to address : Connection refused
调整防火墙
vi /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 9200 -j ACCEPTservice iptables restart
调整elk配置
vi ./elasticsearch-5.1.1/config/elasticsearch.ymlnetwork.host: 0.0.0.0
3、max file descriptor
ERROR: bootstrap checks failedmax file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
vi /etc/security/limits.conf
* hard nofile 65536
* soft nofile 65536
4、max number of threads
max number of threads [1024] for user [user] is too low, increase to at least [2048]vi /etc/security/limits.d/90-nproc.conf
* soft nproc 2048
5、max virtual memory areas
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]1 sysctl -w vm.max_map_count=262144
2 vi /etc/sysctl.conf
vm.max_map_count=262144
6、设置/etc/security/limits.d/90-nproc.conf后,仍报错
ERROR: bootstrap checks failed
max number of threads [1876] for user [work] is too low, increase to at least [2048]
查询虚拟机内存,如果内存较低,就会影响实际的最大线程数