使用GatewayWorker Exception: client_id is invalid

爱吃鱼

问题描述

使用GatewayWorker 做websocket服务时stdout.log 有报错信息

{main}Exception: client_id aaaa'%bf%27 is invalid in /www/wwwroot/carpay-gateway/vendor/workerman/gateway-worker/src/Lib/Context.php:131

报错日志信息如下

Stack trace:
#0 /www/wwwroot/carpay-gateway/vendor/workerman/gateway-worker/src/Lib/Gateway.php(1131): GatewayWorker\Lib\Context::clientIdToAddress()
#1 /www/wwwroot/carpay-gateway/vendor/workerman/gateway-worker/src/Lib/Gateway.php(897): GatewayWorker\Lib\Gateway::sendCmdAndMessageToClient()
#2 /www/wwwroot/carpay-gateway/app/home/controller/carpay/IndexController.php(16): GatewayWorker\Lib\Gateway::bindUid()
#3 /www/wwwroot/carpay-gateway/vendor/workerman/webman-framework/src/App.php(319): app\home\controller\carpay\IndexController->bindUser()
#4 /www/wwwroot/carpay-gateway/vendor/workerman/webman-framework/src/App.php(349): Webman\App::Webman\{closure}()
#5 /www/wwwroot/carpay-gateway/app/middleware/CorsMiddleware.php(12): Webman\App::Webman\{closure}()
#6 /www/wwwroot/carpay-gateway/vendor/workerman/webman-framework/src/App.php(341): app\middleware\CorsMiddleware->process()
#7 /www/wwwroot/carpay-gateway/app/middleware/LogMiddleware.php(18): Webman\App::Webman\{closure}()
#8 /www/wwwroot/carpay-gateway/vendor/workerman/webman-framework/src/App.php(341): App\middleware\LogMiddleware->process()
#9 /www/wwwroot/carpay-gateway/vendor/workerman/webman-framework/src/App.php(141): Webman\App::Webman\{closure}()
#10 /www/wwwroot/carpay-gateway/vendor/workerman/workerman/Connection/TcpConnection.php(646): Webman\App->onMessage()
#11 /www/wwwroot/carpay-gateway/vendor/workerman/workerman/Events/Select.php(311): Workerman\Connection\TcpConnection->baseRead()
#12 /www/wwwroot/carpay-gateway/vendor/workerman/workerman/Worker.php(1635): Workerman\Events\Select->loop()
#13 /www/wwwroot/carpay-gateway/vendor/workerman/workerman/Worker.php(1426): Workerman\Worker::forkOneWorkerForLinux()
#14 /www/wwwroot/carpay-gateway/vendor/workerman/workerman/Worker.php(1400): Workerman\Worker::forkWorkersForLinux()
#15 /www/wwwroot/carpay-gateway/vendor/workerman/workerman/Worker.php(560): Workerman\Worker::forkWorkers()
#16 /www/wwwroot/carpay-gateway/vendor/workerman/webman-framework/src/support/App.php(131): Workerman\Worker::runAll()
#17 /www/wwwroot/carpay-gateway/start.php(4): support\App::run()
#18 {main}Exception: client_id aaaa'%bf%27 is invalid in /www/wwwroot/carpay-gateway/vendor/workerman/gateway-worker/src/Lib/Context.php:131

截图报错信息里报错文件相关代码

截图

925 1 0
1个回答

admin

错误原因:非gatewayworker原因,个人代码原因

#2 /www/wwwroot/carpay-gateway/app/home/controller/carpay/IndexController.php(16): GatewayWorker\Lib\Gateway::bindUid()

解决方案:仔细阅读手册

https://www.workerman.net/doc/gateway-worker/bind-uid.html

如阅读手册后,未解决,请继续贴上代码

  • 暂无评论
年代过于久远,无法发表回答
×
🔝