本文已参与「新人创作礼」活动,一起开启掘金创作之路。
azkaban 提交任务不执行直接失败
azkaban web 报错
ERROR [FlowTriggerScheduler] [Azkaban] Unable to get scheduled flow triggers 查看web下log
cat webServerLog_2020-11-27+18\:11\:24.out
报错信息:
2020/11/30 15:38:13.483 +0800 ERROR [FlowTriggerScheduler] [Azkaban] Unable to get scheduled flow triggers
java.lang.NullPointerException
at azkaban.flowtrigger.quartz.FlowTriggerScheduler.getScheduledFlowTriggerJobs(FlowTriggerScheduler.java:139)
at azkaban.webapp.servlet.FlowTriggerServlet.ajaxFetchTrigger(FlowTriggerServlet.java:67)
at azkaban.webapp.servlet.FlowTriggerServlet.handleAJAXAction(FlowTriggerServlet.java:107)
at azkaban.webapp.servlet.FlowTriggerServlet.handleGet(FlowTriggerServlet.java:57)
at azkaban.webapp.servlet.LoginAbstractAzkabanServlet.doGet(LoginAbstractAzkabanServlet.java:122)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
分析
原因是内存不足
解决
1.查看linux 内存情况
[root@localhost kafka_2.11-1.0.0]# free -h
total used free shared buff/cache available
Mem: 503G 25G 12G 30M 464G 475G
Swap: 29G 73M 29G
buff/cache 占用过高手动清理
[root@localhost internal]# sync
[root@localhost internal]# echo 1 > /proc/sys/vm/drop_caches
#查看清理后的内存情况
[root@localhost internal]# free -h
total used free shared buff/cache available
Mem: 503G 34G 467G 30M 1.8G 467G
Swap: 29G 73M 29G
参考这里手动清理centos7 buff/cache 占用过高
2.修改/bin/internal目录下internal-start-web.sh文件 第48行AZKABAN_OPTS由-Xmx3G修改为-Xmx1G
...
47 if [[ -z "$AZKABAN_OPTS" ]]; then
48 AZKABAN_OPTS="-Xmx1G"
...
重启azkaban问题解决
#之前先用ps命令获取web的pid,在使用kill -9 停止web进程
ps -aux|grep azkaban
kill -9 [pid]
#启动web
cd /usr/local/azkaban/azkaban-web-server
bin/start-web.sh
#重启exec
cd /usr/local/azkaban/azkaban-exec-server
bin/shutdown-exec.sh
bin/start-exec.sh