请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

一直报java.net.ConnectException: Connection refused: no further information警告

2024/04/04 16:23:08 INFO Attempting to connect to: [localhost:5672]
2024/04/04 16:23:17 WARN Consumer raised exception, processing can restart if the connection factory supports it. Exception summary: org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused: no further information
2024/04/04 16:23:17 INFO Restarting Consumer@227330a6: tags=[[]], channel=null, acknowledgeMode=AUTO local queue size=0
2024/04/04 16:23:17 INFO Attempting to connect to: [localhost:5672]
2024/04/04 16:23:21 ERROR Failed to check/redeclare auto-delete queue(s).
org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused: no further information
at org.springframework.amqp.rabbit.support.RabbitExceptionTranslator.convertRabbitAccessException(RabbitExceptionTranslator.java:61)
at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:602)
at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.createConnection(CachingConnectionFactory.java:725)
at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.createConnection(ConnectionFactoryUtils.java:252)
at org.springframework.amqp.rabbit.core.RabbitTemplate.doExecute(RabbitTemplate.java:2180)
at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:2153)
at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:2133)
at org.springframework.amqp.rabbit.core.RabbitAdmin.getQueueInfo(RabbitAdmin.java:463)
at org.springframework.amqp.rabbit.core.RabbitAdmin.getQueueProperties(RabbitAdmin.java:447)
at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.attemptDeclarations(AbstractMessageListenerContainer.java:1930)
at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.redeclareElementsIfNecessary(AbstractMessageListenerContainer.java:1911)
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainerAsyncMessageProcessingConsumer.initialize(SimpleMessageListenerContainer.java:1377)atorg.springframework.amqp.rabbit.listener.SimpleMessageListenerContainerAsyncMessageProcessingConsumer.initialize(SimpleMessageListenerContainer.java:1377) at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainerAsyncMessageProcessingConsumer.initialize(SimpleMessageListenerContainer.java:1377)atorg.springframework.amqp.rabbit.listener.SimpleMessageListenerContainerAsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1223)
at java.base/java.lang.Thread.run(Thread.java:832)

正在回答 回答被采纳积分+3

3回答

老舅的外甥 2024-06-04 19:02:36

请问问题解决了吗,我也遇到这个问题了


0 回复 有任何疑惑可以回复我~
神思者 2024-04-05 09:17:47

你用的不是课程提供的rabbitmq吗?用的是自己现有的mq?

0 回复 有任何疑惑可以回复我~
  • 提问者 wfdayduagj #1
    我用的是课程提供的rabbitmq
    回复 有任何疑惑可以回复我~ 2024-04-07 11:45:06
提问者 wfdayduagj 2024-04-04 16:33:34

https://img1.sycdn.imooc.com/szimg/660e65ca092fe6ce02070130.jpg配置也没问题为什么是访问本地的端口

0 回复 有任何疑惑可以回复我~
  • 云主机端口没开放吧
    回复 有任何疑惑可以回复我~ 2024-04-07 12:49:16
  • 提问者 wfdayduagj 回复 神思者 #2
    开放了,主要是他会自动访问本机的端口,本机没有rabbitmq
    回复 有任何疑惑可以回复我~ 2024-04-08 17:26:58
  • 提问者 wfdayduagj 回复 神思者 #3
    这个访问robbitmq的 的代码是哪一段,我没找到
    回复 有任何疑惑可以回复我~ 2024-04-08 23:49:21
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信