報(bào)與數(shù)據(jù)庫(kù)端口沖突問題
stream_socket_server(): Unable to connect to tcp://127.0.0.1:3306 (Address already in use)
問題出在
'web' => [
'handler' => Gateway::class,
'listen' => 'websocket://0.0.0.0:7171',
'count' => cpu_count(),
'reloadable' => false,
'constructor' => ['config' => [
'lanIp' => '127.0.0.1',
'startPort' => 4300, //不能使用3300段端口號(hào),會(huì)與數(shù)據(jù)庫(kù)沖突
'pingInterval' => 30,
'pingNotResponseLimit' => 0,
'pingData' => '{"type":"ping"}',
'registerAddress' => '127.0.0.1:1236',
'onConnect' => function(){},
]]
],