만들 수 없습니다 httpd.pid 원인MONIT는이 솔루션이 줄 교체했다
check process httpd with pidfile /var/run/httpd/httpd.pid
을 그리고 나는 또한 '그룹 아파치를'제거.
원본 게시물 :
아파치 (아파치) 서비스에 대한 경고를에 CentOS에 Monit를 설치하고 설정 한 후, 서비스는 더 이상 /var/run/httpd.pid 파일을 생성하지 않습니다.
httpd 서비스 이 제대로 실행 중입니다. 실행은 '다시 시작'이후, 그것을 죽이고, 당연히 이러한 서비스를 다시 시작하는 유일한 방법을
실패 :이 충분하지 있다면, MONIT이 같은 서비스의 상태를보고로 그 위에 , 스크립트에 실행중인 프로세스가 표시되지 않습니다. "서비스 아파치를 다시 시작"의set daemon 10
set logfile syslog facility log_daemon
set mailserver localhost
set mail-format { from: [email protected] }
set alert [email protected]
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]
이
은 /etc/monit.d/monitrc 파일의 내용입니다.
"monit restart httpd"가 아닙니까? "monit stop httpd"및 "monit start httpd"는 어떻습니까? monit은 sshd를 중지/시작/다시 시작합니까? –
감사합니다. 다시 시작할 때 중지, Monit to httpd로 시작하면 메시지가 표시되지 않습니다. 그러나 서비스는 중단되지 않습니다. 내 컴퓨터에서 나를 빠져 나올 수 있기 때문에 sshd를 중지하려고 할 수 없습니다 .-) – bizna
여기에있는 조언을 사용해보십시오. http://stackoverflow.com/questions/3356476/debugging-monit/4439403#4439403 monit 호출이 중지되면 무슨 일이 일어나는지 더 잘 보아라. monitrc의 stop 명령은 명령 행에서 호출 할 때 작동한다고 가정합니다. "monit restart sshd"정보; 나는 여전히 그것을 정신 건강 검사로 시도하는 것이 좋습니다.어떻게 작동하지 않을지라도 컴퓨터에 어떻게 든 돌아갈 수 있습니다 :-) –