此服务器曾经是Oracle RAC,改做Mongodb之后日志中频繁出现autorun file for ohasd is missing的错误日志。
![](https://danteng.org/wp-content/uploads/2020/03/1584505263023.png)
查看/var/log/messages,确定日志是输出到这里的。
![](https://danteng.org/wp-content/uploads/2020/03/1584505263032.png)
查看rsyslog.conf配置文件,确定是rsyslog将/var/log/messages中的日志输出到ELK中。
![](https://danteng.org/wp-content/uploads/2020/03/1584505263038.png)
经搜索,发现Oracle RAC有ohasd进程正在运行。
![](https://danteng.org/wp-content/uploads/2020/03/1584505263046.png)
kill -9杀掉此进程,发现进程又被启动。
![](https://danteng.org/wp-content/uploads/2020/03/1584505263048.png)
查看日志发现进程是被init.d进程启动。
![](https://danteng.org/wp-content/uploads/2020/03/1584505263051.png)
查看/etc/init/oracle-ohasd.conf配置,确定有respawn守护配置。
![](https://danteng.org/wp-content/uploads/2020/03/1584505263054.png)
查看init.d守护的进程信息,有oracle-ohasd配置。至此确定进程是被init.d守护,不能使用杀进程的方法。
initctl list |grep ohasd
![](https://danteng.org/wp-content/uploads/2020/03/1584505263057.png)
关闭init.d守护
initctl stop oracle-ohasd
![](https://danteng.org/wp-content/uploads/2020/03/1584505263058.png)
进程已经消失
![](https://danteng.org/wp-content/uploads/2020/03/1584505263060.png)
/var/log/messages中已经出现杀死oracle-ohasd进程的日志。
![](https://danteng.org/wp-content/uploads/2020/03/1584505263063.png)
此后autorun file for ohasd is missing日志没再出现。
本文链接地址: https://danteng.org/how-to-solve-linux-process-kill-autorun-file-for-ohasd-is-missing-report/