【问题标题】:How can I stop a server service in circus?如何停止马戏团中的服务器服务?
【发布时间】:2014-12-16 18:40:17
【问题描述】:

有人知道如何关闭马戏团的服务吗?我可以使用这条线启动服务

 cmd =  /sbin/service mysqld restart

但显然,当我关闭 circusctl 中的观察程序时,服务仍在运行

 [root@devel1 bin]# service mysqld status
 mysqld (pid  7571) is running...
 [root@devel1 bin]# circusctl
 circusctl 0.11.1
 circusd-stats: active
 hello: active
 httpd: active
 mysql: active
 plugin:myplugin: active
 webapp: stopped
 (circusctl) stop mysql
 ok
 (circusctl)
 [root@devel1 bin]# service mysqld status
 mysqld (pid  8342) is running...
 [root@devel1 bin]#

这是我的 circus.ini 文件。

 [circus]
 statsd = True
 httpd_host = 127.0.0.1
 httpd_port = 8080
 endpoint = tcp://127.0.0.1:5555

 [watcher:webapp]
 cmd = bin/chaussette --fd $(circus.sockets.web)
 numprocesses = 3
 use_sockets = True

 [watcher:hello]
 cmd = php /home/joseph/php/helloworld.php --fd $(circus.sockets.web)
 numprocess = 2
 use_sockets = True
 stdout_stream.filename = /home/joseph/test.log

 [watcher:mysql]
 cmd =  /sbin/service mysqld restart
 numprocess = 1
 stdout_stream.filename = /tmp/circus.log

 [watcher:httpd]
 cmd =  /sbin/service httpd $(circus.env.shell)
 numprocess = 1
 stdout_stream.filename = /tmp/circus.log

 [socket:web]
 host = 127.0.0.1
 port = 8888

【问题讨论】:

标签: python service circusd


【解决方案1】:

您看到的是/sbin/service 的结果,因为它妖魔化了mysql 进程。

如果您希望circus 管理该进程,那么您需要将进程undaemonised 处理为circus

换行运行实际mysql进程::

cmd =  /sbin/service mysqld restart

【讨论】:

    猜你喜欢
    • 2014-02-26
    • 1970-01-01
    • 2014-12-15
    • 2012-02-27
    • 2017-06-14
    • 2011-10-18
    • 2014-01-04
    • 2021-08-09
    • 2019-08-05
    相关资源
    最近更新 更多