可能原因:
1)没有配置该用户的访问权限,可以通过rabbitmqctl add_vhost admin来添加,并赋予权限:
rabbitmqctl set_permissions -p 用户名 admin "." "." ".*"
代码在连接的时候,必须制定对应的vhost,否则是没有访问权限:
conn, err := amqp.Dial("amqp://sky:password@ip:5672/admin”)
2)MQ服务端配置了客户端的连接数量,已经超过最大数从而限制了该连接
- quot Exception RabbitMQ Reason accessquot exception rabbitmq reason exception_access_violation exception_access_violation termination exception exception exhausted rabbitmq channel outofmemoryerror quot exception thread bindingexception quot exception statement messagingexception quot exception connect version unsupportedclassversionerror quot exception noclassdeffounderror quot serverfactory exception quot installation exception occurred