{"action":"closed","issue":{"url":"https://api.github.com/repos/remind101/empire/issues/632","labels_url":"https://api.github.com/repos/remind101/empire/issues/632/labels{/name}","comments_url":"https://api.github.com/repos/remind101/empire/issues/632/comments","events_url":"https://api.github.com/repos/remind101/empire/issues/632/events","html_url":"https://github.com/remind101/empire/issues/632","id":98962567,"number":632,"title":"emp run on ECS creates a container and removes it immediately and doesn't return any output","user":{"login":"iserko","id":473071,"avatar_url":"https://avatars.githubusercontent.com/u/473071?v=3","gravatar_id":"","url":"https://api.github.com/users/iserko","html_url":"https://github.com/iserko","followers_url":"https://api.github.com/users/iserko/followers","following_url":"https://api.github.com/users/iserko/following{/other_user}","gists_url":"https://api.github.com/users/iserko/gists{/gist_id}","starred_url":"https://api.github.com/users/iserko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iserko/subscriptions","organizations_url":"https://api.github.com/users/iserko/orgs","repos_url":"https://api.github.com/users/iserko/repos","events_url":"https://api.github.com/users/iserko/events{/privacy}","received_events_url":"https://api.github.com/users/iserko/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-04T12:59:00Z","updated_at":"2015-08-04T18:06:23Z","closed_at":"2015-08-04T18:06:23Z","body":"When running `emp run -a app_name -- bash` on `ECS`, the terminal is blocked and after a minute of inaction it closes. `emp` is version `0.9.1`\r\nThere is no output and anything I type in isn't displayed.\r\n\r\nI would assume to get a bash prompt. PS: running `emp run -a app_name -- ls -al /` results in the same issue.\r\n\r\nWe're running empire off of the image created 3 days ago (Docker image ID: `a123d1d5c880`).\r\n\r\nLooking at the empire logs, we get:\r\n```\r\nt=2015-08-04T12:27:12+0000 lvl=info msg=request.start request_id=50da1f8e-90e0-4383-b79a-355b1c9fbc0e method=POST path=/apps/app_name/dynos\r\nt=2015-08-04T12:27:12+0000 lvl=info msg=authenticated request_id=50da1f8e-90e0-4383-b79a-355b1c9fbc0e user=iserko\r\nt=2015-08-04T12:27:14+0000 lvl=info msg=PullImage request_id=50da1f8e-90e0-4383-b79a-355b1c9fbc0e trace.id=5bf15b64-61ac-44f9-bc0c-22becd390c4f trace.parent= trace.func=github.com/remind101/empire/pkg/dockerutil.(*Client).PullImage trace.file=/go/src/github.com/remind101/empire/pkg/dockerutil/client.go trace.line=79 trace.duration=1.487322373s registry= repository=lyst/saul tag=latest\r\nt=2015-08-04T12:27:14+0000 lvl=info msg=CreateContainer request_id=50da1f8e-90e0-4383-b79a-355b1c9fbc0e trace.id=8baeafd0-a8ca-4532-859f-5c40aa794250 trace.parent= trace.func=github.com/remind101/empire/pkg/dockerutil.(*Client).CreateContainer trace.file=/go/src/github.com/remind101/empire/pkg/dockerutil/client.go trace.line=86 trace.duration=39.543787ms image=repo/app_name:latest\r\nt=2015-08-04T12:27:14+0000 lvl=info msg=StartContainer request_id=50da1f8e-90e0-4383-b79a-355b1c9fbc0e trace.id=2ed2bfe0-e8c7-4566-9dd2-6261ecf46800 trace.parent= trace.func=github.com/remind101/empire/pkg/dockerutil.(*Client).StartContainer trace.file=/go/src/github.com/remind101/empire/pkg/dockerutil/client.go trace.line=93 trace.duration=99.203046ms id=4ef5dad13d198f56053809d7fd7e021b35adce580d68949d6b338c947576aa4e\r\nt=2015-08-04T12:27:14+0000 lvl=info msg=AttachToContainer request_id=50da1f8e-90e0-4383-b79a-355b1c9fbc0e trace.id=5adf8065-37a9-4b53-b985-ca836dce89c0 trace.parent= trace.func=github.com/remind101/empire/pkg/dockerutil.(*Client).AttachToContainer trace.file=/go/src/github.com/remind101/empire/pkg/dockerutil/client.go trace.line=100 trace.duration=1.704048ms container=4ef5dad13d198f56053809d7fd7e021b35adce580d68949d6b338c947576aa4e\r\nt=2015-08-04T12:27:14+0000 lvl=eror msg= request_id=50da1f8e-90e0-4383-b79a-355b1c9fbc0e error=\"\\\"write tcp 172.31.14.45:61199: broken pipe\\\"\" line=102 file=/go/src/github.com/remind101/empire/pkg/dockerutil/client.go\r\nt=2015-08-04T12:27:14+0000 lvl=info msg=RemoveContainer request_id=50da1f8e-90e0-4383-b79a-355b1c9fbc0e trace.id=daa12736-c217-46a3-a7a4-f3cb3ae7d116 trace.parent= trace.func=github.com/remind101/empire/pkg/dockerutil.(*Client).RemoveContainer trace.file=/go/src/github.com/remind101/empire/pkg/dockerutil/client.go trace.line=114 trace.duration=131.922395ms id=4ef5dad13d198f56053809d7fd7e021b35adce580d68949d6b338c947576aa4e\r\nt=2015-08-04T12:27:14+0000 lvl=info msg=request.complete request_id=50da1f8e-90e0-4383-b79a-355b1c9fbc0e status=0\r\n```\r\n\r\nLooking at the tcpdump:\r\n```\r\nGET /apps/app_name/dynos HTTP/1.1\r\nHost: empire.example.com\r\nUser-Agent: hk/0.9.1 (darwin; amd64) heroku-go/0.10.2 (darwin; amd64)\r\nAccept: application/vnd.heroku+json; version=3\r\nAuthorization: Basic XYZ\r\nRequest-Id: 10280296-d3d0-4c7d-a3bd-54aa0b4ad958\r\nAccept-Encoding: gzip\r\n\r\n{\"command\":\"ls -al /\",\"attach\":true,\"env\":{\"COLUMNS\":\"179\",\"LINES\":\"77\",\"TERM\":\"xterm-color\"}}\r\n```\r\n\r\nI immediately see a response with:\r\n```\r\nHTTP/1.1 502 BAD_GATEWAY\r\nContent-Length: 0\r\nConnection: keep-alive\r\n```\r\n\r\nIf I type anything in the terminal I see the sent characters in `tcpdump`, but the terminal is silent.\r\nThen one minute or so later the connection is closed.\r\n\r\nSometimes it responds with the following instead of just disconnecting:\r\n```\r\nHTTP/1.1 408 REQUEST_TIMEOUT\r\nContent-Length:0\r\nConnection: Close\r\n```"}}