[root@izm5e3gye2rcpk730gsan1z GatewayWorker]# php start.php restart -d
Workerman[start.php] restart
Workerman[start.php] is stopping ...
Workerman[start.php] stop success
[root@izm5e3gye2rcpk730gsan1z GatewayWorker]# stream_socket_server(): unable to connect to tcp://0.0.0.0:8282 (Address already in use) in file /usr/local/www/GatewayWorker/vendor/workerman/workerman/Worker.php on line 2178
Fatal error: Uncaught exception 'Exception' with message 'Address already in use' in /usr/local/www/GatewayWorker/vendor/workerman/workerman/Worker.php:2180
Stack trace:
#0 /usr/local/www/GatewayWorker/vendor/workerman/workerman/Worker.php(619): Workerman\Worker->listen()
#1 /usr/local/www/GatewayWorker/vendor/workerman/workerman/Worker.php(503): Workerman\Worker::initWorkers()
#2 /usr/local/www/GatewayWorker/start.php(37): Workerman\Worker::runAll()
#3 {main}
thrown in /usr/local/www/GatewayWorker/vendor/workerman/workerman/Worker.php on line 2180
求救,我调整了缓冲区大小
$gateway-$sendToClientBufferSize = 10241024100;
已经尝试过重启nginx,重启php-fpm都不行,在线求助。
1、8282 端口被占用了,干掉占用这个端口的程序或者换一个端口试试;
2、workerman是基于PHP-CLI的,和PHP-FPM没有任何关系;
[root@izm5e3gye2rcpk730gsan1z GatewayWorker]# lsof -i :8282
[root@izm5e3gye2rcpk730gsan1z GatewayWorker]# netstat -tunlp|grep 8282
[root@izm5e3gye2rcpk730gsan1z GatewayWorker]#
大哥,我找不到端口被占用。
有几个kworker的进程不知道是什么
没上下文就把启动脚本代码完整贴下
blog大哥 你看我最新截图那里我换了端口8283可以了但是8282还是在进程里残留着
我是中途把127.0.0.1的ip直接改成了0.0.0.0 然后又restart了是不是这样会导致进程残留呢
你启动了2个相同端口的gateway进程,所以端口冲突了。
你看下是不是有多个 start_gateway_xxx.php 文件。只保留一个,不然会一起启动。
是只有一个start_gateway文件,但是我中间改了ip 从127.0.0.1改成了0.0.0.0 重启之后就不行了
[root@izm5e3gye2rcpk730gsan1z GatewayWorker]# find / -name 'start_gateway*.php'
/usr/local/www/GatewayWorker/Applications/chat/start_gateway.php
/usr/local/www/GatewayWorker/Applications/YourApp/start_gateway.php
谢谢大哥确实有两个了。。。