内存问题
[root@localhost conf.d]# /usr/share/logstash/bin/logstash -f /usr/share/logstash/config/conf.d/jsontest.conf
Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000d1260000, 55422976, 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 55422976 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /etc/logstash/conf.d/hs_err_pid59086.log
解决方案:
vi /etc/security/limits.conf 修改如下:
* hard nofile 65536
* soft nofile 65536
vi /etc/security/limits.d/20-nproc.conf修改如下:
* soft nproc 4096
root soft nproc unlimited
vi /etc/sysctl.conf添加:
vm.max_map_count = 655360
并执行:
[root@localhost security]# sysctl -p
vm.overcommit_memory = 1
vm.max_map_count = 655360