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.

  • How to export the data in docker container?
  • How to run a cron job inside a docker container?
  • Rundeck is not showing docker containers in nodes
  • Docker on CentOS with bridge to LAN network
  • docker os container vs app container
  • Why do I get unauthorized: authentication required from a docker pull from docker hub?
  • 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@,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> ( ->
    client unexpectedly closed TCP connection

    Any suggestions?


    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

  • Memory usage of Docker containers
  • From Docker container on Remote (Ubuntu 16) server run Jupyter Notebook on Local (OSx)
  • Close Docker expose port from parent file
  • Copy files and create symlink from a shared volume on Docker on container start
  • Is it possible to use docker with jrebel or dcevm
  • Use real server instead of docker-machine for OSX
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.