I'm running Storm 0.8.1. Every so often, Nimbus is crashing with the
following log entry.
It seems to be caused by file deletion error. Has anyone else faced this
issue?
(defn clean-inbox [dir-location seconds]
"Deletes jar files in dir older than seconds."
(let [now (current-time-secs)
pred #(and (.isFile %) (file-older-than? now seconds %))
files (filter pred (file-seq (File. dir-location)))]
(doseq [f files]
(if (.delete f)
(log-message "Cleaning inbox ... deleted: " (.getName f))
;; This should never happen
(log-error "Cleaning inbox ... error deleting: " (.getName f))
))))
2012-12-05 00:03:32 nimbus [ERROR] Error when processing event
java.lang.ClassCastException: java.lang.String cannot be cast to
java.lang.Throwable
at clojure.tools.logging$eval1$fn__7.invoke(NO_SOURCE_FILE:0)
at clojure.tools.logging.impl$fn__56$G__49__67.invoke(impl.clj:16)
at clojure.tools.logging$log_STAR_.invoke(logging.clj:59)
at backtype.storm.daemon.nimbus$clean_inbox.invoke(nimbus.clj:851)
at
backtype.storm.daemon.nimbus$fn__3589$exec_fn__1207__auto____3590$fn__3600.invoke(nimbus.clj:899)
at
backtype.storm.timer$schedule_recurring$this__1753.invoke(timer.clj:69)
at
backtype.storm.timer$mk_timer$fn__1736$fn__1737.invoke(timer.clj:33)
at backtype.storm.timer$mk_timer$fn__1736.invoke(timer.clj:26)
at clojure.lang.AFn.run(AFn.java:24)
at java.lang.Thread.run(Thread.java:662)
2012-12-05 00:03:32 util [INFO] Halting process: ("Error when processing an
event")