'restart error'에 해당되는 글 1건

  1. apache 웹서버 재시작(restart)가 안된다 1

apache 웹서버 재시작(restart)가 안된다

우씨~ apache(httpd)가 갑자기 실행이 안된다......
별로 한것도 없는데.. 

[root@test119 ~]# systemctl start httpd
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
[root@test119 ~]# systemctl status httpd
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since 목 2021-11-25 10:23:58 KST; 20s ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 7536 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
  Process: 32225 ExecReload=/usr/sbin/httpd $OPTIONS -k graceful (code=exited, status=0/SUCCESS)
  Process: 7523 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 7523 (code=exited, status=1/FAILURE)

11월 25 10:23:58 test119 systemd[1]: Starting The Apache HTTP Server...
11월 25 10:23:58 test119 systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
11월 25 10:23:58 test119 kill[7536]: kill: cannot find process ""
11월 25 10:23:58 test119 systemd[1]: httpd.service: control process exited, code=exited status=1
11월 25 10:23:58 test119 systemd[1]: Failed to start The Apache HTTP Server.
11월 25 10:23:58 test119 systemd[1]: Unit httpd.service entered failed state.
11월 25 10:23:58 test119 systemd[1]: httpd.service failed.


config파일들 syntex는 이상없는데..
ssl인증서 기간도 남아 있는데.. 
이것저것 구글링을 하다 보니, 에러로그를 확인해보라고 한다.
내가 아는 에러로그는 apache(httpd) 실행중에 생기는 문제를 기록하는것으로 아는데...
apache가 실행되면서도 잠깐이지만 바로 로그를 기록하는듯... 암튼.
로그를 확인해보니, 

[root@test119 conf.d]# tail /var/log/httpd/error_log
AH00016: Configuration Failed
[Thu Nov 25 10:23:58.816796 2021] [suexec:notice] [pid 7523] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Nov 25 10:23:58.817714 2021] [core:emerg] [pid 7523] (28)No space left on device: AH00023: Couldn't create the ssl-cache mutex
AH00016: Configuration Failed
[Thu Nov 25 10:28:10.437030 2021] [suexec:notice] [pid 7634] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Nov 25 10:28:10.459085 2021] [core:emerg] [pid 7634] (28)No space left on device: AH00023: Couldn't create the rewrite-map mutex
[Thu Nov 25 10:28:10.459102 2021] [:emerg] [pid 7634] AH00020: Configuration Failed, exiting
[Thu Nov 25 10:29:02.522577 2021] [suexec:notice] [pid 7684] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Nov 25 10:29:02.544507 2021] [core:emerg] [pid 7684] (28)No space left on device: AH00023: Couldn't create the rewrite-map mutex
[Thu Nov 25 10:29:02.544526 2021] [:emerg] [pid 7684] AH00020: Configuration Failed, exiting

첨 보는 에러로그다. 
No space left on device: AH00023 ...... 이거 공간이 부족한가?

[root@test119 conf.d]# df
Filesystem           1K-blocks      Used  Available Use% Mounted on
/dev/mapper/cl-root 1942918240 179468112 1763450128  10% /
devtmpfs               4021816         0    4021816   0% /dev
tmpfs                  4037988         0    4037988   0% /dev/shm
tmpfs                  4037988    189684    3848304   5% /run
tmpfs                  4037988         0    4037988   0% /sys/fs/cgroup
tmpfs                  4037988         0    4037988   0% /tmp
/dev/sda2              1038336    169552     868784  17% /boot
/dev/sda1               204580      9672     194908   5% /boot/efi
tmpfs                   807600         0     807600   0% /run/user/0

디시크공간 이상없는데...

Couldn't create the ssl-cache mutex AH00016: Configuration Failed
이건 뭘까.... 구글링 해보자.

 


두번째 "내일은 치킨집 CEO"님의 포스팅 먼저...(국문이라...).
https://www.enteroa.com/tag/no-space-left-on-device/

"Semaphore"라는 프로세스가 생성되었다가 없어지지 않아서...
엄밀히 말하면, "Semaphore" 프로세스 생성 가능한 숫자를 이미 초과해서(No space left on device) 
apache(httpd)가 시작시 새로운 "Semaphore"를 생성하지 못하면서 apache(httpd) 실행이 안된다고 한다.

이건, "Semaphore"가 아파치의 여러 프로세스간 데이타 동기화를 위해 필요한데..
apache(httpd)가 비정상적으로 종료될때 이미 생성된 "Semaphore"를 초기화 되지 못해 그렇다고 한다.

암튼, 일단 
해당 프로세스가 얼마나 있는지 확인

[root@test119 conf.d]# ipcs -s | wc -l
130

130개가 현재 존재중이다.

그럼 최대가능수는?
[root@test119 conf.d]# ipcs -ls

------ Semaphore Limits --------
max number of arrays = 128
max semaphores per array = 250
max semaphores system wide = 32000
max ops per semop call = 32
semaphore max value = 32767

현재 max number of arrays 는 128개라고 한다.
이미 초과했고, 초기화(종료) 되어 있지 않아서 apache(httpd)가 실행이 안되니, 
현재 생성되어 있는 Semaphore 를 초기화 하자.
[root@test119 conf.d]# ipcrm -a
[root@test119 conf.d]# ipcs -s | wc -l
4

이제 4개 있다고 한다.(어디서 생성되었지? 초기화 하자 마자 생성되네...)
다시 apache(httpd) 실행을 해보니 잘된다.
[root@test119 conf.d]# systemctl start httpd


이번 에러는 첨 경험해보는 경우이다.
system관리 ..... 넘 어려줘~~



참조 페이지
https://www.enteroa.com/tag/no-space-left-on-device/
https://serverfault.com/questions/991946/no-space-left-on-device-ah00023-couldnt-create-the-mpm-accept-mutex-when-re