Message: stream_socket_client(): unable to connect to tcp://127.0.0.1:2803 (Connection refused)
假设: $worker->startPort = 2800; $worker->count = 4; 确保防火墙已经放行了2800 2801 2802 2803 端口.
确认放行了 确认了好多遍了
那ip呢?分布式部署不能是 127.0.0.1
你是说这个IP吗 $gateway->lanIp = '127.0.0.1';
2.0455 1356848 5. Workerman\Worker::forkWorkers() /var/www/html/centos7.4.1708-httpd/GatewayWorker-8095-wifi/vendor/workerman/workerman/Worker.php:1494 2.0455 1356848 6. Workerman\Worker::forkWorkersForLinux() /var/www/html/centos7.4.1708-httpd/GatewayWorker-8095-wifi/vendor/workerman/workerman/Worker.php:1166 2.0455 1356848 7. Workerman\Worker::forkOneWorkerForLinux() /var/www/html/centos7.4.1708-httpd/GatewayWorker-8095-wifi/vendor/workerman/workerman/Worker.php:1192 2.0471 1355824 8. GatewayWorker\Gateway->run() /var/www/html/centos7.4.1708-httpd/GatewayWorker-8095-wifi/vendor/workerman/workerman/Worker.php:1360 2.0472 1358448 9. Workerman\Worker->run() /var/www/html/centos7.4.1708-httpd/GatewayWorker-8095-wifi/vendor/workerman/gateway-worker/src/Gateway.php:279 2.0486 1440880 10. call_user_func:{/var/www/html/centos7.4.1708-httpd/GatewayWorker-8095-wifi/vendor/workerman/workerman/Worker.php:2220}() /var/www/html/centos7.4.1708-httpd/GatewayWorker-8095-wifi/vendor/workerman/workerman/Worker.php:2220 2.0487 1441480 11. GatewayWorker\Gateway->onWorkerStart() /var/www/html/centos7.4.1708-httpd/GatewayWorker-8095-wifi/vendor/workerman/workerman/Worker.php:2220 2.0491 1474496 12. Workerman\Worker->listen() /var/www/html/centos7.4.1708-httpd/GatewayWorker-8095-wifi/vendor/workerman/gateway-worker/src/Gateway.php:495 2.0491 1475048 13. stream_socket_server() /var/www/html/centos7.4.1708-httpd/GatewayWorker-8095-wifi/vendor/workerman/workerman/Worker.php:2091
改成外网ip了就报这个错
嗯 已经解决了 因为用来docker 主IP映射了 所以要换成映射的那个IP
假设:
$worker->startPort = 2800;
$worker->count = 4;
确保防火墙已经放行了2800 2801 2802 2803 端口.
确认放行了 确认了好多遍了
那ip呢?分布式部署不能是 127.0.0.1
你是说这个IP吗 $gateway->lanIp = '127.0.0.1';
2.0455 1356848 5. Workerman\Worker::forkWorkers() /var/www/html/centos7.4.1708-httpd/GatewayWorker-8095-wifi/vendor/workerman/workerman/Worker.php:1494
2.0455 1356848 6. Workerman\Worker::forkWorkersForLinux() /var/www/html/centos7.4.1708-httpd/GatewayWorker-8095-wifi/vendor/workerman/workerman/Worker.php:1166
2.0455 1356848 7. Workerman\Worker::forkOneWorkerForLinux() /var/www/html/centos7.4.1708-httpd/GatewayWorker-8095-wifi/vendor/workerman/workerman/Worker.php:1192
2.0471 1355824 8. GatewayWorker\Gateway->run() /var/www/html/centos7.4.1708-httpd/GatewayWorker-8095-wifi/vendor/workerman/workerman/Worker.php:1360
2.0472 1358448 9. Workerman\Worker->run() /var/www/html/centos7.4.1708-httpd/GatewayWorker-8095-wifi/vendor/workerman/gateway-worker/src/Gateway.php:279
2.0486 1440880 10. call_user_func:{/var/www/html/centos7.4.1708-httpd/GatewayWorker-8095-wifi/vendor/workerman/workerman/Worker.php:2220}() /var/www/html/centos7.4.1708-httpd/GatewayWorker-8095-wifi/vendor/workerman/workerman/Worker.php:2220
2.0487 1441480 11. GatewayWorker\Gateway->onWorkerStart() /var/www/html/centos7.4.1708-httpd/GatewayWorker-8095-wifi/vendor/workerman/workerman/Worker.php:2220
2.0491 1474496 12. Workerman\Worker->listen() /var/www/html/centos7.4.1708-httpd/GatewayWorker-8095-wifi/vendor/workerman/gateway-worker/src/Gateway.php:495
2.0491 1475048 13. stream_socket_server() /var/www/html/centos7.4.1708-httpd/GatewayWorker-8095-wifi/vendor/workerman/workerman/Worker.php:2091
改成外网ip了就报这个错
嗯 已经解决了 因为用来docker 主IP映射了 所以要换成映射的那个IP