728x90
반응형

(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80

 

신규 사이트 vhost 설정을 추가하고 graceful을 시켰는데,
갑자기 이런 메세지가...

 

 
[root@lease10feb ~]# apachectl graceful
httpd not running, trying to start
(98)Address already in use: make_sock: could not bind to address [::]:80
(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

 

등에 식은 땀이 흐른다.
서비스에는 이상이 없는 것을 확인한다.
일단 퇴근 이후 까지 기다린다.

 

확인해 보니 /var/run/httpd.pid 가 없다.
생각해 보니 monit으로 서버 부하를 모니터링하여 일정 부하이상 올라가면 httpd를 재시작하도록 설정해 놓았는데,
오늘 그 작업이 있었고, 그로 인해 문제가 생긴 것 같다.
monit의 상태는 아래와 같았다.

 

 
[root@lease10feb ~]# monit summary
The Monit daemon 5.5 uptime: 244d 11h 18m

System 'lease10feb.dreamtec.co.kr'  Running
Process 'httpd'                     Execution failed

 

'restart'를 해야하나? 'killall httpd'를 해야하나? 고민한다.

 

[수정2023.05.30] apachectl 옵션을 보니 reload가 있다. 없다. 
/etc/init.d/httpd 에 reload 옵션이 있다.

 

 
[root@lease10feb ~]# apachectl
Usage: /usr/sbin/httpd [-D name] [-d directory] [-f file]
                       [-C "directive"] [-c "directive"]
                       [-k start|restart|graceful|graceful-stop|stop]
                       [-v] [-V] [-h] [-l] [-L] [-t] [-S]
Options:
  -D name            : define a name for use in <IfDefine name> directives
  -d directory       : specify an alternate initial ServerRoot
  -f file            : specify an alternate ServerConfigFile
  -C "directive"     : process directive before reading config files
  -c "directive"     : process directive after reading config files
  -e level           : show startup errors of level (see LogLevel)
  -E file            : log startup errors to file
  -v                 : show version number
  -V                 : show compile settings
  -h                 : list available command line options (this page)
  -l                 : list compiled in modules
  -L                 : list available configuration directives
  -t -D DUMP_VHOSTS  : show parsed settings (currently only vhost settings)
  -S                 : a synonym for -t -D DUMP_VHOSTS
  -t -D DUMP_MODULES : show all loaded modules
  -M                 : a synonym for -t -D DUMP_MODULES
  -t                 : run syntax check for config files
 
[root@lease10feb ~]# /etc/init.d/httpd
Usage: httpd {start|stop|restart|condrestart|reload|status|fullstatus|graceful|help|configtest}

reload를 해 본다.
httpd.pid가 생겼다.
graceful을 해 본다. 잘 된다.

 

#아파치 #apache #httpd #monit #apachectl

 

 

728x90
SMALL
Posted by gromet

블로그 이미지
나는 운이 좋은 사람이다 나는 나날이 점점 더 좋아진다 내가 하는 선택과 행동은 반드시 성공으로 이어진다 내게는 인내력과 지속력이 있다 네게는 좋은것들만 모여든다
gromet

공지사항

Yesterday
Today
Total
반응형

달력

 « |  » 2024.9
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

글 보관함

160x600