{"action":"created","issue":{"url":"https://api.github.com/repos/mesosphere/marathon/issues/2555","labels_url":"https://api.github.com/repos/mesosphere/marathon/issues/2555/labels{/name}","comments_url":"https://api.github.com/repos/mesosphere/marathon/issues/2555/comments","events_url":"https://api.github.com/repos/mesosphere/marathon/issues/2555/events","html_url":"https://github.com/mesosphere/marathon/issues/2555","id":114850547,"number":2555,"title":"Marathon keeps trying to start docker containers, even though instances are set at 1","user":{"login":"sarlindo","id":6406166,"avatar_url":"https://avatars.githubusercontent.com/u/6406166?v=3","gravatar_id":"","url":"https://api.github.com/users/sarlindo","html_url":"https://github.com/sarlindo","followers_url":"https://api.github.com/users/sarlindo/followers","following_url":"https://api.github.com/users/sarlindo/following{/other_user}","gists_url":"https://api.github.com/users/sarlindo/gists{/gist_id}","starred_url":"https://api.github.com/users/sarlindo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarlindo/subscriptions","organizations_url":"https://api.github.com/users/sarlindo/orgs","repos_url":"https://api.github.com/users/sarlindo/repos","events_url":"https://api.github.com/users/sarlindo/events{/privacy}","received_events_url":"https://api.github.com/users/sarlindo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2015-11-03T16:11:33Z","updated_at":"2015-11-20T15:21:26Z","closed_at":"2015-11-17T15:46:13Z","body":"I am running into an issue where marathon keeps trying to start docker containers, even though instances are set at 1.\r\n\r\n**My Environment:**\r\n\r\nmarathon version 0.11.1, docker version 1.8.3 running on ubuntu 14.04.\r\n\r\n**Steps:**\r\n\r\na) through the marathon gui I created a new app with the following command that will startup a jenkins container.\r\n\r\nsudo docker run -d -u root -p 8090:8080 -v /var/jenkins_home csanchez/jenkins-for-volumes\r\n\r\ninstances are set to 1.\r\n\r\n**Results:**\r\n\r\nmarathon starts the container properly because when I do a \"docker ps\" i see the container running and I can also navigate to the jenkins app without issue.\r\n\r\nHowever, marathon for some reason keeps trying to execute the container.\r\n\r\nIn the mesos framework UI \"sandbox\" in the stdout logs I see the first start of the container, which is good:\r\n\r\n> Registered executor on node2\r\n> \r\n> \r\n> > \r\n> > Starting task jenkins.0c3759e5-8240-11e5-a1f1-0800271b9791 sh -c 'sudo\r\n> > docker run -d -u root -p 8090:8080 -v /var/jenkins_home\r\n> > csanchez/jenkins-for-volumes ' Forked command at 2694\r\n> > effba5cc78bc810e6e4cce3b578fbe7381035f47c6e912d0ac951aec432d0ef9\r\n> > Command exited with status 0 (pid: 2694)\r\n\r\n\r\nBUT, then I see a bunch of failures after because marathon is trying to start another container and failing on port binding as can be seen in the \"stderr\" logs:\r\n\r\n> I1103 15:31:19.721882  2792 exec.cpp:134] Version: 0.25.0 I1103\r\n> 15:31:19.769901  2797 exec.cpp:208] Executor registered on slave\r\n> d2bf6a4e-f666-4d92-a2a6-74a8f5daf9a3-S1 Error response from daemon:\r\n> Cannot start container\r\n> 1d4eb6c91afeecf60e6ca258c6f85df7e51ef33ec0fcfa2514b6209f408345fd: Bind\r\n> for 0.0.0.0:8090 failed: port is already allocated\r\n\r\n\r\nThis to me seems like some sort of bug? Why does marathon keep trying to start up containers?"},"comment":{"url":"https://api.github.com/repos/mesosphere/marathon/issues/comments/158430255","html_url":"https://github.com/mesosphere/marathon/issues/2555#issuecomment-158430255","issue_url":"https://api.github.com/repos/mesosphere/marathon/issues/2555","id":158430255,"user":{"login":"sarlindo","id":6406166,"avatar_url":"https://avatars.githubusercontent.com/u/6406166?v=3","gravatar_id":"","url":"https://api.github.com/users/sarlindo","html_url":"https://github.com/sarlindo","followers_url":"https://api.github.com/users/sarlindo/followers","following_url":"https://api.github.com/users/sarlindo/following{/other_user}","gists_url":"https://api.github.com/users/sarlindo/gists{/gist_id}","starred_url":"https://api.github.com/users/sarlindo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarlindo/subscriptions","organizations_url":"https://api.github.com/users/sarlindo/orgs","repos_url":"https://api.github.com/users/sarlindo/repos","events_url":"https://api.github.com/users/sarlindo/events{/privacy}","received_events_url":"https://api.github.com/users/sarlindo/received_events","type":"User","site_admin":false},"created_at":"2015-11-20T15:21:25Z","updated_at":"2015-11-20T15:21:25Z","body":"@kolloch : Understood thanks."}}