no listening sockets available

每个套接字只允许使用一次,但我的电脑就是出现不能绑定端口80的问题,怎么回事?
    提示错误为:
    make_sock:could not bind to address 0.0.0.0:80
    no listening sockets  available,shutting down
    Unable to open logs
 
解决方法:
    出现这个问题,是因为APACHE的默认端口被占用的缘故.解决方法就是把这个端口占用的程序占用的端口去掉.或者改换APACHE的占用端口.
    APACHE的端口当然好解决.直接改配置文件就行了.现在我们就说说如何改其它文件占用APACHE默认端口80的解决方法.
    首先,查看是哪个程序占用了端口.方法是:netstat -a -o你会当前正在监听的端口程序和相应的端口及程序的PID,记住占用这个端口这个程序的PID,一般长用的端口如80会显示为http,21为FTP,所以,你只要记住对应的程序的PID就行了.
    然后,用任务管理器找到属于这个程序的PID.杀死这个进程再启动APACHE就行了.搞定了!
    至于,LINUX等其它非WINDOWS系统查找进程PID和杀死的方法.好好看看相应的命令.很简单哟.呵呵,完了.
systemctl status httpd. service Chttpd. service The Apache HTTP Server Loaded: loaded (/us/lib/systemd/system/httpd.service; disabled; vendor preset: disabled) Active: failed (Result: exit-code) since = 2023-05-24 19:48:16 CST; 1min 40s ago Docs: man: httpd(8) man: apachectl(8) Process: 14126 Execstop=/bin/ KiLL- WINCH $IMAINPID} (code-exited, status-1 /FAILURE) Process: 13507 ExecReload=/usr/ sbin/httpd $OPTIONS - k graceful (code exited. status-O/SUCCESS) Process: 14124 Execstart=/usr/ sbin/httpd $OPTIONS -DFOREGROUND ( code-exited, status-1 /FAILURE) Main PID: 14124 (code exited, status1/FAILURE) 24 19: 48:16 localhost. localdomain httpd(14124): AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/httpd/conf/httpd. conf:1 24 19:48:16 localhost. localdomain httpd/14124] : AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost. localdomain. Set th... his message 24 19:48:16 localhost. localdomain http(14124] : no listening sockets available, shutting down 24 19:48:16 localhost. Localdomain http 14124) : AH00015: Unable to open logs 24 19: 48:16 localhost. localdomain systemd(1): httpd, service: main process exited, code exited, status -1 /FAILURE 24 19: 48:16 localhost. localdomain kill|14126| : kill: cannot find process 24 19: 48:16 localhost. localdomain systemd(1]: httpd. service: control process exited, code exited status 1 24 19:48:16 localhost. localdomain systemd(1]: Failed to start The Apache HTTP Server 24 19:48:16 localhost. Localdomain systemd(1): Unit httpd. service entered failed state. 59 24 19:48:16 localhost. localdomain systemd(1|: httpd. service failed. Hint: some lines were eLlipsized, use - L to show in Tull
05-25
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值