swoole-address already in use[98]

编程语言 / 35人浏览 / 0人评论

php fatal error:Uncaught Swoole\Exception: failed to listen server port[127.0.0.1:9501], Error: Address already in use[98] in xxx/server-first.php:3

PHP Fatal error:Uncaught SwooleException:failed to listen server port[127.0.0.1:9501], Error: Address already in use[98] in
xxx/server-first.php:3

Stack trace:

0 xxx/xxx.php(3): SwooleServer->__construct('127.0.0.1', 9501)

1 {main}

thrown in xxx/xxx.php on line 3

Fatal error: Uncaught SwooleException: failed to listen server port[127.0.0.1:9501], Error: Address already in use[98] in xxx/xxx.php:3
Stack trace:

0 xxx/xxx.php(3): SwooleServer->__construct('127.0.0.1', 9501)
1 {main}

thrown in xxx/xxx.php on line 3

解决办法

查看端口9501被哪个进程占用

netstat  -anp  |  grep 9501

tcp        0      0 127.0.0.1:9501          0.0.0.0:*               LISTEN      3120/php

解除进程

kill -9 3120

转载注明:

扩展查找

0 条评论

还没有人发表评论

发表评论 取消回复

记住我的信息,方便下次评论
有人回复时邮件通知我