org.apache.flume.ChannelFullException: Space for commit to queue couldn't be acquired.问题
flume报错代码:
ERROR source.ExecSource: Failed while running command: tail -F /root/apps/flume_source/1.log
org.apache.flume.ChannelException: Unable to put batch on required channel: org.apache.flume.channel.MemoryChannel{name: c1}
at org.apache.flume.channel.ChannelProcessor.processEventBatch(ChannelProcessor.java:200)
at org.apache.flume.source.ExecSource$ExecRunnable.flushEventBatch(ExecSource.java:382)
at org.apache.flume.source.ExecSource$ExecRunnable.run(ExecSource.java:342)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.flume.ChannelFullException: Space for commit to queue couldn't be acquired. Sinks are likely not keeping up with sources, or the buffer size is too tight
at org.apache.flume.channel.MemoryChannel$MemoryTransaction.doCommit(MemoryChannel.java:130)
at org.apache.flume.channel.BasicTransactionSemantics.commit(BasicTransactionSemantics.java:151)
at org.apache.flume.channel.ChannelProcessor.processEventBatch(ChannelProcessor.java:192)
... 7 more
分析日志:
- channel c1的内存不足
org.apache.flume.ChannelException: Unable to put batch on required channel: org.apache.flume.channel.MemoryChannel{name: c1}
- sinks的熟读跟不上source的速度,buffer的大小太紧张了
Sinks are likely not keeping up with sources, or the buffer size is too tight
修改方案:
agent.channels.memoryChanne3.keep-alive = 60
agent.channels.memoryChanne3.capacity = 1000000
#修改java最大内存大小
vi bin/flume-ng
JAVA_OPTS="-Xmx2048m"