elasticsearch 警告 org.jboss.netty.handler.codec.frame.TooLongFrameException: HTTP content length exce

在测试中遇到的一些问题
elasticsearch日志中出现警告
[WARN ][http.netty               ] [Banshee] Caught exception while handling client http traffic, closing connection [id: 0x61615783, /127.0.0.1:37923 => /127.0.0.1:9200]
org.jboss.netty.handler.codec.frame.TooLongFrameException: HTTP content length exceeded 104857600 bytes
同时fluentd日志出现警告
2016-03-10 16:02:29 +0800 [warn]: temporarily failed to flush the buffer. next_retry=2016-03-10 16:00:58 +0800 error_class="Fluent::ElasticsearchOutput::ConnectionFailure" error="Could not push logs to Elasticsearch after 2 retries. Connection reset by peer (Errno::ECONNRESET)" plugin_id="object:3fe5fd03d3ec"
根据提示显示http传输内容过多
然后(这个然后是好长时间,脑纸不好使)想到fluentd中我用的是file做的缓存 关键是配置的太大了256m 
然后我修改/etc/td-agent/td-agent.conf把buffer_type 设置为memory buffer_chunk_limit设置为 8m buffer_queue_limit 设为 8 flush_interval设为20s
<match nginx.*>
  type elasticsearch
  host 127.0.0.1
  port 9200
  buffer_type memory
  buffer_path /var/log/fluent/myapp.*.buffer
  buffer_chunk_limit 8m
  buffer_queue_limit 8
  logstash_format true
  flush_interval 20s
  retry_limit 17
  include_tag_key true
  tag_key mapred
</match>
然后就可以了 后期可以根据实际情况调做优化
如果单纯的是在fluentd日志中出现访问被拒应该是文件夹权限问题比如设置的elasticsearch数据文件夹。还有就是端口拒绝访问 这样的话就把host改为127.0.0.1 然后关闭防火墙
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值