"Service dead but pid file exists"의 두 판 사이의 차이

잔글 (로봇: 자동으로 텍스트 교체 (-<source lang='dos'> +<source lang='cli'>))
잔글 (로봇: 자동으로 텍스트 교체 (-[root@jmnote +[root@zetawiki))
6번째 줄: 6번째 줄:
==문제상황==
==문제상황==
<source lang='cli'>
<source lang='cli'>
[root@jmnote ~]# service squid status
[root@zetawiki ~]# service squid status
squid dead but pid file exists
squid dead but pid file exists
</source>
</source>
<source lang='cli'>
<source lang='cli'>
[root@jmnote ~]# service squid stop
[root@zetawiki ~]# service squid stop
Stopping squid:                                            [FAILED]
Stopping squid:                                            [FAILED]
[root@jmnote ~]# service squid start
[root@zetawiki ~]# service squid start
Starting squid:                                            [  OK  ]
Starting squid:                                            [  OK  ]
[root@jmnote ~]# service squid stop
[root@zetawiki ~]# service squid stop
Stopping squid:                                            [FAILED]
Stopping squid:                                            [FAILED]
[root@jmnote ~]# service squid start
[root@zetawiki ~]# service squid start
Starting squid:                                            [  OK  ]
Starting squid:                                            [  OK  ]
[root@jmnote ~]#  
[root@zetawiki ~]#  
</source>
</source>
<source lang='cli'>
<source lang='cli'>
[root@jmnote ~]# ps -ef | grep squid | grep -v grep
[root@zetawiki ~]# ps -ef | grep squid | grep -v grep
[root@jmnote ~]#
[root@zetawiki ~]#
</source>
</source>


==확인 및 조치==
==확인 및 조치==
<source lang='cli'>
<source lang='cli'>
[root@jmnote ~]# ll /var/run/squid.pid  
[root@zetawiki ~]# ll /var/run/squid.pid  
-rw-r--r-- 1 root squid 5 Apr  4 22:56 /var/run/squid.pid
-rw-r--r-- 1 root squid 5 Apr  4 22:56 /var/run/squid.pid
</source>
</source>
<source lang='cli'>
<source lang='cli'>
[root@jmnote ~]# rm -f /var/run/squid.pid
[root@zetawiki ~]# rm -f /var/run/squid.pid
[root@jmnote ~]# ll /var/run/squid.pid
[root@zetawiki ~]# ll /var/run/squid.pid
ls: /var/run/squid.pid: No such file or directory
ls: /var/run/squid.pid: No such file or directory
</source>
</source>
:→ pid 파일을 삭제하였다.
:→ pid 파일을 삭제하였다.
<source lang='cli'>
<source lang='cli'>
[root@jmnote ~]# service squid status
[root@zetawiki ~]# service squid status
squid dead but subsys locked
squid dead but subsys locked
</source>
</source>
<source lang='cli'>
<source lang='cli'>
[root@jmnote ~]# ll /var/lock/subsys/squid  
[root@zetawiki ~]# ll /var/lock/subsys/squid  
-rw-r--r-- 1 root root 0 Apr  4 22:58 /var/lock/subsys/squid
-rw-r--r-- 1 root root 0 Apr  4 22:58 /var/lock/subsys/squid
</source>
</source>
:→ subsys lock 파일을 삭제해야 한다.
:→ subsys lock 파일을 삭제해야 한다.
<source lang='cli'>
<source lang='cli'>
[root@jmnote ~]# rm -f /var/lock/subsys/squid  
[root@zetawiki ~]# rm -f /var/lock/subsys/squid  
[root@jmnote ~]# service squid status
[root@zetawiki ~]# service squid status
squid is stopped
squid is stopped
</source>
</source>
<source lang='cli'>
<source lang='cli'>
[root@jmnote ~]# service squid start
[root@zetawiki ~]# service squid start
Starting squid: .                                          [  OK  ]
Starting squid: .                                          [  OK  ]
</source>
</source>
<source lang='cli'>
<source lang='cli'>
[root@jmnote ~]# ps -ef | grep squid | grep -v grep
[root@zetawiki ~]# ps -ef | grep squid | grep -v grep
root      7004    1  0 23:01 ?        00:00:00 squid -f /etc/squid/squid.conf
root      7004    1  0 23:01 ?        00:00:00 squid -f /etc/squid/squid.conf
</source>
</source>

2015년 2월 12일 (목) 01:20 판

1 개요

서비스 dead but pid file exists
서비스 dead but subsys locked
  • 서비스 데몬이 비정상적으로 종료되어, 실제 프로세스는 없는데 pid 파일만 남아있는 경우

2 문제상황

[root@zetawiki ~]# service squid status
squid dead but pid file exists
[root@zetawiki ~]# service squid stop
Stopping squid:                                            [FAILED]
[root@zetawiki ~]# service squid start
Starting squid:                                            [  OK  ]
[root@zetawiki ~]# service squid stop
Stopping squid:                                            [FAILED]
[root@zetawiki ~]# service squid start
Starting squid:                                            [  OK  ]
[root@zetawiki ~]#
[root@zetawiki ~]# ps -ef | grep squid | grep -v grep
[root@zetawiki ~]#

3 확인 및 조치

[root@zetawiki ~]# ll /var/run/squid.pid 
-rw-r--r-- 1 root squid 5 Apr  4 22:56 /var/run/squid.pid
[root@zetawiki ~]# rm -f /var/run/squid.pid
[root@zetawiki ~]# ll /var/run/squid.pid
ls: /var/run/squid.pid: No such file or directory
→ pid 파일을 삭제하였다.
[root@zetawiki ~]# service squid status
squid dead but subsys locked
[root@zetawiki ~]# ll /var/lock/subsys/squid 
-rw-r--r-- 1 root root 0 Apr  4 22:58 /var/lock/subsys/squid
→ subsys lock 파일을 삭제해야 한다.
[root@zetawiki ~]# rm -f /var/lock/subsys/squid 
[root@zetawiki ~]# service squid status
squid is stopped
[root@zetawiki ~]# service squid start
Starting squid: .                                          [  OK  ]
[root@zetawiki ~]# ps -ef | grep squid | grep -v grep
root      7004     1  0 23:01 ?        00:00:00 squid -f /etc/squid/squid.conf

4 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}