注意:在spark执行组件之前抛出了此错误。
日志
工人节点1:
17/05/18 23:12:52 INFO Worker: Successfully registered with master spark://spark-master-1.com:7077
17/05/18 23:58:41 ERROR Worker: RECEIVED SIGNAL 15: SIGTERM
主节点:
17/05/18 23:12:52 INFO Master: Registering worker spark-worker-1com:56056 with 2 cores, 14.5 GB RAM
17/05/18 23:14:20 INFO Master: Registering worker spark-worker-2.com:53986 with 2 cores, 14.5 GB RAM
17/05/18 23:59:42 WARN Master: Removing spark-worker-1com-56056 because we got no heartbeat in 60 seconds
17/05/18 23:59:42 INFO Master: Removing spark-worker-2.com:56056
17/05/19 00:00:03 ERROR Master: RECEIVED SIGNAL 15: SIGTERM
工作人员节点2:
17/05/18 23:14:20 INFO Worker: Successfully registered with master spark://spark-master-node-2.com:7077
17/05/18 23:59:40 ERROR Worker: RECEIVED SIGNAL 15: SIGTERM
答案 0 :(得分:1)
TL; DR 我认为有人明确调用了kill
命令或sbin/stop-worker.sh
。
"收到的信号15:SIGTERM" shutdown hook报告在类UNIX系统上记录TERM
,HUP
,INT
信号:
/** Register a signal handler to log signals on UNIX-like systems. */
def registerLogger(log: Logger): Unit = synchronized {
if (!loggerRegistered) {
Seq("TERM", "HUP", "INT").foreach { sig =>
SignalUtils.register(sig) {
log.error("RECEIVED SIGNAL " + sig)
false
}
}
loggerRegistered = true
}
}
在您的情况下,这意味着该过程收到SIGTERM以阻止自己:
SIGTERM信号是用于导致程序终止的通用信号。与SIGKILL不同,此信号可以被阻止,处理和忽略。这是礼貌地要求程序终止的正常方式。
执行KILL
或使用./sbin/stop-master.sh
或./sbin/stop-worker.sh
shell脚本时发送的内容,而这些脚本依次使用sbin/spark-daemon.sh
命令调用stop
那kills a JVM process for a master or a worker:
kill "$TARGET_ID" && rm -f "$pid"