1. Error message
.-Geneva- + to: +:Wuyi,393(Sinkrunner-pollingrunner-defaultsinkprocessor) [Error-org.apache.flume.sinkrunner$pollingrunner.run (Sinkrunner.java: the)] Unable to deliver event. Exception Follows.java.lang.IllegalStateException:Channel closed [Channel=CHANNEL1]. Due to Java.io.EOFException:NULLAt Org.apache.flume.channel.file. Filechannel.createtransaction (Filechannel.java:329) at Org.apache.flume.channel.BasicChannelSemantics.getTransaction (Basicchannelsemantics.java:122) at Org.apache.flume.sink.hdfs.HDFSEventSink.process (Hdfseventsink.java:376) at Org.apache.flume.sink.DefaultSinkProcessor.process (Defaultsinkprocessor.java: the) at Org.apache.flume.sinkrunner$pollingrunner.run (Sinkrunner.java:147) at Java.lang.Thread.run (Thread.java:745) caused by:java.io.EOFException at java.io.RandomAccessFile.readInt (Randomaccessfile.java:827) at Java.io.RandomAccessFile.readLong (Randomaccessfile.java:860) at Org.apache.flume.channel.file. Eventqueuebackingstorefactory.get (Eventqueuebackingstorefactory.java: -) at Org.apache.flume.channel.file. Log.replay (Log.java:417) at Org.apache.flume.channel.file. Filechannel.start (Filechannel.java:279) at Org.apache.flume.lifecycle.lifecyclesupervisor$monitorrunnable.run (Lifecyclesupervisor.java:251) at Java.util.concurrent.executors$runnableadapter.call (Executors.java:471) at Java.util.concurrent.FutureTask.runAndReset (Futuretask.java:304) 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:1145) at Java.util.concurrent.threadpoolexecutor$worker.run (Threadpoolexecutor.java:615) ... 1 More .-Geneva- + to: +:Wuyi,972(pool-4-thread-1) [Error-org.apache.flume.source.spooldirectorysource$spooldirectoryrunnable.run (SpoolDirectorySource.java: the)] Fatal:spool Directory source source1: {spooldir:/home/hadoop_admin/movielog}: Uncaught exceptioninchSpooldirectorysource Thread. Restart or reconfigure Flume to continue processing.java.lang.IllegalStateException:Channel closed [Channel=CHANNEL1]. Due to Java.io.EOFException:NULLAt Org.apache.flume.channel.file. Filechannel.createtransaction (Filechannel.java:329) at Org.apache.flume.channel.BasicChannelSemantics.getTransaction (Basicchannelsemantics.java:122) at Org.apache.flume.channel.ChannelProcessor.processEventBatch (Channelprocessor.java:181) at Org.apache.flume.source.spooldirectorysource$spooldirectoryrunnable.run (Spooldirectorysource.java:235) at Java.util.concurrent.executors$runnableadapter.call (Executors.java:471) at Java.util.concurrent.FutureTask.runAndReset (Futuretask.java:304) 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:1145) at Java.util.concurrent.threadpoolexecutor$worker.run (Threadpoolexecutor.java:615) at Java.lang.Thread.run (Thread.java:745) caused by:java.io.EOFException at java.io.RandomAccessFile.readInt (Randomaccessfile.java:827) at Java.io.RandomAccessFile.readLong (Randomaccessfile.java:860) at Org.apache.flume.channel.file. Eventqueuebackingstorefactory.get (Eventqueuebackingstorefactory.java: -) at Org.apache.flume.channel.file. Log.replay (Log.java:417) at Org.apache.flume.channel.file. Filechannel.start (Filechannel.java:279) at Org.apache.flume.lifecycle.lifecyclesupervisor$monitorrunnable.run (Lifecyclesupervisor.java:251) ... 7 More
Configuration file:
Agent1.sources =Source1agent1.channels=channel1agent1.sinks=sink1# each channel's type is defined.Agent1.channels.channel1.type =fileAgent1.channels.channel1.checkpointDir=/home/hadoop_admin/flumetemp/fchannel/spool/Checkpointagent1.channels.channel1.dataDirs=/home/hadoop_admin/flumetemp/fchannel/spool/dataagent1.channels.channel1.capacity=200000000Agent1.channels.channel1.keep-alive = -Agent1.channels.channel1.Write-timeout = -Agent1.channels.channel1.checkpoint-timeout = -# For each one of the sources, the type is Definedagent1.sources.source1.type=Spooldiragent1.sources.source1.inputCharset=GBKagent1.sources.source1.spoolDir=/home/hadoop_admin/Movielogagent1.sources.source1.fileHeader=trueAgent1.sources.source1.deletePolicy=immediateagent1.sources.source1.batchSize= +Agent1.sources.source1.channels=channel1# each sink's type must be definedAgent1.sinks.sink1.type =Hdfsagent1.sinks.sink1.channel=Channel1agent1.sinks.sink1.hdfs.path= HDFs://master:9000/flumetestAgent1.sinks.sink1.hdfs.filePrefix = master-Agent1.sinks.sink1.hdfs.writeFormat=Textagent1.sinks.sink1.hdfs.fileType=DataStreamagent1.sinks.sink1.hdfs.rollInterval=0Agent1.sinks.sink1.hdfs.idleTimeout=0Agent1.sinks.sink1.hdfs.rollCount=0agent1.sinks.sink1.hdfs.rollSize=102400agent1.sinks.sink1.hdfs.batchSize= +Agent1.sinks.sink1.hdfs.callTimeout=30000
2. Workaround
Links: Http://serverfault.com/questions/690588/flume-error-log-while-using-filechannel
Simply clear the configuration file for the channel configuration checkpointdir and DataDir directories to
Flume file Channel Exception resolution