{"action":"closed","issue":{"url":"https://api.github.com/repos/docker/swarm/issues/1067","labels_url":"https://api.github.com/repos/docker/swarm/issues/1067/labels{/name}","comments_url":"https://api.github.com/repos/docker/swarm/issues/1067/comments","events_url":"https://api.github.com/repos/docker/swarm/issues/1067/events","html_url":"https://github.com/docker/swarm/issues/1067","id":95506076,"number":1067,"title":"Swarm panic on trying to create container through API","user":{"login":"sayash","id":2565927,"avatar_url":"https://avatars.githubusercontent.com/u/2565927?v=3","gravatar_id":"","url":"https://api.github.com/users/sayash","html_url":"https://github.com/sayash","followers_url":"https://api.github.com/users/sayash/followers","following_url":"https://api.github.com/users/sayash/following{/other_user}","gists_url":"https://api.github.com/users/sayash/gists{/gist_id}","starred_url":"https://api.github.com/users/sayash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sayash/subscriptions","organizations_url":"https://api.github.com/users/sayash/orgs","repos_url":"https://api.github.com/users/sayash/repos","events_url":"https://api.github.com/users/sayash/events{/privacy}","received_events_url":"https://api.github.com/users/sayash/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/swarm/labels/area/API","name":"area/API","color":"fbca04"},{"url":"https://api.github.com/repos/docker/swarm/labels/kind/bug","name":"kind/bug","color":"fc2929"},{"url":"https://api.github.com/repos/docker/swarm/labels/priority/P1","name":"priority/P1","color":"bfd4f2"}],"state":"closed","locked":false,"assignee":{"login":"aluzzardi","id":179503,"avatar_url":"https://avatars.githubusercontent.com/u/179503?v=3","gravatar_id":"","url":"https://api.github.com/users/aluzzardi","html_url":"https://github.com/aluzzardi","followers_url":"https://api.github.com/users/aluzzardi/followers","following_url":"https://api.github.com/users/aluzzardi/following{/other_user}","gists_url":"https://api.github.com/users/aluzzardi/gists{/gist_id}","starred_url":"https://api.github.com/users/aluzzardi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aluzzardi/subscriptions","organizations_url":"https://api.github.com/users/aluzzardi/orgs","repos_url":"https://api.github.com/users/aluzzardi/repos","events_url":"https://api.github.com/users/aluzzardi/events{/privacy}","received_events_url":"https://api.github.com/users/aluzzardi/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/docker/swarm/milestones/4","html_url":"https://github.com/docker/swarm/milestones/0.4.0","labels_url":"https://api.github.com/repos/docker/swarm/milestones/4/labels","id":1093216,"number":4,"title":"0.4.0","description":"","creator":{"login":"aluzzardi","id":179503,"avatar_url":"https://avatars.githubusercontent.com/u/179503?v=3","gravatar_id":"","url":"https://api.github.com/users/aluzzardi","html_url":"https://github.com/aluzzardi","followers_url":"https://api.github.com/users/aluzzardi/followers","following_url":"https://api.github.com/users/aluzzardi/following{/other_user}","gists_url":"https://api.github.com/users/aluzzardi/gists{/gist_id}","starred_url":"https://api.github.com/users/aluzzardi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aluzzardi/subscriptions","organizations_url":"https://api.github.com/users/aluzzardi/orgs","repos_url":"https://api.github.com/users/aluzzardi/repos","events_url":"https://api.github.com/users/aluzzardi/events{/privacy}","received_events_url":"https://api.github.com/users/aluzzardi/received_events","type":"User","site_admin":false},"open_issues":28,"closed_issues":35,"state":"open","created_at":"2015-05-02T03:03:31Z","updated_at":"2015-08-05T00:24:55Z","due_on":"2015-08-04T07:00:00Z","closed_at":null},"comments":12,"created_at":"2015-07-16T19:18:55Z","updated_at":"2015-08-05T00:24:55Z","closed_at":"2015-08-05T00:24:55Z","body":"Reporting a potential bug.\r\n\r\nI'm sending a POST request to swarm to create a new container, but the socket closes abruptly for me, and when I check swarm logs, this is what I see:\r\n\r\n```\r\n2015/07/16 18:56:26 http: panic serving 10.0.2.2:55145: runtime error: invalid memory address or nil pointer dereference  \r\ngoroutine 28024 [running]:  \r\nnet/http.func·011()  \r\n        /usr/src/go/src/pkg/net/http/server.go:1100 +0xb7  \r\nruntime.panic(0x963280, 0xcd5d33)  \r\n        /usr/src/go/src/pkg/runtime/panic.c:248 +0x18d  \r\ngithub.com/docker/swarm/api.postContainersCreate(0xc20808f1c0, 0x7f0c26c88c30, 0xc208425360, 0xc208456f70)  \r\n        /go/src/github.com/docker/swarm/api/handlers.go:342 +0x614  \r\ngithub.com/docker/swarm/api.func·008(0x7f0c26c88c30, 0xc208425360, 0xc208456f70)  \r\n        /go/src/github.com/docker/swarm/api/primary.go:111 +0x2a0  \r\nnet/http.HandlerFunc.ServeHTTP(0xc2080efd60, 0x7f0c26c88c30, 0xc208425360, 0xc208456f70)  \r\n        /usr/src/go/src/pkg/net/http/server.go:1235 +0x40  \r\ngithub.com/gorilla/mux.(*Router).ServeHTTP(0xc2080df090, 0x7f0c26c88c30, 0xc208425360, 0xc208456f70)  \r\n        /go/src/github.com/docker/swarm/Godeps/_workspace/src/github.com/gorilla/mux/mux.go:98 +0x292  \r\ngithub.com/docker/swarm/api.(*dispatcher).ServeHTTP(0xc208039ed0, 0x7f0c26c88c30, 0xc208425360, 0xc208456f70)  \r\n        /go/src/github.com/docker/swarm/api/server.go:32 +0x9d  \r\nnet/http.serverHandler.ServeHTTP(0xc208106de0, 0x7f0c26c88c30, 0xc208425360, 0xc208456f70)  \r\n        /usr/src/go/src/pkg/net/http/server.go:1673 +0x19f  \r\nnet/http.(*conn).serve(0xc2084a0700)  \r\n        /usr/src/go/src/pkg/net/http/server.go:1174 +0xa7e  \r\ncreated by net/http.(*Server).Serve  \r\n        /usr/src/go/src/pkg/net/http/server.go:1721 +0x313  \r\n```\r\nAfter I restart swarm, it works fine.\r\n\r\nThe swarm has been created by docker-machine (v0.3.0), Docker engine v1.7.1, which is running the swarm image id - 446e413bd987."}}