运行easyswoole报错

发布于:2020年06月04日 已被阅读

运行easyswoole报错

  1. cd easyswoole //转到easyswoole文件夹下

  2. php easyswoole start //启动
    若启动报错,运行netstat -anp | grep port 查看该端口是否被占用(port为端口号)


[root@localhost easyswoole]# netstat -anp  | grep 9501

tcp   0    0 192.168.0.65:9501       0.0.0.0:*      LISTEN      2730/EasySwoole

1

2

若被占用运行 kill -9 2730杀死进程

————————————————

版权声明:本文为CSDN博主「weixin_42782926」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。

原文链接:https://blog.csdn.net/weixin_42782926/java/article/details/88723016



WARNINGswSocket_bind(:483): bind(0.0.0.0:9501) failed, Error: Address already in use[98]

PHP Fatal error:  Uncaught Swoole\Exception: failed to listen server port[0.0.0.0:9501], Error: Address already in use[98] in /dyree/vendor/easyswoole/easyswoole/src/ServerManager.php:59

Stack trace:

#0 /dyree/vendor/easyswoole/easyswoole/src/ServerManager.php(59): Swoole\Server->__construct('0.0.0.0', 9501, 2, 1)

#1 /dyree/vendor/easyswoole/easyswoole/src/Core.php(127): EasySwoole\EasySwoole\ServerManager->createSwooleServer(9501, 2, '0.0.0.0', Array, 2, 1)

#2 /dyree/vendor/easyswoole/easyswoole/src/Command/DefaultCommand/Start.php(42): EasySwoole\EasySwoole\Core->createServer()

#3 /dyree/vendor/easyswoole/easyswoole/src/Command/CommandContainer.php(46): EasySwoole\EasySwoole\Command\DefaultCommand\Start->exec(Array)

#4 /dyree/vendor/easyswoole/easyswoole/src/Command/CommandRunner.php(62): EasySwoole\EasySwoole\Command\CommandContainer->hook('start', Array)

#5 /dyree/easyswoole(25): EasySwoole\EasySwoole\Command\CommandRunner->run(Array)

#6 {main}

  thrown in /dyree/vendor/easyswoole/easyswoole/src/ServerManager.php on line 59


Fatal error: Uncaught Swoole\Exception: failed to listen server port[0.0.0.0:9501], Error: Address already in use[98] in /dyree/vendor/easyswoole/easyswoole/src/ServerManager.php:59

Stack trace:

#0 /dyree/vendor/easyswoole/easyswoole/src/ServerManager.php(59): Swoole\Server->__construct('0.0.0.0', 9501, 2, 1)

#1 /dyree/vendor/easyswoole/easyswoole/src/Core.php(127): EasySwoole\EasySwoole\ServerManager->createSwooleServer(9501, 2, '0.0.0.0', Array, 2, 1)

#2 /dyree/vendor/easyswoole/easyswoole/src/Command/DefaultCommand/Start.php(42): EasySwoole\EasySwoole\Core->createServer()

#3 /dyree/vendor/easyswoole/easyswoole/src/Command/CommandContainer.php(46): EasySwoole\EasySwoole\Command\DefaultCommand\Start->exec(Array)

#4 /dyree/vendor/easyswoole/easyswoole/src/Command/CommandRunner.php(62): EasySwoole\EasySwoole\Command\CommandContainer->hook('start', Array)

#5 /dyree/easyswoole(25): EasySwoole\EasySwoole\Command\CommandRunner->run(Array)

#6 {main}

  thrown in /dyree/vendor/easyswoole/easyswoole/src/ServerManager.php on line 59

[2020-06-04 12:40:35][debug][error]:[Uncaught Swoole\Exception: failed to listen server port[0.0.0.0:9501], Error: Address already in use[98] in /dyree/vendor/easyswoole/easyswoole/src/ServerManager.php:59

Stack trace:

#0 /dyree/vendor/easyswoole/easyswoole/src/ServerManager.php(59): Swoole\Server->__construct('0.0.0.0', 9501, 2, 1)

#1 /dyree/vendor/easyswoole/easyswoole/src/Core.php(127): EasySwoole\EasySwoole\ServerManager->createSwooleServer(9501, 2, '0.0.0.0', Array, 2, 1)

#2 /dyree/vendor/easyswoole/easyswoole/src/Command/DefaultCommand/Start.php(42): EasySwoole\EasySwoole\Core->createServer()

#3 /dyree/vendor/easyswoole/easyswoole/src/Command/CommandContainer.php(46): EasySwoole\EasySwoole\Command\DefaultCommand\Start->exec(Array)

#4 /dyree/vendor/easyswoole/easyswoole/src/Command/CommandRunner.php(62): EasySwoole\EasySwoole\Command\CommandContainer->hook('start', Array)

#5 /dyree/easyswoole(25): EasySwoole\EasySwoole\Command\CommandRunner->run(Array)

#6 {main}

  thrown at file:/dyree/vendor/easyswoole/easyswoole/src/ServerManager.php line:59]

[2020-06-04 12:40:35][debug][warning]:[file_put_contents(/log/log_202006.log): failed to open stream: Permission denied at file:/dyree/vendor/easyswoole/log/src/Logger.php line:26]

PHP Warning:  file_put_contents(/log/log_202006.log): failed to open stream: Permission denied in /dyree/vendor/easyswoole/log/src/Logger.php on line 26


Warning: file_put_contents(/log/log_202006.log): failed to open stream: Permission denied in /dyree/vendor/easyswoole/log/src/Logger.php on line 26

image.png