求救 Can't assign requested address,我确认端口是没问题的

lxd997

问题描述

服务器是centos7
php是8.2
之前一直好好的,最近忽然经常报这个错误,
我拿到本地mac系统上测,发现也经常报这个错误

报错信息

think\exception\ErrorException: stream_socket_client(): Unable to connect to tcp://127.0.0.1:2000 (Can't assign requested address) in /Users/liuxuedong/www/DHY/DBUGHY/vendor/workerman/gateway-worker/src/Lib/Gateway.php:755
Stack trace:
#0 [internal function]: think\initializer\Error->appError(2, 'stream_socket_c...', '/Users/liuxuedo...', 755)
#1 /Users/leilei/admin/vendor/workerman/gateway-worker/src/Lib/Gateway.php(755): stream_socket_client('tcp://127.0.0.1...', 0, '', 3)
#2 /Users/leilei/admin/vendor/workerman/gateway-worker/src/Lib/Gateway.php(720): GatewayWorker\Lib\Gateway::getBufferFromGateway(Array)
#3 /Users/leilei/admin/vendor/workerman/gateway-worker/src/Lib/Gateway.php(302): GatewayWorker\Lib\Gateway::getBufferFromAllGateway(Array)
#4 /Users/leilei/admin/public/aibug/trade.php(166): GatewayWorker\Lib\Gateway::getClientIdCountByGroup('swapTradeList_B...')
#5 /Users/leilei/admin/vendor/workerman/workerman/Connection/TcpConnection.php(656): {closure}(Object(Workerman\Connection\AsyncTcpConnection), Array)
#6 /Users/leilei/admin/vendor/workerman/workerman/Events/Select.php(292): Workerman\Connection\TcpConnection->baseRead(Resource id #201)
#7 /Users/leilei/admin/vendor/workerman/workerman/Worker.php(2455): Workerman\Events\Select->loop()
#8 /Users/leilei/admin/vendor/workerman/workerman/Worker.php(1547): Workerman\Worker->run()
#9 /Users/leilei/admin/vendor/workerman/workerman/Worker.php(1391): Workerman\Worker::forkOneWorkerForLinux(Object(Workerman\Worker))
#10 /Users/leilei/admin/vendor/workerman/workerman/Worker.php(1365): Workerman\Worker::forkWorkersForLinux()
#11 /Users/leilei/admin/vendor/workerman/workerman/Worker.php(550): Workerman\Worker::forkWorkers()
#12 /Users/leilei/admin/public/aibug/trade.php(184): Workerman\Worker::runAll()
#13 {main}
Worker[64363] process terminated
worker[none:64363] exit with status 64000
437 1 0
1个回答

latin
  • lxd997 2023-12-11

    谢谢大佬,其实我已经优化过了,还是这样,本地mac没有优化,我这会在阿里云买了个16核32G的大容量服务器看看咋样

×
🔝