`
sjk2013
  • 浏览: 2185381 次
文章分类
社区版块
存档分类
最新评论

flume报错 Configured capacity is 100000000 but the checkpoint file capacity is 1000000

 
阅读更多

最近flume运行不是很稳定,本次由于hadoop不能写入,导致flume报错,Configured capacity is 100000000 but the checkpoint file capacity is 1000000,重启flume后问题仍然存在。

1,详细报错如下:

22 Jan 2013 11:07:42,568 INFO [pool-7-thread-1] (org.apache.avro.ipc.NettyServer$NettyServerAvroHandler.channelClosed:209) - Connection to /10.4.203.176:60322 disconnected.

22 Jan 2013 11:07:44,617 ERROR [SinkRunner-PollingRunner-DefaultSinkProcessor] (org.apache.flume.SinkRunner$PollingRunner.run:160) - Unable to deliver event. Exception follows.
java.lang.IllegalStateException: Channel closed [channel=file_chan_1]. Due to java.lang.IllegalStateException: Configured capacity is 100000000 but the checkpoint file capacity is 1000000. See FileChannel documentation on how to change a channels capacity.
at org.apache.flume.channel.file.FileChannel.createTransaction(FileChannel.java:321)
at org.apache.flume.channel.BasicChannelSemantics.getTransaction(BasicChannelSemantics.java:122)
at org.apache.flume.sink.hdfs.HDFSEventSink.process(HDFSEventSink.java:385)
at org.apache.flume.sink.DefaultSinkProcessor.process(DefaultSinkProcessor.java:68)
at org.apache.flume.SinkRunner$PollingRunner.run(SinkRunner.java:147)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.IllegalStateException: Configured capacity is 100000000 but the checkpoint file capacity is 1000000. See FileChannel documentation on how to change a channels capacity.
at org.apache.flume.channel.file.EventQueueBackingStoreFile.<init>(EventQueueBackingStoreFile.java:80)
at org.apache.flume.channel.file.EventQueueBackingStoreFileV3.<init>(EventQueueBackingStoreFileV3.java:42)
at org.apache.flume.channel.file.EventQueueBackingStoreFactory.get(EventQueueBackingStoreFactory.java:67)
at org.apache.flume.channel.file.EventQueueBackingStoreFactory.get(EventQueueBackingStoreFactory.java:36)
at org.apache.flume.channel.file.Log.replay(Log.java:339)
at org.apache.flume.channel.file.FileChannel.start(FileChannel.java:271)
at org.apache.flume.lifecycle.LifecycleSupervisor$MonitorRunnable.run(LifecycleSupervisor.java:236)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
... 1 more

2,故障原因:
FileChannel使用了固定大小的checkpoint file,修改channel的能力,简单的方法如下
1,关闭agent
2, 删除或者备份checkpoint目录
3,重启flume agent(如果channel中有大量文件,会导致全面的延迟,建议先关闭数据源,等把file channel中的数据全部写入sink后,等上2分钟,等数据文件删除后,再重启channel
具体详见参考资料这段话,这段意思未完全读明白
,通过解决方法靠谱

The FileChannel actually uses a fixed size checkpoint file -- so it is not possible to set
it to unlimited size (the checkpoint file is mmap-ed to a fixed size buffer). To change the
capacity of the channel, the easiest way off the top of my head is:

* Shutdown the agent.
* Delete all files in the file channel's checkpoint directory. (not the data directories.
Also you might want to move them out, rather than delete to be safe)
* Change your configuration to increase the capacity of the channel.
* Restart the agent - this will cause full replay, so the agent might take sometime to start
up if there are a lot of events in the channel (to avoid this - shutdown the source before
shutting the agent down - so the sink can drain out the channel completely, wait for about
1-2 mins after the channel is empty so that the data files get deleted (this happens only
immediately after a checkpoint - you can verify this by making sure each data dir has only
2 files each), since all events have been sent out - so during restart the channel will be
quite empty, with very little to replay).


参考资料
http://mail-archives.apache.org/mod_mbox/flume-user/201211.mbox/%3CDA66E7657BFBD949829F3C98D73A54CF18E23C@RHV-EXRDA-S11.corp.ebay.com%3E
分享到:
评论

相关推荐

    flume batchsize transactionCapacity capacity的简单理解

    capacity——The maximum number of events stored in the channel channle 容纳的最大event条数 transactionCapacity ——The maximum number of events the channel will take from a source or give to a sink ...

    日志收集之Flume

    日志是系统数据的基石,对于系统的安全来说非常重要,它记录了系统每天发生的各种各样的事情,用户可以通过它来检查错误发生的原因,或者寻找受到攻击时攻击者留下的...Flume初始的发行版本目前被统称为FlumeOG(ori

    flume-push.conf

    a1.sources.r1.spoolDir = /var/log/flume a1.sources.r1.fileHeader = true a1.sinks.k1.type = avro a1.sinks.k1.hostname = 192.168.10.130 a1.sinks.k1.port = 9999 a1.channels.c1.type = memory a1....

    Flume1.6.0入门:安装、部署、及flume的案例

    Flume1.6.0入门:安装、部署、及flume的案例

    flume自学文档.pdf

    Flume是Cloudera提供的一个高可用的,高可靠的,分布式的海量日志采集、聚合和传输的系统,Flume支持在日志系统中定制各类数据发送方,用于收集数据;同时,Flume提供对数据进行简单处理,并写到各种数据接受方(可...

    实时大数据采集框架Flume详解(视频+课件+代码+工具)

    04_Flume中配置使用file channel及HDFS sink 05_Flume中配置HDFS文件生成大小及时间分区 06_Flume中配置Spooling Dir的使用 07_Flume中配置Spooling Dir的文件过滤 08_Flume中配置扇入架构的介绍 09_Flume中...

    Using.Flume.Flexible.Scalable.and.Reliable.Data.Streaming.pdf

    With this complete reference guide, you’ll learn Flume’s rich set of features for collecting, aggregating, and writing large amounts of streaming data to the Hadoop Distributed File System (HDFS), ...

    flume-ng安装

    flume-ng安装

    .Using.Flume.Flexible.Scalable.and.Reliable.Data.Streaming

    With this complete reference guide, you’ll learn Flume’s rich set of features for collecting, aggregating, and writing large amounts of streaming data to the Hadoop Distributed File System (HDFS), ...

    Flume-ng-1.6.0-cdh.zip

    Flume-ng-1.6.0-cdh.zip 内压缩了 3 个项目,分别为:flume-ng-1.6.0-cdh5.5.0.tar.gz、flume-ng-1.6.0-cdh5.7.0.tar.gz 和 flume-ng-1.6.0-cdh5.10.1.tar.gz,选择你需要的版本。

    Flume-HDFS-驱动-jar包

    解决flume上传文件至HDFS报错问题。需要手动将hadoop相关jar包导入flume的lib目录下。

    尚硅谷大数据技术之Flume

    尚硅谷大数据技术之Flume

    Flume集群环境搭建,flume监控

    flume集群环境搭建,详细讲解,图文并茂,包括flume信息监控和众多文章链接

    flume支持RabbitMQ插件

    flume支持RabbitMQ插件

    Apache Flume Distributed Log Collection For Hadoop

    Apache Flume is a distributed, reliable, and available service for efficiently collecting, aggregating, and moving large amounts of log data. Its main goal is to deliver data from applications to ...

    apache-flume-1.8.0

    flume官网下载太慢,请从这里下载,次文件是官方网站的1.8版本,也就是支持jdk1.8的,不支持jdk1.7,如果要支持jdk1.7的,请下载我的资源里面也有,flume1.7,

    Apache Flume Distributed Log Collection for Hadoop(PACKT,2ed,2015)

    Apache Flume is a distributed, reliable, and available service used to efficiently collect, aggregate, and move large amounts of log data. It is used to stream logs from application servers to HDFS ...

    Flume构建高可用、可扩展的海量日志采集系统

    Flume是Cloudera提供的一个高可用的,高可靠的,分布式的海量日志采集、聚合和传输的系统,Flume支持在日志系统中定制各类数据发送方,用于收集数据;同时,Flume提供对数据进行简单处理,并写到各种数据接受方(可...

    47_Flume、Logstash、Filebeat调研报告

    基于flume+kafka+实时计算引擎(storm,spark,flink)的实时计算框架目前是比较火的一个分支,在实时数据采集组件中flume扮演着极为重要角色,logtash是ELK的重要组件部分,filebeat也是一个实时采集工具;

    让你快速认识flume及安装和使用flume1 5传输数据 日志 到hadoop2 2 文档

    让你快速认识flume及安装和使用flume1 5传输数据 日志 到hadoop2 2 中文文档 认识 flume 1 flume 是什么 这里简单介绍一下 它是 Cloudera 的一个产品 2 flume 是干什么的 收集日志的 3 flume 如何搜集日志 我们把...

Global site tag (gtag.js) - Google Analytics