spring rabbitmq client closes channel with error “Channel shutdown: connection error”

I am running a spring java application in a docker container which connects to rabbitMQ server running on other docker container.

I observed that when my application thread doing some long processing, in the middle of processing i am getting the following error messages from rabbitMQ on stdout.

  • Docker: Mount directory from one container to another
  • Docker container for Swagger UI not loading
  • docker COPY not working when deploying with docker-machine
  • Centos VM with Docker getting host unreachable when trying to connect to itself
  • How to get into container using GUI tool (like Kitematic) in Docker?
  • Docker volumes doesn't exist for data container in 1.9.1
  • ERROR CachingConnectionFactory:281 - Channel shutdown: connection error

    And after finishing of long processing by my process, getting the following heartbeat missing exception:

    Consumer raised exception, processing can restart if the connection factory supports it
    com.rabbitmq.client.ShutdownSignalException: connection error
            at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.checkShutdown(BlockingQueueConsumer.java:312)
            at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.nextMessage(BlockingQueueConsumer.java:367)
            at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.doReceiveAndExecute(SimpleMessageListenerContainer.java:1016)
            at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.receiveAndExecute(SimpleMessageListenerContainer.java:1005)
    ...
    
    Caused by: com.rabbitmq.client.MissedHeartbeatException: Heartbeat missing with heartbeat = 60 seconds
            at com.rabbitmq.client.impl.AMQConnection.handleSocketTimeout(AMQConnection.java:597)
            at com.rabbitmq.client.impl.AMQConnection.access$600(AMQConnection.java:65)
            at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:560)
            ... 1 more
    2016-04-11 05:59:08 INFO  SimpleMessageListenerContainer:1234 - Restarting Consumer: tags=[{amq.ctag-YW4oYetZsWNj12tXt-nX7g=dynamicModeling.queue}], channel=Cached Rabbit Channel: AMQChannel(amqp://guest@172.17.0.1:5672/,1), acknowledgeMode=AUTO local queue size=0
    

    rabbitMQ server side log errors are as below:

    =WARNING REPORT==== 11-Apr-2016::05:48:22 ===
    closing AMQP connection <0.942.0> (172.17.0.6:36993 -> 172.17.0.1:5672):
    client unexpectedly closed TCP connection
    

    Any suggestions?

    UPDATE:

    The following Docker commands used:

    rabbitMQ server :
    docker run -d –name rabbitmq -p 15672:15672 -p 5672:5672 rabbitMQImage

    my app container: docker run -d –name myAPP –link rabbitmq:rabbitmq myImage

  • Redis Docker - Unable to connect from C# client
  • Can't install docker - Permission denied?
  • Disk out of space on Azure Web app on Linux
  • `docker service update` from remote server with cert
  • How can I add automated tag to my Docker repository?
  • Can not connect to Postgres Container from pgAdmin
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.