问题重现:连接rabbitMQ时,go程序日志中报错:Reason: “no access to this vhost”
查询rabbitMQ日志:access to vhost ‘/’ refused for user ‘ubibaas’: vhost ‘/’ is down
由于是部署在k8s中
# kubectl logs -f --since=5s -n kube-rabbitmq rabbitmq-0
2022-06-17 02:00:37.478 [error] <0.14005.73> Error on AMQP connection <0.14005.73> (10.244.1.0:25894 -> 10.244.2.38:5672, vhost: 'none', user: 'ubibaas', state: opening), channel 0:
{handshake_error,opening,
{amqp_error,internal_error,
"access to vhost '/' refused for user 'ubibaas': vhost '/' is down",
'connection.open'}}
参数说明:
-f :实时输出,类似 tail -f 效果
--since=