English 中文(简体)
Monit on CentOS causes httpd. 不制造
原标题:Monit on CentOS causes httpd.pid not to be created

解决办法是替换这一行文:

check process apache with pidfile /var/run/httpd.pid

加入:

check process httpd with pidfile /var/run/httpd/httpd.pid

我也删除了这批人。

Original post:

After installing Monit on CentOS, and setting an alert for the Apache (httpd) service, the service no longer creates the /var/run/httpd.pid file.

http://strong>。

其中,莫伊特人报告说,该服务状况如下:处决失败

当然,重新启动这种服务的唯一途径是杀害它,因为重新启用的文字看不到任何运行过程。

这些是/etc/monit.d/monitrc档案的内容:

set daemon  10
set logfile syslog facility log_daemon
set mailserver localhost
set mail-format { from: me@server.com }
set alert bugs@server.com
set httpd port 2812 and
#     SSL ENABLE
#     PEMFILE  /var/certs/monit.pem
allow user:password

check process apache with pidfile /var/run/httpd.pid
group apache
start program = "/etc/init.d/httpd start"
stop program  = "/etc/init.d/httpd stop"
if cpu is greater than 180% for 1 cycles then alert
if totalmem > 1200 MB for 2 cycles then restart
if children > 250 then restart

check process sshd with pidfile /var/run/sshd.pid
start program "/etc/init.d/sshd start"
stop program "/etc/init.d/sshd stop"
if failed port 22 protocol ssh for 5 cycles then restart
if 5 restarts within 25 cycles then timeout

“现役重启”的产出:

Stopping httpd:                                            [FAILED]
Starting httpd: (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
                                                       [FAILED]

任何帮助都将受到高度赞赏。

问题回答

以<代码>/usr/sbin/httpd-k end取代中途节目。 它为我工作。

我有同样的问题,但<代码>/usr/sbin/httpd -k end。 看来没有帮助,因为这项工作仍然试图从假档案中审查这一进程。

我选择了<代码>上的障碍方案 = “/usr/bin/ricall httpd”。 我不认为这是非常荒谬的(很可能是杀害公开请求),但这是我能够找到的唯一办法,可以重新启用藏匿点,并用马尼特重新开立假。

我认为,马尼特人正在按停工地重新开始工作;在开始新程序之前,开始并且没有等待停工,从而在不适当的时候删除假档案。 至少,我是在坚持这一切之后得出结论的。

I found a reference to someone who fixed this issue by making monit sleep after the stop statement.

从个人角度来说,我发现,用“https”服务器倒闭的开端取代重新启用。





相关问题
Using SimplePie with CodeIgniter and XAMPP

I am using CodeIgniter 1.7.2 with XAMPP 1.7.2 on a Windows computer. I am trying to make use of SimplePie. I followed all the instructions I could find: a copy of simplepie.inc is in my applications/...

Multiple Sites with common files

I have developed over 50 sites that all use the exact same files other than CSS and IMAGES, I currently duplicate the files each time I create a new site and upload different css and images. What ...

http server validation

I finish a litle http server, writing from scratch. I would like to be sure that my imlementation is conforme to the HTTP specifications. W3C give us tools for HTML/XML conformance, but i see nothing ...

热门标签