AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 865188
Accepted
Andrew Newby
Andrew Newby
Asked: 2017-07-26 23:58:14 +0800 CST2017-07-26 23:58:14 +0800 CST 2017-07-26 23:58:14 +0800 CST

使用 Monit 在 Ubuntu 16.0.4 上监控 solr 服务

  • 772

我试图弄清楚为什么我的 Monit ( https://mmonit.com/monit/ ) 似乎不想监视我的 Solr 服务。我已经为其余的服务工作了:

在此处输入图像描述

但由于某种原因,Solr 不想正确监控。

我按照这里的例子:

https://www.webfoobar.com/node/61

对于我的服务器,我对其进行了一些调整,因此服务是正确的,还有一些路径:

## Solr monitoring.

## Test the solr service.
check process solr with pidfile /var/solr/solr-8983.pid
  group solr
  start program = "/etc/init.d/solr start"
  stop  program = "/etc/init.d/solr stop"
  restart program  = "/etc/init.d/solr restart"
  if failed port 8983 then restart
  if 3 restarts within 5 cycles then timeout
  depends on solr_bin
  depends on solr_init

## Test the process binary.
check file solr_bin with path /opt/solr/bin/solr
  group root
  if failed checksum then unmonitor
  if failed permission 755 then unmonitor
  if failed uid root then unmonitor
  if failed gid root then unmonitor

## Test the init scripts.
check file solr_init with path /etc/init.d/solr
  group root
  if failed checksum then unmonitor
  if failed permission 744 then unmonitor
  if failed uid root then unmonitor
  if failed gid root then unmonitor

检查语法一切正常:

  monit -t
/etc/monit/monitrc:295: Include failed -- Success '/etc/monit/conf.d/*'
Control file syntax OK

关于我可以尝试什么的任何其他建议?

更新:我真的不明白为什么这不起作用。所有权限和文件似乎都存在,并且设置正确:

root@admin:/etc/init.d# ls -l /var/solr/solr-8983.pid
-rw-rw-r-- 1 solr solr 6 Jul 28 05:41 /var/solr/solr-8983.pid


root@admin:/etc/init.d# ls -l /etc/init.d | grep solr
-rwxr--r-- 1 root root 2711 Jul 25 13:25 solr

root@admin:/etc/init.d# ls -l /opt/solr/bin/ | grep solr
-rwxr-xr-x 1 root root 12694 May 29 22:36 install_solr_service.sh
-rwxr-xr-x 1 root root  1255 Mar  9 20:00 oom_solr.sh
-rwxr-xr-x 1 root root 72389 May 30 00:25 solr
-rwxr-xr-x 1 root root 66010 May 30 00:25 solr.cmd
-rwxr-xr-x 1 root root  6204 May 30 00:25 solr.in.cmd.orig
-rwxr-xr-x 1 root root  6950 May 30 00:25 solr.in.sh.orig

更新 2:重新启动 Monit 时,我在monit.log中得到了这个:

[UTC Jul 28 10:22:45] info     : Shutting down Monit HTTP server
[UTC Jul 28 10:22:45] info     : Monit HTTP server stopped
[UTC Jul 28 10:22:45] info     : Monit daemon with pid [26662] stopped
[UTC Jul 28 10:22:45] info     : 'admin.steampunkjunkies.com' Monit 5.16 stopped
[UTC Jul 28 10:22:45] info     : Starting Monit 5.16 daemon with http interface at [213.219.38.44]:2812
[UTC Jul 28 10:22:45] info     : Starting Monit HTTP server at [213.219.38.44]:2812
[UTC Jul 28 10:22:45] info     : Monit HTTP server started
[UTC Jul 28 10:22:45] info     : 'admin.steampunkjunkies.com' Monit 5.16 started
ubuntu-16.04
  • 1 1 个回答
  • 1002 Views

1 个回答

  • Voted
  1. Best Answer
    DevOps
    2017-07-27T15:07:11+08:002017-07-27T15:07:11+08:00

    您的/opt/solr/bin/solr文件存在问题,导致它成为unmonitor。有了依赖关系,该过程也不受监控。检查solr_bin的权限、所有权等

    在某些时候,solr_bin存在问题,导致它不受监控,并且由于依赖关系,solr 进程也不受监控。使用or更新校验和后,您必须手动监控solr_bin并通过 UI 或从 Monit 命令请求进行处理。当某些东西不受监控时,它不会自动回到监控状态。您必须明确提出要求。monit reloadservice monit restart

    • 2

相关问题

  • Ubuntu 服务器 16 LTS 没有 USB 2.0

  • 在 ubuntu 16.04 上创建守护进程

  • 分析docker容器的内存和cpu峰值

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve