加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

linux – 安装monit后我做monit状态myproc我得到“错误连接到mon

发布时间:2020-12-13 18:12:43 所属栏目:Linux 来源:网络整理
导读:安装monit后我做monit status myproc我得到“错误连接到monit守护进程” 我读到了某个地方 The status command won’t work in the case that monit is running indaemon mode without its http support – the command ‘monit status’ in such case tries
安装monit后我做monit status myproc我得到“错误连接到monit守护进程”

我读到了某个地方

The status command won’t work in the
case that monit is running indaemon
mode without its http support – the
command ‘monit status’ in such case
tries to get the status from the
daemon via http/tcp. To start the http
interface you need to add the ‘set
httpd …’ statement to
theconfiguration.

这还是正确的吗?该帖子来自2005年

解决方法

我正努力在我的ubuntu服务器上设置monit,这里有几件事要检查:

>确保在/ etc / default / monit中设置startup = 1
>确保取消注释/ etc / monit / monitrc中的httpd参数

/ etc / monit / monitrc中的最后一个“gotcha”:

set daemon  120           # check services at 2-minute intervals
#  with start delay 240  # optional: delay the first check by 4-minutes (by
#                           # default Monit check immediately after Monit start)

我首先没有注释“启动延迟240”行.如果使用此选项,httpd服务器似乎不会立即启动.我花了一段时间才意识到为什么monit正在运行但是httpd服务器没有运行.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读