Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

control脚本bug导致agent无法启动 #53

Open
missuzhang opened this issue May 17, 2016 · 2 comments
Open

control脚本bug导致agent无法启动 #53

missuzhang opened this issue May 17, 2016 · 2 comments

Comments

@missuzhang
Copy link
Contributor

missuzhang commented May 17, 2016

这是一个bug,所有模块的control脚本都存在相同的问题。
发现过程:机器掉电后,有些agent没有开机自启动。
问题分析:
control脚本的 check_pid方法只检查进程id是否存,存在则只在控制台输出falcon-agent now is running already, pid=xxx(开机的时候根本不会有人注意到)
当机器意外关机时,var/app.pid文件中残留之前的pid进程号。
开机时其他进程使用了这个进程号,导致check_pid方法返回running,start直接终止,并且不会有任何日志输出。
修改建议:
可以参考/etc/rc.d/init.d/functions中对pid的处理,不仅检查进程id是否存在,还会查看basedir。
补充一个最简单的复现方式:
kill掉agent
echo '1' > var/app.pid
然后就会发现,agent起不来了。

@soarpenguin
Copy link

修复版本 6e5f820

@hitripod
Copy link

PR #54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants