- 论坛徽章:
- 0
|
/usr/local/keepalived/etc/keepalived/chk_alive.sh脚本内容,是不是脚本在interval 1内执行不完,然后下一秒又要去执行脚本,造成重复运行,然后keepalived内置的子线程检查函数报的错呢?我的就是这个原因。
255 int
256 misc_check_child_timeout_thread(thread_t * thread)
257 {
258 pid_t pid;
259
260 if (thread->type != THREAD_CHILD_TIMEOUT)
261 return 0;
262
263 /* OK, it still hasn't exited. Now really kill it off. */
264 pid = THREAD_CHILD_PID(thread);
265 if (kill(pid, SIGKILL) < 0) {
266 /* Its possible it finished while we're handing this */
267 if (errno != ESRCH)
268 DBG("kill error: %s", strerror(errno));
269 return 0;
270 }
271
272 log_message(LOG_WARNING, "Process [%d] didn't respond to SIGTERM", pid);
273 waitpid(pid, NULL, 0);
274
275 return 0;
276 } |
|