生产环境上 由于没有迁移 Docker
的默认路径 磁盘空间占满 导致 RabbitMQ
的队列信息丢失
问题详情
- 生产服务器报错
1
2
3
4
5
6
7
8
9
10Caused by: com.rabbitmq.client.ShutdownSignalException: connection error; protocol method: #method<connection.close>(reply-code=541, reply-text=INTERNAL_ERROR - access to vhost '/' refused for user 'root': vhost '/' is down, class-id=10, method-id=40)
at com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:66)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:909)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:859)
at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:32)
at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:366)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1013)
at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:364)
at com.rabbitmq.client.impl.AMQChannel.privateRpc(AMQChannel.java:229)
at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:117) - 在RabbitMQAdmin管理页面 队列处于
Down
状态 并且无法删除 - 重启几次后都无法解决问题
处理方案
- 通过下列命令重置
RabbitMQ
的应用注意 下列命令会导致所有配置丢失 包括用户(Users)和虚拟主机(Vhost)
1
2
3rabbitmqctl stop_app
rabbitmqctl reset
rabbitmqctl start_app