美文网首页
ELK日志分析系统(QA篇)

ELK日志分析系统(QA篇)

作者: tutou_jianshu | 来源:发表于2020-03-19 10:38 被阅读0次

这里用于收集沉淀ELK使用过程中的问题和解决方案,整理于此待后续有重复问题时候,在此查找或增改

ElasticSearch Q&A

问题:

max file descriptors [4096]forelasticsearch processistoo low, increasetoat least [65536]

解决方法:

#切换到root用户修改

vim /etc/security/limits.conf

# 在最后面追加下面内容,以当前用户为query为例

query hard nofile65536

query soft nofile65536

修改后重新登录 query用户,使用如下命令查看是否修改成功

ulimit -Hn65536

问题:

max virtual memory areas vm.max_map_count [65530]istoo low, increasetoat least [262144]

解决方法 提高vm.max_map_count 的大小

# 切换到root用户

vim /etc/sysctl.conf

# 在最后面追加下面内容

vm.max_map_count=262144

# 使用 sysctl -p 查看修改后的结果

sysctl -p

问题:

Java HotSpot(TM)64-Bit Server VM warning: INFO: os::commit_memory(0x0000000085330000,2060255232,0) failed;error='Cannot allocate memory' (errno=12)

解决方法:

# 由于elasticsearch5.0默认分配jvm空间大小为2g,修改jvm空间分配

# 如果使用虚拟机安装,内存最好不小于2G

# vim config/jvm.options 

-Xms512m

-Xmx512m

问题:

kibana进程重启,通过 ps -ef|grep kibana 看不到进程号,无法kill重启

解决方法:

[query@localhost ~]$ ps -ef|grep node

query 3805 1 0 2019 ? 04:51:52 ./node_exporter

query 7164 1 2 15:33 ? 00:00:21 ./../node/bin/node --no-warnings --max-http-header-size=65536 ./../src/cli

query 7586 7534 0 15:49 pts/0 00:00:00 grep --color=auto node

[query@localhost ~]$ netstat -tunlp|grep 5601

(Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.)

tcp 0 0 172.168.160.193:5601 0.0.0.0:* LISTEN 7164/./../node/bin/

[query@localhost ~]$ [query@localhost ~]$ lsof -i:5601

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME

node 7164 query 20u IPv4 66835753 0t0 TCP localhost.localdomain:esmagent (LISTEN)

查看kibabna进程

        因为kibana是node编写,所以kibana运行的时候是运行在node 里面。

        通过查询得知,kibana运行进程号为7164,kill -9 7164,重新启动kibana (./kibana &)即可。

相关文章

网友评论

      本文标题:ELK日志分析系统(QA篇)

      本文链接:https://www.haomeiwen.com/subject/whnwehtx.html