Docker Compose shows error when stopping

Expected behavior

Containers currently being managed via Docker Compose are stopped.

Actual behavior

The containers are stopped. But, an exception occurs along the way.

^CGracefully stopping… (press Ctrl+C again to force)
Stopping dockerconveris_converis_1 …
Stopping dockerconveris_converis-dis_1 …
Stopping dockerconveris_converis-search_1 …
Stopping dockerconveris_converis-chemistry_1 …
Stopping dockerconveris_converis-database_1 …
Exception in thread Thread-11:
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 190, in watch_events
File “compose/project.py”, line 343, in events
Stopping dockerconveris_converis_1 … done
Stopping dockerconveris_converis-dis_1 … done
Stopping dockerconveris_converis-search_1 … done
Stopping dockerconveris_converis-chemistry_1 … done
Stopping dockerconveris_converis-database_1 … done

Information

king-mbp:docker-converis king$ pinata diagnose -u
OS X: version 10.11.4 (build: 15E65)
Docker.app: version v1.11.0-beta8.2
Running diagnostic tests:
[OK] docker-cli
[OK] Moby booted
[OK] driver.amd64-linux
[OK] vmnetd
[OK] osxfs
[OK] db
[OK] slirp
[OK] menubar
[OK] environment
[OK] Docker
[OK] VT-x
Docker logs are being collected into /tmp/20160427-161103.tar.gz
Most specific failure is: No error was detected
Your unique id is: 89DDA91E-6706-49D7-A40B-BE09ED265728
Please quote this in all correspondence.

Steps to reproduce the behavior

Unfortunately, I can’t provide my containers.

  1. docker-compose up
  2. wait for containers to start up
  3. Control-C

Am also seeing this error when stopping compose with Docker For Mac

Here’s a better copy of the output with the full traceback before it gets overwritten by further output.

Stopping dockerconveris_converis-web_1 ... done
Stopping dockerconveris_converis_1 ... done
Stopping dockerconveris_converis-dis_1 ... 
Stopping dockerconveris_converis-search_1 ... 
Stopping dockerconveris_converis-database_1 ... 
Stopping dockerconveris_converis-chemistry_1 ... 
Exception in thread Thread-13:
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 190, in watch_events
  File "compose/project.py", line 343, in events
  File "site-packages/docker/client.py", line 233, in _stream_helper
  File "json/__init__.py", line 338, in loads
  File "json/decoder.py", line 369, in decode
ValueError: Extra data: line 2 column 1 - line 4 column 1 (char 702 - 2150)

I am seeing this as well. Happens about 80% of the time. There’s also a long pause between when I Ctrl-C and when it begins stopping containers.

Still happening as of beta17

ValueError: Extra data: line 2 column 1 - line 3 column 1 (char 666 - 1307)

Pretty consistent on graceful shutdown (after long pause).

I am here to mention that this is still happening after the stable release - 1.12.1. Is there anything I can do to mitigate it? It really puts a damper on my processes.