virtualmin/webmin后台打不开,service webmin restart也没有用,怎么办?首先我们要确定原因。
检查webmin是否在运行:
[[email protected]]# service webmin status
Webmin is stopped =》 webmin没有启动
找原因:
[[email protected]]# tail -f /var/webmin/miniserv.error
[13/Jul/2010:21:48:46 +0800] Restarting
Failed to bind to port 10000 : Address already in use
Could not listen on any ports at /usr/libexec/webmin/miniserv.pl line 456.
Error: Webmin server did not write new PID file
Failed to bind to port 10000 : Address already in use
Could not listen on any ports at /usr/libexec/webmin/miniserv.pl line 456.
Failed to bind to port 10000 : Address already in use
Could not listen on any ports at /usr/libexec/webmin/miniserv.pl line 456.
Failed to bind to port 10000 : Address already in use
Could not listen on any ports at /usr/libexec/webmin/miniserv.pl line 456.
webmin的10000的端口被占用。我们首先怀疑是webmin没有正常退出,强制关闭试一试:
[[email protected]]# pkill webmin
[[email protected]]# service webmin start
[[email protected]]# service webmin status
Webmin is stopped =》 还是不行
看看哪个进程占用了10000端口
[[email protected]]# netstat -anp |grep 10000
tcp 0 0 0.0.0.0:10000 0.0.0.0:* LISTEN 28655/perl
tcp 71 0 67.23.234.100:10000 59.35.148.206:4733 CLOSE_WAIT -
tcp 0 0 67.23.234.100:10000 58.33.74.228:1405 ESTABLISHED 29698/perl
tcp 0 0 67.23.234.100:10000 58.33.74.228:1404 ESTABLISHED 28655/perl
tcp 613 0 67.23.234.100:10000 58.215.75.62:37174 CLOSE_WAIT -
tcp 641 0 67.23.234.100:10000 72.55.174.135:45419 CLOSE_WAIT -
tcp 71 0 67.23.234.100:10000 218.18.130.31:27706 CLOSE_WAIT -
我ctohome.com杀:
kill 28655
kill 29698
核查下:
[[email protected]]# lsof -i:10000
[[email protected]]# netstat -anp |grep 10000
tcp 0 1 67.23.234.100:10000 58.33.74.228:1405 FIN_WAIT1 -
tcp 0 1 67.23.234.100:10000 58.33.74.228:1404 FIN_WAIT1 -
再重启 webmin试一试:
[[email protected]]# service webmin start
[[email protected]]# service webmin status
Webmin (pid 3983) is running
搞定,收工! 更加简单的办法就是重启vps或者服务器(如果你不在乎网站暂停的话)。