bluepill没有检测流程都有,其实,成功启动,所以创建新的 [英] bluepill not detecting that processes have, in fact, started successfully, and so creates new ones

查看:215
本文介绍了bluepill没有检测流程都有,其实,成功启动,所以创建新的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个(EC2)的Ubuntu服务器的 bluepill 是工作得很好,开始与监测 resque 进程(并已在过去的其他节点)这样做。

我设立一个新的节点,出于某种原因,在这个节点上 bluepill 无法识别的过程已经开始,并正在运行,所以不断创造新的。我对什么导致这种莫名其妙一点。在2个节点几乎是相同的;他们是由同一个厨师脚本配置的两个EC2服务器。的确,一个没有工作是生产和其他'分期',但有几乎没有差别,由于这一点。

任何想法或之前,我用叉子叉GitHub的项目,开始插入更多的监控,试图找出发生了什么事情的建议?有许多人讨论这个名单上,在过去大约麻烦瓦特/ bluepill resque ,但正如我所说,这是工作精我在临时服务器上,并能正常工作在早期生产服务器(虽然我会注意到,这个新的生产服务器是红宝石1.9.3(VS 1.9.2)和导轨3.2(相对于3.1))。

下面是我的 .pill 文件(或者更确切地说,我的厨师食谱的模板文件):

  ENV [RAILS_ENV] =<%= node.chef_environment%>中
ENV [队列] =*

Bluepill.application(zmx_app)做|应用程序|
  app.working_dir =/ SRV / ZMX /电流
  app.uid =根
  app.gid =根
  2.times做|我|
    app.process(resque  - #{我})做|工艺|
      process.group =resque
      process.start_command =耙resque:作品
      process.pid_file =/srv/zmx/current/tmp/pids/resque_workers-#{i}.pid
      process.stop_command =杀-QUIT {{PID}}
      process.daemonize =真
    结束
  结束
结束
 

解决方案

这竟然是在bluepill的错误,我已经分叉,固定和的提交pull请求

和我不知道为什么我没有意识到有,事实上,我的两个环境之间的差异:分期/旧督促是在bluepill 0.0.55,我的新的生产环境上0.0.58

I have one (EC2) Ubuntu server where bluepill is working just fine to start and monitoring resque processes (and it has done so on other nodes in the past).

I'm setting up a new node, and for some reason on this node bluepill does not recognize that the processes have started and are running, and so keeps creating new ones. I'm a little baffled by what's causing this. The 2 nodes are almost identical; they're both EC2 servers provisioned by the same chef scripts. It is true that the one not working is 'production' and the other 'staging', but there's almost no difference due to that.

Any thoughts or suggestions before I fork the github project and start inserting more monitoring, to try and figure out what's going on? There's been discussion on this list in the past about troubles w/ bluepill and resque, but as I said this is working fine on my staging server, and has worked fine on earlier production servers (although I will note that this new production server is ruby 1.9.3 (vs 1.9.2) and rails 3.2 (vs. 3.1)).

Here's my .pill file (or more specifically, my chef cookbook's template file):

ENV["RAILS_ENV"] = "<%= node.chef_environment %>"
ENV["QUEUE"] = "*"

Bluepill.application("zmx_app") do |app|
  app.working_dir = "/srv/zmx/current"
  app.uid = "root"
  app.gid = "root"
  2.times do |i|
    app.process("resque-#{i}") do |process|
      process.group = "resque"
      process.start_command = "rake resque:work"
      process.pid_file = "/srv/zmx/current/tmp/pids/resque_workers-#{i}.pid"
      process.stop_command = "kill -QUIT {{PID}}"
      process.daemonize = true
    end
  end
end

解决方案

This turned out to be a bug in bluepill, which I have forked, fixed, and submitted a pull request.

And I'm not sure why I didn't realize that there was, in fact, a difference between my two environments: staging/old prod was on bluepill 0.0.55, my new production environment on 0.0.58.

这篇关于bluepill没有检测流程都有,其实,成功启动,所以创建新的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆