{"action":"created","issue":{"url":"https://api.github.com/repos/docker/compose/issues/4090","repository_url":"https://api.github.com/repos/docker/compose","labels_url":"https://api.github.com/repos/docker/compose/issues/4090/labels{/name}","comments_url":"https://api.github.com/repos/docker/compose/issues/4090/comments","events_url":"https://api.github.com/repos/docker/compose/issues/4090/events","html_url":"https://github.com/docker/compose/issues/4090","id":186020040,"number":4090,"title":"Event watcher thread dies when service is restarted","user":{"login":"caervs","id":706165,"avatar_url":"https://avatars.githubusercontent.com/u/706165?v=3","gravatar_id":"","url":"https://api.github.com/users/caervs","html_url":"https://github.com/caervs","followers_url":"https://api.github.com/users/caervs/followers","following_url":"https://api.github.com/users/caervs/following{/other_user}","gists_url":"https://api.github.com/users/caervs/gists{/gist_id}","starred_url":"https://api.github.com/users/caervs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caervs/subscriptions","organizations_url":"https://api.github.com/users/caervs/orgs","repos_url":"https://api.github.com/users/caervs/repos","events_url":"https://api.github.com/users/caervs/events{/privacy}","received_events_url":"https://api.github.com/users/caervs/received_events","type":"User","site_admin":false},"labels":[{"id":308280836,"url":"https://api.github.com/repos/docker/compose/labels/area/events","name":"area/events","color":"c7def8","default":false},{"id":441469436,"url":"https://api.github.com/repos/docker/compose/labels/docker-py","name":"docker-py","color":"8d66db","default":false},{"id":69777235,"url":"https://api.github.com/repos/docker/compose/labels/kind/bug","name":"kind/bug","color":"fc2929","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-10-28T20:55:53Z","updated_at":"2016-11-10T12:30:11Z","closed_at":null,"body":"When running\n\n```\ndocker-compose up\n```\n\nand subsequently restarting one of the services (well after it is fully up) there seems to be an exception that causes the thread monitoring events to die. What I see in the original log stream is\n\n```\nbms_bms_1 exited with code 137\nbms_bms_1 exited with code 137\nException in thread Thread-9:\nTraceback (most recent call last):\n  File \"threading.py\", line 810, in __bootstrap_inner\n  File \"threading.py\", line 763, in run\n  File \"compose/cli/log_printer.py\", line 197, in watch_events\n  File \"compose/project.py\", line 343, in events\n  File \"site-packages/docker/client.py\", line 259, in _stream_helper\n  File \"json/__init__.py\", line 338, in loads\n  File \"json/decoder.py\", line 369, in decode\nValueError: Extra data: line 2 column 1 - line 2 column 616 (char 612 - 1227)\n```\n\nSince it's easy for me to reproduce I can do some debugging to try to provide some more detail.\n"},"comment":{"url":"https://api.github.com/repos/docker/compose/issues/comments/259678234","html_url":"https://github.com/docker/compose/issues/4090#issuecomment-259678234","issue_url":"https://api.github.com/repos/docker/compose/issues/4090","id":259678234,"user":{"login":"stromnet","id":668449,"avatar_url":"https://avatars.githubusercontent.com/u/668449?v=3","gravatar_id":"","url":"https://api.github.com/users/stromnet","html_url":"https://github.com/stromnet","followers_url":"https://api.github.com/users/stromnet/followers","following_url":"https://api.github.com/users/stromnet/following{/other_user}","gists_url":"https://api.github.com/users/stromnet/gists{/gist_id}","starred_url":"https://api.github.com/users/stromnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stromnet/subscriptions","organizations_url":"https://api.github.com/users/stromnet/orgs","repos_url":"https://api.github.com/users/stromnet/repos","events_url":"https://api.github.com/users/stromnet/events{/privacy}","received_events_url":"https://api.github.com/users/stromnet/received_events","type":"User","site_admin":false},"created_at":"2016-11-10T12:30:11Z","updated_at":"2016-11-10T12:30:11Z","body":"Running docker-compose version 1.8.1 878cff1 from homebrew, I've added some dump-code to dump the JSON it fails on. \r\n\r\nThe JSON below is sent in one long string, here beautified (and cleaned up a bit):\r\n\r\n````\r\n'{\"status\":\"start\",\"id\":\"23643fdeb531be28823e8ce18b009e1db5161989122fc125e2cf09f8a9263e10\",\r\n\t\"from\":\"nginx:1.11-alpine\",\"Type\":\"container\",\"Action\":\"start\",\r\n\t\"Actor\": {\r\n    \"ID\": \"23643fdeb531be28823e8ce18b009e1db5161989122fc125e2cf09f8a9263e10\",\r\n    \"Attributes\": {\r\n        \"com.docker.compose.config-hash\": \"ff289be41eb800e7c429dbecdc02d4be08e6bea564b679713b33a35d6d2091b4\",\r\n        \"com.docker.compose.container-number\": \"1\",\r\n        \"com.docker.compose.oneoff\": \"False\",\r\n        \"com.docker.compose.project\": \"xxxx\",\r\n        \"com.docker.compose.service\": \"yyyy\",\r\n        \"com.docker.compose.version\": \"1.8.1\",\r\n        \"image\": \"nginx:1.11-alpine\",\r\n        \"name\": \"xxxx_yyy_1\"\r\n    }\r\n},\r\n\"time\": 1478780747, \"timeNano\": 1478780747846511815\r\n}\r\n{\r\n    \"status\": \"restart\",\r\n    \"id\": \"23643fdeb531be28823e8ce18b009e1db5161989122fc125e2cf09f8a9263e10\",\r\n    \"from\": \"nginx:1.11-alpine\",\r\n    \"Type\": \"container\",\r\n    \"Action\": \"restart\",\r\n    \"Actor\": {\r\n        \"ID\": \"23643fdeb531be28823e8ce18b009e1db5161989122fc125e2cf09f8a9263e10\",\r\n        \"Attributes\": {\r\n            \"com.docker.compose.config-hash\": \"ff289be41eb800e7c429dbecdc02d4be08e6bea564b679713b33a35d6d2091b4\",\r\n            \"com.docker.compose.container-number\": \"1\",\r\n            \"com.docker.compose.oneoff\": \"False\",\r\n            \"com.docker.compose.project\": \"xxxx\",\r\n            \"com.docker.compose.service\": \"yyyy\",\r\n            \"com.docker.compose.version\": \"1.8.1\",\r\n            \"image\": \"nginx:1.11-alpine\",\r\n            \"name\": \"xxx_yyy_1\"\r\n        }\r\n    },\r\n    \"time\": 1478780747,\r\n    \"timeNano\": 1478780747846596744\r\n}\r\n```\r\n\r\nHope it can help to find the issue."}}
{"actor":{"display_login":"stromnet"}}