异常导致 Storm Worker 重启
程序员文章站
2022-06-26 19:47:57
...
spout一直报错导致worker重启
2016-10-25 14:00:12 STDIO [ERROR] at com.mysql.jdbc.Util.getInstance(Util.java:386) 2016-10-25 14:00:12 STDIO [ERROR] at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1015) 2016-10-25 14:00:12 STDIO [ERROR] at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:989) 2016-10-25 14:00:12 STDIO [ERROR] at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:975) 2016-10-25 14:00:12 STDIO [ERROR] at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1112) 2016-10-25 14:00:12 STDIO [ERROR] at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2486) 2016-10-25 14:00:12 STDIO [ERROR] at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2327) 2016-10-25 14:00:12 STDIO [ERROR] ... 21 more 2016-10-25 14:00:12 b.s.util [ERROR] Async loop died! java.lang.NullPointerException: null at com.javagc.util.JdbcUtil.executeQuerySql(JdbcUtil.java:85) ~[stormjar.jar:na] at com.javagc.cache.LiveInfoCache.refreshjavagcLiveInfoMap(LiveInfoCache.java:27) ~[stormjar.jar:na] at com.javagc.cache.LiveInfoCache.getjavagcLiveInfoByScreenID(LiveInfoCache.java:88) ~[stormjar.jar:na] at com.javagc.bean.SLiveSuep.parseLog(SLiveSuep.java:63) ~[stormjar.jar:na] at com.javagc.spout.SLiveSuepSpout.nextTuple(SLiveSuepSpout.java:37) ~[stormjar.jar:na] at backtype.storm.daemon.executor$fn__6579$fn__6594$fn__6623.invoke(executor.clj:565) ~[storm-core-0.9.5.jar:0.9.5] at backtype.storm.util$async_loop$fn__459.invoke(util.clj:463) ~[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_76] 2016-10-25 14:00:12 b.s.d.executor [ERROR] java.lang.NullPointerException: null at com.javagc.util.JdbcUtil.executeQuerySql(JdbcUtil.java:85) ~[stormjar.jar:na] at com.javagc.cache.LiveInfoCache.refreshjavagcLiveInfoMap(LiveInfoCache.java:27) ~[stormjar.jar:na] at com.javagc.cache.LiveInfoCache.getjavagcLiveInfoByScreenID(LiveInfoCache.java:88) ~[stormjar.jar:na] at com.javagc.bean.SLiveSuep.parseLog(SLiveSuep.java:63) ~[stormjar.jar:na] at com.javagc.spout.SLiveSuepSpout.nextTuple(SLiveSuepSpout.java:37) ~[stormjar.jar:na] at backtype.storm.daemon.executor$fn__6579$fn__6594$fn__6623.invoke(executor.clj:565) ~[storm-core-0.9.5.jar:0.9.5] at backtype.storm.util$async_loop$fn__459.invoke(util.clj:463) ~[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_76] 2016-10-25 14:00:12 b.s.util [ERROR] Halting process: ("Worker died") java.lang.RuntimeException: ("Worker died") 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.daemon.worker$fn__7028$fn__7029.invoke(worker.clj:497) [storm-core-0.9.5.jar:0.9.5] at backtype.storm.daemon.executor$mk_executor_data$fn__6480$fn__6481.invoke(executor.clj:240) [storm-core-0.9.5.jar:0.9.5] at backtype.storm.util$async_loop$fn__459.invoke(util.clj:473) [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_76] 2016-10-25 14:00:12 b.s.d.worker [INFO] Shutting down worker zhiboyaha_analyst-291-1477292001 33adcdcf-e32f-424c-bb1d-d11c56eca3c4 5
重启分析
spout执行线程无法处理nextTuple方法抛出来的异常,这时认为worker已经不能正常工作,通过重启【飘移】worker解决。
spout数据处理
bolt数据处理
参考资料
http://www.cnblogs.com/fxjwind/p/3238648.html
上一篇: 用Yii框架实现AR类自动记录日志