org.springframework.messaging.MessagingException: Dispatcher failed to deliver Message; nested exception is org.springframework.messaging.MessagingException: Failed to connect; nested exception is Unable to connect to server (32103) - java.net.ConnectException: Connection refused

tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    How to implement MQTT server using Spring Integration?

    Stack Overflow | 5 months ago | Alexander Farber
    org.springframework.messaging.MessagingException: Dispatcher failed to deliver Message; nested exception is org.springframework.messaging.MessagingException: Failed to connect; nested exception is Unable to connect to server (32103) - java.net.ConnectException: Connection refused

    Root Cause Analysis

    1. org.springframework.messaging.MessagingException

      Failed to connect; nested exception is Unable to connect to server (32103) - java.net.ConnectException: Connection refused

      at org.springframework.integration.mqtt.outbound.MqttPahoMessageHandler.checkConnection()
    2. org.springframework.integration
      AbstractMqttMessageHandler.handleMessageInternal
      1. org.springframework.integration.mqtt.outbound.MqttPahoMessageHandler.checkConnection(MqttPahoMessageHandler.java:180)
      2. org.springframework.integration.mqtt.outbound.MqttPahoMessageHandler.publish(MqttPahoMessageHandler.java:189)
      3. org.springframework.integration.mqtt.outbound.AbstractMqttMessageHandler.handleMessageInternal(AbstractMqttMessageHandler.java:150)
      3 frames
    3. Spring Integration Core
      AbstractMessageChannel.send
      1. org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:127)
      2. org.springframework.integration.config.annotation.ServiceActivatorAnnotationPostProcessor$ReplyProducingMessageHandlerWrapper.handleRequestMessage(ServiceActivatorAnnotationPostProcessor.java:98)
      3. org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:109)
      4. org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:127)
      5. org.springframework.integration.dispatcher.AbstractDispatcher.tryOptimizedDispatch(AbstractDispatcher.java:116)
      6. org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:148)
      7. org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:121)
      8. org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:77)
      9. org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:423)
      10. org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:373)
      10 frames
    4. Spring Messaging
      AbstractMessageSendingTemplate.convertAndSend
      1. org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:115)
      2. org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:45)
      3. org.springframework.messaging.core.AbstractMessageSendingTemplate.send(AbstractMessageSendingTemplate.java:105)
      4. org.springframework.messaging.core.AbstractMessageSendingTemplate.convertAndSend(AbstractMessageSendingTemplate.java:143)
      5. org.springframework.messaging.core.AbstractMessageSendingTemplate.convertAndSend(AbstractMessageSendingTemplate.java:135)
      5 frames
    5. Spring Integration Core
      GatewayCompletableFutureProxyFactoryBean.invoke
      1. org.springframework.integration.gateway.MessagingGatewaySupport.send(MessagingGatewaySupport.java:375)
      2. org.springframework.integration.gateway.GatewayProxyFactoryBean.invokeGatewayMethod(GatewayProxyFactoryBean.java:477)
      3. org.springframework.integration.gateway.GatewayProxyFactoryBean.doInvoke(GatewayProxyFactoryBean.java:429)
      4. org.springframework.integration.gateway.GatewayProxyFactoryBean.invoke(GatewayProxyFactoryBean.java:420)
      5. org.springframework.integration.gateway.GatewayCompletableFutureProxyFactoryBean.invoke(GatewayCompletableFutureProxyFactoryBean.java:65)
      5 frames
    6. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
      2 frames
    7. com.sun.proxy
      $Proxy40.sendToMqtt
      1. com.sun.proxy.$Proxy40.sendToMqtt(Unknown Source)
      1 frame
    8. de.afarber.mqttoutbound
      MqttJavaApplication.main
      1. de.afarber.mqttoutbound.MqttJavaApplication.main(MqttJavaApplication.java:27)
      1 frame