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页面提交内容到数据库,发现出错了,一直提交不了,数找了下原因,发现数据写 ...
随机推荐
- js正则匹配以固定格式结尾的字符串并匹配是手机访问,则跳转
<script> //var pcUrl = "http://res.meadin.com/HotelData/98986_1.shtml"; var pcUrl = ...
- Struts2拦截器之ExceptionMappingInterceptor(异常映射拦截器)
一.异常拦截器是什么? 异常拦截器的作用是提供一个机会,可以设置在action执行过程中发生异常的时候映射到一个结果字符串而不是直接中断. 将异常整合到业务逻辑中,比如在分层系统的调用中可以从底层抛出 ...
- localStorage的使用
HTML5中提供了localStorage对象可以将数据长期保存在客户端,直到人为清除. localStorage提供了几个方法: 1.存储:localStorage.setItem(key,valu ...
- .net学习笔记----有序集合SortedList、SortedList<TKey,TValue>、SortedDictionary<TKey,TValue>
无论是常用的List<T>.Hashtable还是ListDictionary<TKey,TValue>,在保存值的时候都是无序的,而今天要介绍的集合类SortedList和S ...
- ***CI的CLI运行方式
linux下的执行命令: 1.PHP解释器 2.CI根目录的index.php 3.控制器所在的文件夹 4. 控制器名称 5. 方法名称 (参数) 参考文献: http://codeigni ...
- MVC4 遇到问题总结
1.路径编写: 举例1.<img src="../Login/VailCode" width="108" height="40"&g ...
- 【翻译十二】java-并发之活性
A concurrent application's ability to execute in a timely manner is known as its liveness. This sect ...
- 【131031】html:hidden的使用
一般来说,我们在使用Struts时,如果要在JSP隐式的传值给Action有两种情况: 1.要传的值是FromBean中的一个字段,你说的情况应该就是这种情况,例如需要在Edit页面中保存theID, ...
- HDU5781 ATM Mechine(DP 期望)
应该是machine 和POJ3783 Balls类型相似. 现在上界为i元,猜错次数最多为j时,开始猜测为k元,有两种情况: 1 猜中:(i - k + 1) * dp[i - k][j] 2 猜不 ...
- Web开发基本准则-55实录-Web访问安全
Web开发工程师请阅读下面的前端开发准则,这是第一部分,强调了过去几年里我们注意到的Web工程师务须处理的Web访问安全基础点.尤其是一些从传统软件开发转入互联网开发的工程师,请仔细阅读,不要因为忽视 ...