• RabbitMQ报错:connection error; protocol method: #method<connection.close>(replycode=530, replytext=NOT_ALLOWED access to vhost '/' refused for user 'admin', classid=10, methodid=40)


    java.io.IOException
    	at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:129)
    	at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:125)
    	at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:147)
    	at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:403)
    	at com.rabbitmq.client.impl.recovery.RecoveryAwareAMQConnectionFactory.newConnection(RecoveryAwareAMQConnectionFactory.java:64)
    	at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.init(AutorecoveringConnection.java:156)
    	at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1106)
    	at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1063)
    	at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1198)
    	at com.study.simple.Producer.main(Producer.java:92)
    Caused by: com.rabbitmq.client.ShutdownSignalException: connection error; protocol method: #method<connection.close>(reply-code=530, reply-text=NOT_ALLOWED - access to vhost '/' refused for user 'admin', class-id=10, method-id=40)
    	at com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:66)
    	at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:36)
    	at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:502)
    	at com.rabbitmq.client.impl.AMQChannel.privateRpc(AMQChannel.java:293)
    	at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:141)
    	... 7 more
    发送消息出现异常...
    Disconnected from the target VM, address: '127.0.0.1:60541', transport: 'socket'
    
    Process finished with exit code 0
    

    错误原因:admin账户没有对应的Can access virtual hosts权限

    解决办法:

    点击admin账户,添加对应权限即可

    技术交流:添加Hilamg账号 88888 (https://hilamg.com

  • 相关阅读:
    Pandas Dict到DataFrame Series到DataFrame 转换
    MySQL锁和事务
    MySQl创建用户和授权,mysquldump
    MySQL索引
    pymysql模块
    Navicat下载安装
    MySQL多表查询
    学习目录
    MySQL单表查询
    MySQL逻辑查询语句的执行顺序
  • 原文地址:https://www.cnblogs.com/xiaoQ0725/p/15879426.html
Copyright © 2020-2023  润新知