spring-boot(rabbitmq) Failed to check/redeclare auto-delete queue(s)
spring-boot
spring-projects/spring-boot: 是一个用于简化Spring应用开发的框架。适合用于需要快速开发企业级Java应用的项目。特点是可以提供自动配置、独立运行和内置的Tomcat服务器,简化Spring应用的构建和部署。
项目地址:https://gitcode.com/gh_mirrors/sp/spring-boot
免费下载资源
·
2019-10-14 16:08:05 [AMQP Connection 10.210.1.20:5672] WARN com.rabbitmq.client.impl.ForgivingExceptionHandler - An unexpected connection driver error occured (Exception message: Socket closed)
2019-10-14 16:08:05 [SimpleAsyncTaskExecutor-1] ERROR o.s.a.r.listener.SimpleMessageListenerContainer - Failed to check/redeclare auto-delete queue(s).
org.springframework.amqp.AmqpIOException: java.io.IOException
at org.springframework.amqp.rabbit.support.RabbitExceptionTranslator.convertRabbitAccessException(RabbitExceptionTranslator.java:71)
at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:407)
at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.createConnection(CachingConnectionFactory.java:588)
at org.springframework.amqp.rabbit.core.RabbitTemplate.doExecute(RabbitTemplate.java:1438)
at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:1419)
at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:1395)
at org.springframework.amqp.rabbit.core.RabbitAdmin.getQueueProperties(RabbitAdmin.java:368)
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.redeclareElementsIfNecessary(SimpleMessageListenerContainer.java:1241)
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1502)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: null
at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:124)
at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:120)
at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:142)
at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:407)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1159)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1109)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1049)
at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:367)
... 8 common frames omitted
Caused by: com.rabbitmq.client.ShutdownSignalException: connection error; protocol method: #method<connection.close>(reply-code=530, reply-text=NOT_ALLOWED - vhost /testVHost not found, 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:443)
at com.rabbitmq.client.impl.AMQChannel.privateRpc(AMQChannel.java:263)
at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:136)
... 13 common frames omitted
注意此日志中输出的最后一个caused by输出:(reply-code=530, reply-text=NOT_ALLOWED - vhost /testVHost not found, class-id=10, method-id=40),原因是vhost没找到,在yml中配置是,virtual-host属性配置多加了个‘/’去掉即可。去掉后如下:
spring.rabbitmq:
addresses: amqp://abc:abc@192.168.1.100:5672,amqp://abc:abc@192.168.1.101:5672,amqp://abc:abc@192.168.1.102:5672
publisher-confirms: true
virtual-host: testVHost #注意此处前面没有/,也就是rabbit web管理界面上显示的vhost名字,在没有自定义vhost时,默认的vhost是 ‘/’
GitHub 加速计划 / sp / spring-boot
73.97 K
40.4 K
下载
spring-projects/spring-boot: 是一个用于简化Spring应用开发的框架。适合用于需要快速开发企业级Java应用的项目。特点是可以提供自动配置、独立运行和内置的Tomcat服务器,简化Spring应用的构建和部署。
最近提交(Master分支:2 个月前 )
fdf24c6c
Closes gh-42976
10 天前
3c42ba8c
* pr/42974:
Fix copyright year of updated file
Polish
Closes gh-42974
10 天前
更多推荐
已为社区贡献3条内容
所有评论(0)