我希望在容器中使用monit来安排一些脚本按计划执行,但是无法启动它。我已经将/etc/init.d/monit start添加到容器的开始文件中,但仍然无法启动它。我得到的是:
root@ee48c7f:/# monit -t
Control file syntax OK
root@ee48c7f:/# /etc/init.d/monit start
* Starting daemon monitor monit [ OK ]
root@ee48c7f:/# /etc/init.d/monit status
* monit is not running
root@ee48c7f:/# ps ax | grep monit
18065 pts/1 S+ 0:00 grep --color=auto monit
root@ee48c7f:/# 容器基于Ubuntu xenial image。我不知道我怎么能找出为什么它不启动和继续运行。dmesg似乎没有给出任何提示。有一个/var/log/monit.log,但它是和保持0B。
发布于 2020-09-14 12:17:21
我至少需要添加
start daemon 30命令到/etc/monit/monitrc以使其正确启动。
https://askubuntu.com/questions/1274933
复制相似问题