GatewayConnection Error : 1 ,connect 0.0.0.0:28720 fail after 0.0002 seconds

gc_mike

gateway 和businessworker分开部署,其中gateway和register在同一台服务器,
gateway 配置如下:
$gateway->count = 8;
$gateway->lanIp = '0.0.0.0';
$gateway->startPort = 28715;
// 服务注册地址(阿里云公网ip)
$gateway->registerAddress = '47.104.100.155:1236';

businessworker 配置如下:
$worker->count = 20;
// 服务注册地址
$worker->registerAddress = '47.104.100.155:1236';

然后启动businessworker服务,报错
GatewayConnection Error : 1 ,connect 0.0.0.0:28719 fail after 0.0002 seconds
GatewayConnection Error : 1 ,connect 0.0.0.0:28720 fail after 0.0002 seconds
GatewayConnection Error : 1 ,connect 0.0.0.0:28721 fail after 0.0002 seconds
GatewayConnection Error : 1 ,connect 0.0.0.0:28716 fail after 0.0001 seconds
GatewayConnection Error : 1 ,connect 0.0.0.0:28715 fail after 0.0003 seconds
GatewayConnection Error : 1 ,connect 0.0.0.0:28717 fail after 0.0002 seconds
GatewayConnection Error : 1 ,connect 0.0.0.0:28722 fail after 0.0002 seconds
GatewayConnection Error : 1 ,connect 0.0.0.0:28718 fail after 0.0002 seconds
GatewayConnection Error : 1 ,connect 0.0.0.0:28719 fail after 0.0002 seconds
GatewayConnection Error : 1 ,connect 0.0.0.0:28720 fail after 0.0002 seconds
GatewayConnection Error : 1 ,connect 0.0.0.0:28721 fail after 0.0001 seconds
GatewayConnection Error : 1 ,connect 0.0.0.0:28716 fail after 0.0001 seconds
GatewayConnection Error : 1 ,connect 0.0.0.0:28715 fail after 0.0003 seconds
GatewayConnection Error : 1 ,connect 0.0.0.0:28717 fail after 0.0002 seconds

防火墙没开,阿里云安全组已开放端口28715-28722

3387 1 0
1个回答

walkor 打赏

$gateway->lanIp 不能写0.0.0.0

  • gc_mike 2017-12-08

    但是我写成阿里云公网ip,又会报错Exception: Cannot assign requested address in /home/www/games_websocket/vendor/workerman/workerman/Worker.php:1484

  • walkor 2017-12-08

    写内网ip

  • gc_mike 2017-12-08

    我两台服务器ip不是一个网段的,不能用内网ip

年代过于久远,无法发表回答
×
🔝