블로그 이미지
흰색앵초

calendar

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 31

Notice

2012. 5. 26. 15:09 프로그래밍

nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)

Today I’m facing the following error message after added custom module to nginx
1root@ibnuyahya:~# sudo /etc/init.d/nginx restart
2 * Stopping Web Server nginx [OK]
3 * Starting Web Server nginx                                                                                                                                                         nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
4nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
5nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
6nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
7nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
8nginx: [emerg] still could not bind()

solution?
check running pid

1fuser -n tcp 80
280/tcp:              26621 26622

Kill

1root@ibnuyahya:~# kill -9 26621
2root@ibnuyahya:~# kill -9 26622

restart nginx

1root@ibnuyahya:~# sudo /etc/init.d/nginx restart

posted by 흰색앵초