这里粘代码
class Worker extends Server {
protected $socket = 'websocket://127.0.0.1:2346';
protected $uidConnections = [];
在终端运行workerman时,0.0.0.0:2346和127.0.0.1,内网都可以,但是使用公网ip就报这个错误了
Cannot assign requested address报错还在不停的弹,
已经根据文档优化了内核,也看了ip addr
并且运行时,ws也没有启动成功,又要怎么启动啊
这里粘贴截图
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 00:16:3e:04:6c:b9 brd ff:ff:ff:ff:ff:ff
altname enp0s5
altname ens5
inet 172.29.207.188/20 metric 100 brd 172.29.207.255 scope global dynamic eth0
valid_lft 311300682sec preferred_lft 311300682sec
inet6 fe80::216:3eff:fe04:6cb9/64 scope link
valid_lft forever preferred_lft forever
云服务器一般都是用的专有网络,ip addr 看不到外网ip,无法绑定外网ip。
经典网络才可以。