Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/28.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 尝试重新启动Monit时未找到守护进程_Ruby On Rails_Linux_Amazon Web Services_Ubuntu 14.04_Monit - Fatal编程技术网

Ruby on rails 尝试重新启动Monit时未找到守护进程

Ruby on rails 尝试重新启动Monit时未找到守护进程,ruby-on-rails,linux,amazon-web-services,ubuntu-14.04,monit,Ruby On Rails,Linux,Amazon Web Services,Ubuntu 14.04,Monit,状态不可用--monit守护进程未运行。当我使用命令monit quit时,我发现未找到任何守护进程。这适用于在AWS上运行的Rails应用程序 堆栈: AWS-Ubuntu 14.04.3 LTS 体系结构-x86_64 nginx/1.4.6 轨道4.1.12 独角兽-4.9.0 mysql2-0.3.18 根目录: set pidfile /tmp/monit.pid set idfile /tmp/.monit.id set statefile /tmp/.monit.state s

状态不可用--monit守护进程未运行。当我使用命令
monit quit
时,我发现
未找到任何守护进程
。这适用于在AWS上运行的Rails应用程序

堆栈:

  • AWS-Ubuntu 14.04.3 LTS
  • 体系结构-x86_64
  • nginx/1.4.6
  • 轨道4.1.12
  • 独角兽-4.9.0
  • mysql2-0.3.18
根目录:

set pidfile /tmp/monit.pid
set idfile /tmp/.monit.id
set statefile /tmp/.monit.state
set logfile /var/log/monit.log

set mailserver smtp.sendgrid.net
  port <Sendgrid Port>
  username <Sendgrid Username>
  password <Our Sendgrid Account Password>
  with timeout 30 seconds
  set mail-format {from: <Our Sendgrid Account>}
  set alert <Dev Email>
  set alert <Dev Email>

set httpd port <Our Monit Port>
 use address <Our IP Address>
 allow <Our NAT IP Address>
 allow admin:<Monit Password>

check process crond with pidfile /var/run/crond.pid
 start "/etc/init.d/cron start"
 stop "/etc/init.d/cron stop"
 group system

check process nginx with pidfile /run/nginx.pid
 start "/etc/init.d/nginx start"
 stop "/etc/init.d/nginx stop"
 group system

 check device rootfs with path /
if SPACE usage > 80% then alert

check device ebs_storage with path /mnt/ebs_storage
  if SPACE usage > 80% then alert

include /var/www/*/current/config/monit.conf
设置pidfile/tmp/monit.pid
设置idfile/tmp/.monit.id
设置statefile/tmp/.monit.state
设置logfile/var/log/monit.log
设置邮件服务器smtp.sendgrid.net
港口
用户名
密码
超时30秒
设置邮件格式{from:}
设置警报
设置警报
设置httpd端口
使用地址
容许
允许管理员:
使用pidfile/var/run/crond.pid检查进程crond
启动“/etc/init.d/cron启动”
停止“/etc/init.d/cron停止”
集团制
使用pidfile/run/nginx.pid检查进程nginx
启动“/etc/init.d/nginx启动”
停止“/etc/init.d/nginx停止”
集团制
使用路径检查设备rootfs/
如果空间使用率>80%,则发出警报
使用路径/mnt/ebs\u存储检查设备ebs\u存储
如果空间使用率>80%,则发出警报
include/var/www/*/current/config/monit.conf
在Deploy monit.conf中:

check process <Our App>_unicorn with pidfile /var/www/<Our App>/current/tmp/pids/unicorn.pid`
start "/etc/init.d/<Our App>_unicorn start"`
stop  "/etc/init.d/<Our App>_unicorn stop"`
group <Our App>`
check process <Our App>_delayed_job with pidfile /var/www/<Our App>/current/tmp/pids/delayed_job.pid`
start program = "/etc/init.d/<Our App>_delayed_job start"`
stop program = "/etc/init.d/<Our App>_delayed_job stop"`
 if mem is greater than 300.0 MB for 1 cycles then restart`
 if cpu is greater than 50% for 2 cycles then alert`
 if cpu is greater than 80% for 3 cycles then restart`
group <Our App>
用pidfile/var/www//current/tmp/pids/unicorn.pid检查流程` 开始“/etc/init.d//\u独角兽开始”` 停止“/etc/init.d//\u独角兽停止”` 团体` 使用pidfile/var/www//current/tmp/pids/delayed_job.pid检查进程_delayed_job` 启动程序=“/etc/init.d//\u延迟\u作业启动”` 停止程序=“/etc/init.d//\u延迟\u作业停止”` 如果mem在1个周期内大于300.0 MB,则重新启动` 如果cpu在2个周期内大于50%,则发出警报` 如果cpu在3个周期内大于80%,则重新启动` 团体 最初的开发人员直接从二进制文件设置Monit,并且没有使用“apt”来安装它。它同时出现在根用户和部署用户的
/usr/local/bin/monit
中。Rails应用程序和Monit一样运行良好,直到大约一周前。现在它不会重新启动进程或提醒我们。我意识到这是因为守护进程没有运行,但无法让它重新启动Monit-t返回
控制文件语法正常

首先,我没有设置这个,以前也没有设置过monit,所以我有点迷路了。Monit是由以前的开发人员从二进制文件安装到
/usr/local/bin/Monit
中的,并且没有使用apt。Rails应用程序运行良好,但由于其要求中的一些怪癖,有些事情超出了我们的控制,可能会导致应用程序崩溃。莫妮特在重启一切方面做得很好。然后突然,它停止了工作。当时我们的VPC有些东西正在改变,所以可能是这样。我不明白的是,无论我做什么,我都无法让守护进程重新启动。当我在deploy中执行
sudomonit-t
时,或者在root中执行
monit-t
时,控制文件语法正常。显示器似乎在正确的位置


我从来没有设置过Monit,所以我有点迷路了。我似乎无法让它重新启动,也无法确定这是配置问题还是其他问题。非常感谢您的指导。

有人评论说,我的路径中可能有monit的副本。他们的评论消失了。他们让我键入:
sudo/usr/local/bin/monit-t
我在deploy和root中这样做,它返回了控制文件语法OK。Monit是直接从二进制文件安装的,不使用apt,所以他们告诉我使用命令:
type-path monic
,它在root和deploy中返回/usr/local/bin/Monit。对帮助你的人表示歉意。我不知道我是否删除了你的评论或什么,但感谢你迄今为止的帮助。有人评论说,我的路径中可能有monit的副本。他们的评论消失了。他们让我键入:
sudo/usr/local/bin/monit-t
我在deploy和root中这样做,它返回了控制文件语法OK。Monit是直接从二进制文件安装的,不使用apt,所以他们告诉我使用命令:
type-path monic
,它在root和deploy中返回/usr/local/bin/Monit。对帮助你的人表示歉意。我不知道我是否删除了你的评论或什么,但感谢你迄今为止的帮助。