1. 确认代码无误(根据情况修改,表示若获得不了数据不会自动commit或者rollback):

  1. Event event = channel.take();
  2. if (event == null) {
  3. return Status.BACKOFF;
  4. }
  5.  
  6. I changed it to:
  7.  
  8. if (event == null) {
  9. transaction.commit();
  10. return Status.BACKOFF;
  11. }

http://grokbase.com/t/flume/user/12be2xfgg5/custom-sink-close-called-when-transaction-is-open-error

2. 确认flume启动给足了内存:

查看flume-ng文件:

JAVA_OPTS="-Xmx1024m"    #设置大一点,默认是20M

可参考:http://blog.csdn.net/panguoyuan/article/details/39555239

flume-sink报错 java.lang.IllegalStateException: close() called when transaction is OPEN - you must either commit or rollback first的更多相关文章

  1. eclipse启动报错java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' befo

    报错: java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invo ...

  2. 云笔记项目- 上传文件报错"java.lang.IllegalStateException: File has been moved - cannot be read again"

    在做文件上传时,当写入上传的文件到文件时,会报错“java.lang.IllegalStateException: File has been moved - cannot be read again ...

  3. springboot测试启动报错java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test

    springboot测试启动报错: java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you ne ...

  4. Spring Scheduled定时任务报错 java.lang.IllegalStateException: Encountered invalid @Scheduled method 'xxx': For input string: "2S"

    报错信息如下: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ding ...

  5. spring mvc处理http请求报错:java.lang.IllegalStateException: getInputStream() has already been called for this request

    发送post请求到controller处理失败,报错日志如下: java.lang.IllegalStateException: getInputStream() has already been c ...

  6. Spring Boot单元测试报错java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]

    1 报错描述 java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]. Specify @Boot ...

  7. springboot 启动报错 java.lang.IllegalStateException: Failed to introspect annotated methods on class org

    . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ...

  8. Idea 的Test测试报错:java.lang.IllegalStateException: Failed to load ApplicationContext

    因为在Test里面使用了注解@Autowired 引入来至bean.xml文件的内容 ,而在Test没有没有办法自动引入,需要在Test类上加上注解 @ContextConfiguration(loc ...

  9. JDK8stream将list转Map对象报错java.lang.IllegalStateException

    ​ JDK8有很多新特性,比如lambda表达式,函数式编程以及stream流的使用,这几个新特性,使用过之后就爱不释手了,比如将list集合通过stream可以直接转换成map对象. 语法: Map ...

随机推荐

  1. Spring基本使用方法_Bean对象

    Spring基本使用方法_Bean对象 Struts与Hibernate可以做什么事? Struts MVC中控制层解决方案.可以进行请求数据自动封装,类型转换,文件上传,效验..... Hibern ...

  2. centos 软件库安装

    ./configure: error: the HTTP rewrite module requires the PCRE library. You can either disable the mo ...

  3. Python模块学习:threading 多线程控制和处理

    Reference:http://python.jobbole.com/81546/ threading.Thread Thread 是threading模块中最重要的类之一,可以使用它来创建线程.有 ...

  4. PHP根据URL提取根域名

    <?php #使用示例 echo getBaseDomain('http://blog.jp.goo.ne.jp/index.php')->domain;echo "\n&quo ...

  5. NodeMCU之旅(三):响应配置按钮

    引言 在之前的代码中,要连接的WIFI信息都已写死在代码里,这显然不能适应我们的需求.所以需要想个办法让用户可以配置这些信息. WIFI工作模式 NodeMCU支持STATION,SOFTAP,STA ...

  6. zoom:1-hasLayout

    在现代浏览器,如果子元素float,则父元素不会自动被撑开 #nofloatbox { border: 1px solid #FF0000; background: #CCC; width:200px ...

  7. noip2016天天爱跑步

    题目描述 小c同学认为跑步非常有趣,于是决定制作一款叫做<天天爱跑步>的游戏.«天天爱跑步»是一个养成类游戏,需要玩家每天按时上线,完成打卡任务. 这个游戏的地图可以看作一一棵包含 个结点 ...

  8. qlv格式转换成MP4格式

    腾讯视频下载:1.先下载腾讯的客户端--->播放视频在客户端 2.播放视频一段后停止 3.点击腾讯客户端的右上角的设置 4.复制缓存地址(注意:在此之前需要设置"显示隐藏的文件夹&qu ...

  9. jQuery 处理TextArea

    jQuery 处理TextArea: $('#btn001').click(function(e) { console.log("btn001Click"); var cmt = ...

  10. V8编程入门

    本文档介绍了V8引擎的一些关键概念,并提供了例子hello world指引你入门. Hello World 让我们看一个Hello World的示例,它将一个字符串参数作为JavaScript语句,执 ...