Docker or docker-compose randomly failing

Actual behavior

docker compose is failing randomly.

Information

sending the last lines of the log.

mongodb_1  | 2016-06-17T15:19:55.210+0000 I NETWORK  [conn242] end connection 172.17.0.1:32780 (0 connections now open)
mongodb_1  | 2016-06-17T15:56:25.300+0000 I CONTROL  [signalProcessingThread] got signal 15 (Terminated), will terminate after current cmd ends
mongodb_1  | 2016-06-17T15:56:25.300+0000 I FTDC     [signalProcessingThread] Shutting down full-time diagnostic data capture
mongodb_1  | 2016-06-17T15:56:25.302+0000 I CONTROL  [signalProcessingThread] now exiting
mongodb_1  | 2016-06-17T15:56:25.302+0000 I NETWORK  [signalProcessingThread] shutdown: going to close listening sockets...
mongodb_1  | 2016-06-17T15:56:25.302+0000 I NETWORK  [signalProcessingThread] closing listening socket: 5
mongodb_1  | 2016-06-17T15:56:25.302+0000 I NETWORK  [signalProcessingThread] closing listening socket: 6
mongodb_1  | 2016-06-17T15:56:25.302+0000 I NETWORK  [signalProcessingThread] removing socket file: /tmp/mongodb-27017.sock
mongodb_1  | 2016-06-17T15:56:25.303+0000 I NETWORK  [signalProcessingThread] shutdown: going to flush diaglog...
mongodb_1  | 2016-06-17T15:56:25.303+0000 I NETWORK  [signalProcessingThread] shutdown: going to close sockets...
mongodb_1  | 2016-06-17T15:56:25.303+0000 I STORAGE  [signalProcessingThread] WiredTigerKVEngine shutting down
mongodb_1  | 2016-06-17T15:56:25.526+0000 I STORAGE  [signalProcessingThread] shutdown: removing fs lock...
mongodb_1  | 2016-06-17T15:56:25.527+0000 I CONTROL  [signalProcessingThread] dbexit:  rc: 0
Exception in thread Thread-2:
Traceback (most recent call last):
  File "threading.py", line 810, in __bootstrap_inner
  File "threading.py", line 763, in run
  File "compose/cli/log_printer.py", line 149, in tail_container_logs
  File "compose/cli/log_printer.py", line 179, in wait_on_exit
  File "compose/container.py", line 239, in wait
  File "site-packages/docker/utils/decorators.py", line 21, in wrapped
  File "site-packages/docker/api/container.py", line 439, in wait
  File "site-packages/docker/client.py", line 154, in _raise_for_status
APIError: 502 Server Error: Bad Gateway ("Bad response from Docker engine")

docker-compose.yml

mongodb:
  image: mongo:latest
  ports:
    - 27017:27017

Steps to reproduce the behavior

  1. docker-compose up
  2. runs my app from the host connected to container mongo
  3. randomly fails with the message above
1 Like

This is not happening anymore.
Thanks.