日志:
2023-12-28 17:02:07 2023-12-28 13:02:07.875320+00:00 [info] <0.8575.0> accepting AMQP connection <0.8575.0> (172.26.0.8:45438 -> 172.26.0.2:5672)
2023-12-28 17:02:07 2023-12-28 13:02:07.877505+00:00 [info] <0.8575.0> connection <0.8575.0> (172.26.0.8:45438 -> 172.26.0.2:5672): user 'guest' authenticated and granted access to vhost '/'
2023-12-28 17:02:07 2023-12-28 13:02:07.877753+00:00 [info] <0.8575.0> closing AMQP connection <0.8575.0> (172.26.0.8:45438 -> 172.26.0.2:5672, vhost: '/', user: 'guest')
代码:
//创建连接 $this->connection = new \AMQPConnection($this->config); if (!$this->connection->connect()) { throw new \Exception('RabbitMQ 创建连接失败'); }
config:
array( 'host' => rabbitmq 'port' => 5672 'login' => guest 'password' => guest 'vhost' => '' );
rabbitmq 安装成功也能成功进入管理页面
1
UnrealEngine OP |
2
UnrealEngine OP connect()直接返回了 null ,用 try catch 试过也不抛出异常
|
3
ainon 328 天前
看看 php 侧可有问题
|
4
UnrealEngine OP @ainon #3 扩展都安装好了的
|