storm supervisor启动报错java.lang.RuntimeException: java.io.EOFException

storm因机器断电或其他异常导致的supervisor意外终止,再次启动时报错:

    1. 2013-09-24 09:15:44,361 INFO  [main] daemon.supervisor (NO_SOURCE_FILE:invoke(0)) - Starting supervisor with id 74332654-8925-48a1-b67b-7eacaa52aeca at host hadoop02  
    2. 2013-09-24 09:15:45,246 ERROR [Thread-2] storm.event (NO_SOURCE_FILE:invoke(0)) - Error when processing event  
    3. java.lang.RuntimeException: java.io.EOFException  
    4.         at backtype.storm.utils.Utils.deserialize(Utils.java:68)  
    5.         at backtype.storm.utils.LocalState.snapshot(LocalState.java:28)  
    6.         at backtype.storm.utils.LocalState.get(LocalState.java:39)  
    7.         at backtype.storm.daemon.supervisor$sync_processes.invoke(supervisor.clj:187)  
    8.         at clojure.lang.AFn.applyToHelper(AFn.java:161)  
    9.         at clojure.lang.AFn.applyTo(AFn.java:151)  
    10.         at clojure.core$apply.invoke(core.clj:603)  
    11.         at clojure.core$partial$fn__4070.doInvoke(core.clj:2343)  
    12.         at clojure.lang.RestFn.invoke(RestFn.java:397)  
    13.         at backtype.storm.event$event_manager$fn__3058.invoke(event.clj:24)  
    14.         at clojure.lang.AFn.run(AFn.java:24)  
    15.         at java.lang.Thread.run(Thread.java:662)  
    16. Caused by: java.io.EOFException  
    17.         at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2284)  
    18.         at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2753)  
    19.         at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:777)  
    20.         at java.io.ObjectInputStream.<init>(ObjectInputStream.java:277)  
    21.         at backtype.storm.utils.Utils.deserialize(Utils.java:63)  
    22.         ... 11 more  
    23. 2013-09-24 09:15:45,260 INFO  [Thread-2] storm.util (NO_SOURCE_FILE:invoke(0)) - Halting process: ("Error when processing an event")  

 

解决办法:

删除storm.yaml中配置的storm.local.dir指向的目录中的supervisor和workers两个目录,再次启动即可。

 

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。