{"action":"created","issue":{"url":"https://api.github.com/repos/CiscoCloud/mesos-consul/issues/44","labels_url":"https://api.github.com/repos/CiscoCloud/mesos-consul/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/CiscoCloud/mesos-consul/issues/44/comments","events_url":"https://api.github.com/repos/CiscoCloud/mesos-consul/issues/44/events","html_url":"https://github.com/CiscoCloud/mesos-consul/issues/44","id":118457368,"number":44,"title":"Question about consul service registration with regards to ports and docker","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":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-11-23T19:45:46Z","updated_at":"2015-11-24T16:51:46Z","closed_at":null,"body":"i currently have an app that is running in a docker container using mesos scheduled with marathon, along with the mesos-consul bridge.\r\n\r\nCurrent marathon app configuration is using bridge networking and allowing mesos/marathon to select whatever port that is available for the host port, but the docker container itself is bound to 8080:\r\n\r\n{\r\n  \"container\": {\r\n    \"type\": \"DOCKER\",\r\n    \"docker\": {\r\n      \"image\": \"sarlindo/wildfly-app\",\r\n      \"network\": \"BRIDGE\",\r\n      \"portMappings\": [\r\n        { \"containerPort\": 8080, \"hostPort\": 0, \"servicePort\": 0, \"protocol\": \"tcp\" }\r\n      ]\r\n    }\r\n  },\r\n  \"id\": \"wildfly\",\r\n  \"cmd\": \"/opt/jboss/wildfly/bin/standalone.sh -b 0.0.0.0 -bmanagement=0.0.0.0\",\r\n  \"instances\": 1,\r\n  \"cpus\": 0.3,\r\n  \"mem\": 256\r\n}\r\n\r\nNow, when this service gets registered with consul by the mesos-consul bridge, I see it being registered to the following ip/port.\r\n\r\n172.17.0.4:31657\r\n\r\nNow the ip here is the internal docker ip and not the host and the port number is the host port that mesos/marathon assigned.\r\n\r\nThe issue now is I can't get to this service because inside the docker container the port is actually 8080. \r\n\r\nIs this the way this is suppose to work? Or am I doing something wrong here?\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/CiscoCloud/mesos-consul/issues/comments/159335388","html_url":"https://github.com/CiscoCloud/mesos-consul/issues/44#issuecomment-159335388","issue_url":"https://api.github.com/repos/CiscoCloud/mesos-consul/issues/44","id":159335388,"user":{"login":"ChrisAubuchon","id":1409344,"avatar_url":"https://avatars.githubusercontent.com/u/1409344?v=3","gravatar_id":"","url":"https://api.github.com/users/ChrisAubuchon","html_url":"https://github.com/ChrisAubuchon","followers_url":"https://api.github.com/users/ChrisAubuchon/followers","following_url":"https://api.github.com/users/ChrisAubuchon/following{/other_user}","gists_url":"https://api.github.com/users/ChrisAubuchon/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisAubuchon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisAubuchon/subscriptions","organizations_url":"https://api.github.com/users/ChrisAubuchon/orgs","repos_url":"https://api.github.com/users/ChrisAubuchon/repos","events_url":"https://api.github.com/users/ChrisAubuchon/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisAubuchon/received_events","type":"User","site_admin":false},"created_at":"2015-11-24T16:51:46Z","updated_at":"2015-11-24T16:51:46Z","body":"The command line arguments in the `args` list need to be separated:\r\n```\r\n\"args\": [\r\n  \"--zk=zk://192.168.33.10:2181/mesos\",\r\n  \"--mesos-ip-order=mesos,host\"\r\n  ],\r\n```\r\n\r\n"}}