storm supervisor exits when processing event

1.3k views Asked by At

when i start the supervisor by issuing bin/storm supervisor it exits. The logs are with

2015-06-12T02:28:27.811-0700 b.s.event [ERROR] Error when processing event
java.lang.NoSuchMethodError: org.apache.commons.io.FileUtils.moveDirectory(Ljava/io/File;Ljava/io/File;)V
at backtype.storm.daemon.supervisor$fn__7480.invoke(supervisor.clj:489) ~[storm-core-0.9.5.jar:0.9.5]
at clojure.lang.MultiFn.invoke(MultiFn.java:241) ~[clojure-1.5.1.jar:na]
at backtype.storm.daemon.supervisor$mk_synchronize_supervisor$this__7400.invoke(supervisor.clj:374) ~[storm-core-0.9.5.jar:0.9.5]
at backtype.storm.event$event_manager$fn__2625.invoke(event.clj:40) ~[storm-core-0.9.5.jar:0.9.5]
at clojure.lang.AFn.run(AFn.java:24) [clojure-1.5.1.jar:na]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_79]
2015-06-12T02:28:27.834-0700 b.s.util [ERROR] Halting process: ("Error when processing an event")
java.lang.RuntimeException: ("Error when processing an event")
at backtype.storm.util$exit_process_BANG_.doInvoke(util.clj:325) [storm-core-0.9.5.jar:0.9.5]
at clojure.lang.RestFn.invoke(RestFn.java:423) [clojure-1.5.1.jar:na]
at backtype.storm.event$event_manager$fn__2625.invoke(event.clj:48) [storm-core-0.9.5.jar:0.9.5]
at clojure.lang.AFn.run(AFn.java:24) [clojure-1.5.1.jar:na]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_79]

my storm.yaml has a basic configuration of

storm.zookeeper.servers: 
- "127.0.0.1"
storm.local.dir: "/mnt/storm"
nimbus.host: "127.0.0.1"
supervisor.slots.ports: 
- 6700

It starts fine until the spout receives a message.

2

There are 2 answers

3
Jungtaek Lim On BEST ANSWER

It looks like classpath of Storm doesn't include Apache commons-io v2.4 or wrong version.

Please check

bin/storm classpath

to confirm classpath contains commons-io, and its version is 2.4. If it contains different version, you need to check manually (by javadoc) that it contains

public static void moveDirectory(File srcDir, File destDir) throws IOException

You can refer https://github.com/apache/storm/blob/v0.9.5/bin/storm#L101-L105 to how classpath is made.

1
Ilya Lapitan On

It looks like org.apache.commons.io.FileUtils class is missed. You should create a jar containing your code and all the dependencies of your code (except for Storm - the Storm jars will be added to the classpath on the worker nodes). Please, see more details how to run topology in the remote mode (in cluster) by link: https://storm.apache.org/documentation/Running-topologies-on-a-production-cluster.html