flume file channel 异常解决
1. 错误提示
-- ::, (SinkRunner-PollingRunner-DefaultSinkProcessor) [ERROR - org.apache.flume.SinkRunner$PollingRunner.run(SinkRunner.java:)] Unable to deliver event. Exception follows.
java.lang.IllegalStateException: Channel closed [channel=channel1]. Due to java.io.EOFException: null
at org.apache.flume.channel.file.FileChannel.createTransaction(FileChannel.java:)
at org.apache.flume.channel.BasicChannelSemantics.getTransaction(BasicChannelSemantics.java:)
at org.apache.flume.sink.hdfs.HDFSEventSink.process(HDFSEventSink.java:)
at org.apache.flume.sink.DefaultSinkProcessor.process(DefaultSinkProcessor.java:)
at org.apache.flume.SinkRunner$PollingRunner.run(SinkRunner.java:)
at java.lang.Thread.run(Thread.java:)
Caused by: java.io.EOFException
at java.io.RandomAccessFile.readInt(RandomAccessFile.java:)
at java.io.RandomAccessFile.readLong(RandomAccessFile.java:)
at org.apache.flume.channel.file.EventQueueBackingStoreFactory.get(EventQueueBackingStoreFactory.java:)
at org.apache.flume.channel.file.Log.replay(Log.java:)
at org.apache.flume.channel.file.FileChannel.start(FileChannel.java:)
at org.apache.flume.lifecycle.LifecycleSupervisor$MonitorRunnable.run(LifecycleSupervisor.java:)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$(ScheduledThreadPoolExecutor.java:)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:)
... more
-- ::, (pool--thread-) [ERROR - org.apache.flume.source.SpoolDirectorySource$SpoolDirectoryRunnable.run(SpoolDirectorySource.java:)] FATAL: Spool Directory source source1: { spoolDir: /home/hadoop_admin/movielog }: Uncaught exception in SpoolDirectorySource thread. Restart or reconfigure Flume to continue processing.
java.lang.IllegalStateException: Channel closed [channel=channel1]. Due to java.io.EOFException: null
at org.apache.flume.channel.file.FileChannel.createTransaction(FileChannel.java:)
at org.apache.flume.channel.BasicChannelSemantics.getTransaction(BasicChannelSemantics.java:)
at org.apache.flume.channel.ChannelProcessor.processEventBatch(ChannelProcessor.java:)
at org.apache.flume.source.SpoolDirectorySource$SpoolDirectoryRunnable.run(SpoolDirectorySource.java:)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$(ScheduledThreadPoolExecutor.java:)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:)
at java.lang.Thread.run(Thread.java:)
Caused by: java.io.EOFException
at java.io.RandomAccessFile.readInt(RandomAccessFile.java:)
at java.io.RandomAccessFile.readLong(RandomAccessFile.java:)
at org.apache.flume.channel.file.EventQueueBackingStoreFactory.get(EventQueueBackingStoreFactory.java:)
at org.apache.flume.channel.file.Log.replay(Log.java:)
at org.apache.flume.channel.file.FileChannel.start(FileChannel.java:)
at org.apache.flume.lifecycle.LifecycleSupervisor$MonitorRunnable.run(LifecycleSupervisor.java:)
... more
配置文件:
agent1.sources = source1
agent1.channels = channel1
agent1.sinks = sink1 # Each channel's type is defined.
agent1.channels.channel1.type = file
agent1.channels.channel1.checkpointDir = /home/hadoop_admin/flumeTemp/fchannel/spool/checkpoint
agent1.channels.channel1.dataDirs = /home/hadoop_admin/flumeTemp/fchannel/spool/data
agent1.channels.channel1.capacity =
agent1.channels.channel1.keep-alive =
agent1.channels.channel1.write-timeout =
agent1.channels.channel1.checkpoint-timeout = # For each one of the sources, the type is defined
agent1.sources.source1.type = spooldir
agent1.sources.source1.inputCharset = GBK
agent1.sources.source1.spoolDir =/home/hadoop_admin/movielog
agent1.sources.source1.fileHeader = true
agent1.sources.source1.deletePolicy = immediate
agent1.sources.source1.batchSize =
agent1.sources.source1.channels = channel1 # Each sink's type must be defined
agent1.sinks.sink1.type = hdfs
agent1.sinks.sink1.channel = channel1
agent1.sinks.sink1.hdfs.path = hdfs://master:9000/flumeTest
agent1.sinks.sink1.hdfs.filePrefix = master-
agent1.sinks.sink1.hdfs.writeFormat = Text
agent1.sinks.sink1.hdfs.fileType = DataStream
agent1.sinks.sink1.hdfs.rollInterval =
agent1.sinks.sink1.hdfs.idleTimeout =
agent1.sinks.sink1.hdfs.rollCount =
agent1.sinks.sink1.hdfs.rollSize =
agent1.sinks.sink1.hdfs.batchSize =
agent1.sinks.sink1.hdfs.callTimeout =
2. 解决方法
链接: http://serverfault.com/questions/690588/flume-error-log-while-using-filechannel
只要把配置文件中的关于channel配置checkpointDir和dataDir目录清空就可以
flume file channel 异常解决的更多相关文章
- [bigdata] flume file channel CPU消耗比 memory channel高的原因
https://www.quora.com/Why-does-flume-take-more-resource-CPU-when-file-channel-is-used-compared-to-wh ...
- flume 报File Channel transaction capacity cannot be greater than the capacity of the channel capacity错误
今天在部署flume集群时,在启动collector服务器没报错,启动agent服务器报错: File Channel transaction capacity cannot be greater t ...
- 安装Flume的时候出现File Channel transaction capacity cannot be greater than the capacity of the channel capacity -解决方案 摘自网络
部署flume集群时,在启动collector服务器没报错,启动agent服务器报错: File Channel transaction capacity cannot be greater than ...
- 实时事件统计项目:优化flume:用file channel代替mem channel
背景:利用kafka+flume+morphline+solr做实时统计. solr从12月23号开始一直没有数据.查看日志发现,因为有一个同事加了一条格式错误的埋点数据,导致大量error. 据推断 ...
- [异常解决] How to build a gcc toolchain for nRF51 on linux (very detailed!!!)
1.Install gcc-arm-none-eabi https://devzone.nordicsemi.com/tutorials/7/This link shows that developm ...
- STL 跨模块 调用 异常 解决
本文为转载别人的,以作收藏之用 百度了一天,现在把结论放上边: 1.不要用STL(std::string属于STL)来跨模块传输数据,例如:dll(so)之间,dll(so)和exe(elf)之间. ...
- Android 异常解决方法【汇总】
(1)异常:Android中引入第三方Jar包的方法(Java.lang.NoClassDefFoundError解决办法) 1.在工程下新建lib文件夹,将需要的第三方包拷贝进来.2.将引用的第三方 ...
- java启动RabbitMQ消息报异常解决办法
启动SpringCloud微服务,RabbitMQ报如下异常: 2019-08-12 18:15:49.543 ERROR 53096 --- [68.252.131:5672] o.s.a.r.c. ...
- MySQL提示:The server quit without updating PID file问题的解决办法(转载)
MySQL提示:The server quit without updating PID file问题的解决办法 今天网站web页面提交内容到数据库,发现出错了,一直提交不了,数找了下原因,发现数据写 ...
随机推荐
- 如何用Endnote导入你要用的格式
在Google搜索某一个期刊名 ens格式的文件,下载,然后放入endnote的文件夹中(C:\Program Files (x86)\EndNote X7\Styles) 然后将其导入即可
- 多线程编程2 - NSOperation
一.NSOperation 1.简介 NSOperation实例封装了需要执行的操作和执行操作所需的数据,并且能够以并发或非并发的方式执行这个操作. NSOperation本身是抽象基类,因此必须使用 ...
- Linux定时任务设定
使用crontab 命令进行设定. 详情可参见:http://blog.csdn.net/xiyuan1999/article/details/8160977. 共有6项构成,前5项为时间:分 时 天 ...
- 关于JAVA的String类的一些方法
一.得到字符串对象的有关信息 1.通过调用length()方法得到String的长度. String str=”This is a String”; int len =str.length(); 2. ...
- LoadRunner 思考时间与事务响应时间的区别与关系
LoadRunner 思考时间与事务响应时间的区别与关系 思考时间lr_think_time 就是一个事务要开始时思考的时间;比如 你要点击一个 登录按钮 我们都要点击这个按钮要先思考下 就是人为 ...
- java web开发环境配置
一:安装jdk http://www.java.com/zh_TW/ 二:下载tomcat,这里是zip版.http://tomcat.apache.org/download-70.cgi 三:在 ...
- 【转载】 Python 调整屏幕分辨率
转载来自: http://www.cnblogs.com/fatterbetter/p/4115423.html 需要用windows的api,ChangeDisplaySettings 实现代码如下 ...
- test1.A[【dfs简单题】
Test1.A Time Limit: 1000ms Memory limit: 65536K 有疑问?点这里^_^ 题目描述 sdut 2274:http://acm.sdut.edu.cn/ ...
- MVP社区巡讲照片集
今天MVP社区巡讲在北京利星行微软大厦连同SQL PASS社区合办了一次线下活动,这次互动汇集了在北京大多数的微软MVP,他们都是微软认可的有着各微软产品和技术特长的技术专家,无论是MVP社区巡讲还是 ...
- GMap.Net开发之技巧小结
1.在GMap地图上,如果要让添加的图标(Marker)有个高亮(highlight)的效果,可以在MouseOver到Marker的时候设置Marker外观效果. 如果要让图标有个报警闪烁的效果,可 ...