当前位置:   article > 正文

个人笔记-Rabbit MQ 连接失败_rabbitmq.client.exceptions.operationinterruptedexc

rabbitmq.client.exceptions.operationinterruptedexception:鈥淭he amqp operatio

问题

连接 Rabbit MQ 时,出现如下错误:

None of the specified endpoints were reachable

vhost xxxx not found

  1. DotNetCore.CAP.BrokerConnectionException: Broker Unreachable
  2. ---> RabbitMQ.Client.Exceptions.BrokerUnreachableException: None of the specified endpoints were reachable
  3. ---> RabbitMQ.Client.Exceptions.OperationInterruptedException: The AMQP operation was interrupted: AMQP close-reason, initiated by Peer, code=530, text='NOT_ALLOWED - vhost handday.retail.aistore.devXX not found', classId=10, methodId=40
  4. at RabbitMQ.Client.Impl.SimpleBlockingRpcContinuation.GetReply(TimeSpan timeout)
  5. at RabbitMQ.Client.Impl.ModelBase.ConnectionOpen(String virtualHost, String capabilities, Boolean insist)
  6. at RabbitMQ.Client.Framing.Impl.Connection.Open(Boolean insist)
  7. at RabbitMQ.Client.Framing.Impl.Connection..ctor(IConnectionFactory factory, Boolean insist, IFrameHandler frameHandler, String clientProvidedName)
  8. at RabbitMQ.Client.Framing.Impl.AutorecoveringConnection.Init(IFrameHandler fh)
  9. at RabbitMQ.Client.Framing.Impl.AutorecoveringConnection.Init(IEndpointResolver endpoints)
  10. at RabbitMQ.Client.ConnectionFactory.CreateConnection(IEndpointResolver endpointResolver, String clientProvidedName)
  11. --- End of inner exception stack trace ---
  12. at RabbitMQ.Client.ConnectionFactory.CreateConnection(IEndpointResolver endpointResolver, String clientProvidedName)
  13. at RabbitMQ.Client.ConnectionFactory.CreateConnection(String clientProvidedName)
  14. at RabbitMQ.Client.ConnectionFactory.CreateConnection()
  15. at DotNetCore.CAP.RabbitMQ.ConnectionChannelPool.<>c__DisplayClass19_0.<CreateConnection>b__1()
  16. at DotNetCore.CAP.RabbitMQ.ConnectionChannelPool.GetConnection()
  17. at DotNetCore.CAP.RabbitMQ.RabbitMQConsumerClient.Connect()
  18. at DotNetCore.CAP.RabbitMQ.RabbitMQConsumerClientFactory.Create(String groupId)
  19. --- End of inner exception stack trace ---
  20. at DotNetCore.CAP.RabbitMQ.RabbitMQConsumerClientFactory.Create(String groupId)
  21. at DotNetCore.CAP.Internal.ConsumerRegister.Execute()


原因

如错误信息中所示:找不到 virtual host

解决方案

到 Rabbit MQ 管理后台添加 Virtual Host

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/IT小白/article/detail/559817
推荐阅读
相关标签
  

闽ICP备14008679号