不为失败找理由,要为成功找方法。

filebeat采集可以采集多少个文件

Beats | 作者 cao | 发布于2018年12月14日 | 阅读数:3911

我今天测试了下filebeat,读取1000个文件是正常的,但是只要超出一个就会报如下的错误:
2018/12/14 08:25:34.621889 log.go:91: INFO Harvester started for file: /root/testdir/Err.log
2018/12/14 08:25:34.622212 prospector_log.go:248: ERR Harvester could not be started on new file: /root/testdir/88824.trc, Err: Error setting up harvester: Harvester setup failed. Unexpected file opening error: Failed opening /root/testdir/1088824.trc: open /root/testdir/40000001088824.trc: too many open files
 
2018/12/14 08:25:34.634418 registrar.go:303: ERR Failed to create tempfile (/opt/filebeat/data/registry.new) for writing: open /opt/filebeat/data/registry.new: too many open files
2018/12/14 08:25:34.634473 registrar.go:264: ERR Writing of registry returned error: open /opt/filebeat/data/registry.new: too many open files. Continuing...
已邀请:

novia - 1&0

赞同来自:

Finally I got the solution, in CentOS 7 / RHEL 7, SysV is replaced by Systemd, and as aresult modifying /etc/security/limits.conf has no effect on service of systemd. I modified /usr/lib/systemd/system/filebeat.service to change the open file limit:

[Service]
LimitNOFILE=100000
 

cao

赞同来自:

修改了limit配置之后我这边还是不可以,请问大家谁能帮忙推介下解决思路?

要回复问题请先登录注册