FreeBSD 12 PHP 8.0.0 起动不了 Workerman

0
 Workerman[start.php] start in DEBUG mode
------------------------------------------- WORKERMAN --------------------------------------------
Workerman version:4.0.17 PHP version:8.0.1
-------------------------------------------- WORKERS ---------------------------------------------
proto user worker listen processes status
tcp root ApisBusiness none 1 [OK]
tcp root ApisGateway text://0.0.0.0:5850 2 [OK]
tcp root ApisRegister text://0.0.0.0:5800 1 [OK]
tcp root ApiWebSocket websocket://0.0.0.0:5818 1 [OK]
--------------------------------------------------------------------------------------------------
Press Ctrl+C to stop. Start success.

Warning: stream_socket_client(): Unable to connect to tcp://127.0.0.1:5800 (Connection refused) in /usr/home/Worker/Workerman/Connection/AsyncTcpConnection.php on line 190

Warning: stream_socket_client(): Unable to connect to tcp://127.0.0.1:5800 (Connection refused) in /usr/home/Worker/Workerman/Connection/AsyncTcpConnection.php on line 190
已邀请:

walkor

赞同来自: Alu

start_register.php 里加一行代码


$register->reusePort = false;

试下

Alu

赞同来自:

我更新了一下就正常使用了。
再试又不行,不知道怎么回事

Alu

赞同来自:

@walkor: 麻烦帮我看下,配置应该没错吧。


<?php 

use \GatewayWorker\Gateway;
// gateway 进程,这里使用Text协议
$Gateway = new Gateway('Text://0.0.0.0:5850');
// gateway名称,status方便查看
$Gateway->name = 'ApisGateway';
// gateway进程数
$Gateway->count = 2;
// 本机ip,分布式部署时使用内网ip
$Gateway->lanIp = '127.0.0.1';
// 内部通讯起始端口,假如进程数=2,起始端口为4000 4001
$Gateway->startPort = 5851;
// 服务注册地址
$Gateway->registerAddress = '127.0.0.1:5800';
// 心跳间隔
$Gateway->pingInterval = 300;
// 心跳数据
$Gateway->pingData = '{"type":"ping"}';
if (! defined('GLOBAL_START')) {
Worker::runAll();
}

Alu

赞同来自:

@walkor:


<?php 

use \GatewayWorker\Gateway;
// gateway 进程,这里使用Text协议,可以用telnet测试
$Gateway = new Gateway('Websocket://0.0.0.0:5818');
// gateway名称,status方便查看
$Gateway->name = 'ApiWebSocket';
// gateway进程数
$Gateway->count = 1;
// 本机ip,分布式部署时使用内网ip
$Gateway->lanIp = '127.0.0.1';
// 内部通讯起始端口,假如进程数=2,起始端口为4000 4001
$Gateway->startPort = 5830;
// 服务注册地址
$Gateway->registerAddress = '127.0.0.1:5800';
// 心跳间隔
$Gateway->pingInterval = 300;
// 心跳数据
$Gateway->pingData = '{"type":"ping"}';

if (! defined('GLOBAL_START')) {
Worker::runAll();
}

要回复问题请先登录注册