{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/14621","labels_url":"https://api.github.com/repos/docker/docker/issues/14621/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/14621/comments","events_url":"https://api.github.com/repos/docker/docker/issues/14621/events","html_url":"https://github.com/docker/docker/issues/14621","id":94914105,"number":14621,"title":"daemon crashing on invalid ports directive","user":{"login":"spacediver","id":1192201,"avatar_url":"https://avatars.githubusercontent.com/u/1192201?v=3","gravatar_id":"","url":"https://api.github.com/users/spacediver","html_url":"https://github.com/spacediver","followers_url":"https://api.github.com/users/spacediver/followers","following_url":"https://api.github.com/users/spacediver/following{/other_user}","gists_url":"https://api.github.com/users/spacediver/gists{/gist_id}","starred_url":"https://api.github.com/users/spacediver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spacediver/subscriptions","organizations_url":"https://api.github.com/users/spacediver/orgs","repos_url":"https://api.github.com/users/spacediver/repos","events_url":"https://api.github.com/users/spacediver/events{/privacy}","received_events_url":"https://api.github.com/users/spacediver/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/kind/bug","name":"kind/bug","color":"FF8C94"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-07-14T10:23:22Z","updated_at":"2015-07-15T00:20:32Z","closed_at":null,"body":"Hi folks,\r\n\r\nConsider the following docker-compose.yml\r\n\r\n    test:\r\n        image: spacediver/python\r\n        ports:\r\n          - \"127.0.0.180:80\"\r\n\r\nNotice the error in ports, originally I meant  to say \"127.0.0.1:80:80\"\r\n\r\nTrying to start it we may see (with docker 1.7.0, docker-compose 1.3.0) this:\r\n\r\n    root@17934123d4d1:~# docker-compose up                 \r\n    Creating root_test_1...\r\n    Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?\r\n    \r\nWhy would this happen? \r\n\r\nRunning docker with -D reveals (http://pastebin.com/caDWGW8Q) that there's an exception in daemon that happens at parsing invalid ports directive (\"127.0.0.180:80\")\r\n\r\nTrying to run the same with docker CLI would validate ports directive well before sending to daemon:\r\n\r\n    root@17934123d4d1:~# docker run --rm -ti -p 127.0.0.180:80 spacediver/python \r\n    docker: Invalid hostPort: 127.0.0.180.\r\n    See 'docker run --help'.\r\n\r\nShould the daemon check input data and do not crash on parsing error?\r\n\r\nHere is my environment information: http://pastebin.com/3LaAh4YT"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/121433897","html_url":"https://github.com/docker/docker/issues/14621#issuecomment-121433897","issue_url":"https://api.github.com/repos/docker/docker/issues/14621","id":121433897,"user":{"login":"spacediver","id":1192201,"avatar_url":"https://avatars.githubusercontent.com/u/1192201?v=3","gravatar_id":"","url":"https://api.github.com/users/spacediver","html_url":"https://github.com/spacediver","followers_url":"https://api.github.com/users/spacediver/followers","following_url":"https://api.github.com/users/spacediver/following{/other_user}","gists_url":"https://api.github.com/users/spacediver/gists{/gist_id}","starred_url":"https://api.github.com/users/spacediver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spacediver/subscriptions","organizations_url":"https://api.github.com/users/spacediver/orgs","repos_url":"https://api.github.com/users/spacediver/repos","events_url":"https://api.github.com/users/spacediver/events{/privacy}","received_events_url":"https://api.github.com/users/spacediver/received_events","type":"User","site_admin":false},"created_at":"2015-07-15T00:20:32Z","updated_at":"2015-07-15T00:20:32Z","body":"Here is docker-compose --verbose output, it might help to reconstruct direct requests (you can see jsons dumped in python format). http://pastebin.com/raw.php?i=vEmrp0jv\r\n\r\nIt may be seen that container gets created with wrong port binding, and then crashes on starting. "}}