2019-07-16 00:03:05 pid:17955 Exception: gateway inner pack err cmd=255 in /www/workserver/vendor/workerman/gateway-worker/src/Gateway.php:797
Stack trace:
#0 : GatewayWorker\Gateway->onWorkerMessage(Object(Workerman\Connection\TcpConnection), Array)
#1 /www/workserver/vendor/workerman/workerman/Connection/TcpConnection.php(657): call_user_func(Array, Object(Workerman\Connection\TcpConnection), Array)
#2 : Workerman\Connection\TcpConnection->baseRead(Resource id #33452, 2, Resource id #33452)
#3 /www/workserver/vendor/workerman/workerman/Events/Event.php(185): EventBase->loop()
#4 /www/workserver/vendor/workerman/workerman/Worker.php(2096): Workerman\Events\Event->loop()
#5 /www/workserver/vendor/workerman/gateway-worker/src/Gateway.php(279): Workerman\Worker->run()
#6 /www/workserver/vendor/workerman/workerman/Worker.php(1294): GatewayWorker\Gateway->run()
#7 /www/workserver/vendor/workerman/workerman/Worker.php(1127): Workerman\Worker::forkOneWorkerForLinux(Object(GatewayWorker\Gateway))
#8 /www/workserver/vendor/workerman/workerman/Worker.php(1100): Workerman\Worker::forkWorkersForLinux()
#9 /www/workserver/vendor/workerman/workerman/Worker.php(1426): Workerman\Worker::forkWorkers()
#10 /www/workserver/vendor/workerman/workerman/Worker.php(1375): Workerman\Worker::monitorWorkersForLinux()
#11 /www/workserver/vendor/workerman/workerman/Worker.php(461): Workerman\Worker::monitorWorkers()
#12 /www/workserver/start.php(40): Workerman\Worker::runAll()
#13 {main}
2019-07-16 00:03:05 pid:17955 Worker process terminated
2019-07-16 00:03:05 pid:30449 worker exit with status 64000
2019-07-16 12:03:56 pid:30465 Bad request for Register service. Request info(IP:78.128.113.18, Request Buffer:/*ŕCookie: mstshash=Administr). See http://wiki.workerman.net/Error4 for detail
报警时间非常准时总是在这个时候报这个错误
看起来是哪里的程序访问了gateway的内部通讯端口,传递了一个错的数据包。
你可以在 /www/workserver/vendor/workerman/gateway-worker/src/Gateway.php:797
这一行记录下日志,看下$data是什么数据。
Aarray (
'pack_len' => 164,
'cmd' => 255,
'local_ip' => 1397572210,
'local_port' => 0,
'client_ip' => 2049,
'client_port' => 16384,
'connection_id' => 0,
'flag' => 0,
'gateway_port' => 0,
'ext_len' => 0,
'ext_data' => '',
'body' => false,
)
截图下start_gateway.php里的设置
发了,
[attach]2297[/attach]
@https://wenda.workerman.net/people/walkor
应该是有程序向2900-2903发起了一个未知的请求,从$data还原请求数据打印的打他来看是 ??SMB@
不清楚你的网路环境为什么会有这个请求。新版本GatewayWorker收到无法识别的请求会记录日志,忽略请求,不会影响正常业务。你的版本有点老,你可以改下 /www/workserver/vendor/workerman/gateway-worker/src/Gateway.php:797 让框架不抛出异常直接忽略来避免进程报错重启。
谢谢,我试着更新版本
我更新版本之后就没有这个报错了。