{"action":"created","issue":{"url":"https://api.github.com/repos/moby/moby/issues/35318","repository_url":"https://api.github.com/repos/moby/moby","labels_url":"https://api.github.com/repos/moby/moby/issues/35318/labels{/name}","comments_url":"https://api.github.com/repos/moby/moby/issues/35318/comments","events_url":"https://api.github.com/repos/moby/moby/issues/35318/events","html_url":"https://github.com/moby/moby/issues/35318","id":269097860,"number":35318,"title":"SWARM Mode - Docker binds ingress ports always on 0.0.0.0","user":{"login":"eyenx","id":1947882,"avatar_url":"https://avatars2.githubusercontent.com/u/1947882?v=4","gravatar_id":"","url":"https://api.github.com/users/eyenx","html_url":"https://github.com/eyenx","followers_url":"https://api.github.com/users/eyenx/followers","following_url":"https://api.github.com/users/eyenx/following{/other_user}","gists_url":"https://api.github.com/users/eyenx/gists{/gist_id}","starred_url":"https://api.github.com/users/eyenx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eyenx/subscriptions","organizations_url":"https://api.github.com/users/eyenx/orgs","repos_url":"https://api.github.com/users/eyenx/repos","events_url":"https://api.github.com/users/eyenx/events{/privacy}","received_events_url":"https://api.github.com/users/eyenx/received_events","type":"User","site_admin":false},"labels":[{"id":392678049,"url":"https://api.github.com/repos/moby/moby/labels/area/swarm","name":"area/swarm","color":"fbca04","default":false},{"id":687939503,"url":"https://api.github.com/repos/moby/moby/labels/version/17.09","name":"version/17.09","color":"ededed","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-10-27T12:56:51Z","updated_at":"2017-10-27T14:19:15Z","closed_at":"2017-10-27T13:44:11Z","author_association":"NONE","body":"<!--\r\nIf you are reporting a new issue, make sure that we do not have any duplicates\r\nalready open. You can ensure this by searching the issue list for this\r\nrepository. If there is a duplicate, please close your issue and add a comment\r\nto the existing issue instead.\r\n\r\nIf you suspect your issue is a bug, please edit your issue description to\r\ninclude the BUG REPORT INFORMATION shown below. If you fail to provide this\r\ninformation within 7 days, we cannot debug your issue and will close it. We\r\nwill, however, reopen it if you later provide the information.\r\n\r\nFor more information about reporting issues, see\r\nhttps://github.com/moby/moby/blob/master/CONTRIBUTING.md#reporting-other-issues\r\n\r\n---------------------------------------------------\r\nGENERAL SUPPORT INFORMATION\r\n---------------------------------------------------\r\n\r\nThe GitHub issue tracker is for bug reports and feature requests.\r\nGeneral support for **docker** can be found at the following locations:\r\n\r\n- Docker Support Forums - https://forums.docker.com\r\n- Slack - community.docker.com #general channel\r\n- Post a question on StackOverflow, using the Docker tag\r\n\r\nGeneral support for **moby** can be found at the following locations:\r\n\r\n- Moby Project Forums - https://forums.mobyproject.org\r\n- Slack - community.docker.com #moby-project channel\r\n- Post a question on StackOverflow, using the Moby tag\r\n\r\n---------------------------------------------------\r\nBUG REPORT INFORMATION\r\n---------------------------------------------------\r\nUse the commands below to provide key information from your environment:\r\nYou do NOT have to include this information if this is a FEATURE REQUEST\r\n-->\r\n\r\n**Description**\r\n\r\nWe have multiple hosts using swarm mode. \r\n\r\nSome of this hosts have two or more external IP addresses. Docker swarm services with published ports always bind to 0.0.0.0:<port>. Even after launching dockerd with --ip=xxx.xxx.xxx.xx.\r\n\r\nContainer not started in swarm mode, are binding to the correct IP. Services in Swarm are always binding published ports to every IP known by the Host (eno1,eno2 and lo). We cannot use the second IP with a port already taken by docker swarm. \r\n\r\n**Steps to reproduce the issue:**\r\n1. Create a Docker Service in Swarm with published Ports\r\n2. netstat -utelpna | grep <port>\r\n3. Port is bound on 0.0.0.0:<port>\r\n\r\n**Describe the results you received:**\r\n\r\nStarted dockerd with --ip argument:\r\n\r\nroot      4869  1.1 10.0 2749972 102920 ?      Ssl  12:36   0:12 /usr/bin/dockerd -H fd:// --ip=139.59.215.247 --swarm-default-advertise-addr=139.59.215.247\r\n\r\nSwarm services bind published ports to every IP known by the system (0.0.0.0).\r\n\r\n**Describe the results you expected:**\r\n\r\nExpected swarm services to bind published ports only on IP 139.59.215.247.\r\n\r\n**Additional information you deem important (e.g. issue happens only occasionally):**\r\n\r\n**Output of `docker version`:**\r\n\r\n```\r\nClient:\r\n Version:      17.09.0-ce\r\n API version:  1.32\r\n Go version:   go1.8.3\r\n Git commit:   afdb6d4\r\n Built:        Tue Sep 26 22:42:09 2017\r\n OS/Arch:      linux/amd64\r\n\r\nServer:\r\n Version:      17.09.0-ce\r\n API version:  1.32 (minimum version 1.12)\r\n Go version:   go1.8.3\r\n Git commit:   afdb6d4\r\n Built:        Tue Sep 26 22:40:48 2017\r\n OS/Arch:      linux/amd64\r\n Experimental: false\r\n```\r\n\r\n**Output of `docker info`:**\r\n\r\n```\r\nContainers: 29\r\n Running: 4\r\n Paused: 0\r\n Stopped: 25\r\nImages: 65\r\nServer Version: 17.09.0-ce\r\nStorage Driver: aufs\r\n Root Dir: /var/lib/docker/aufs\r\n Backing Filesystem: extfs\r\n Dirs: 554\r\n Dirperm1 Supported: true\r\nLogging Driver: json-file\r\nCgroup Driver: cgroupfs\r\nPlugins:\r\n Volume: local\r\n Network: bridge host macvlan null overlay\r\n Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog\r\nSwarm: active\r\n NodeID: lbvavrurdt9edmfb44eshjbqk\r\n Is Manager: true\r\n ClusterID: 3uthkj04fn1rv2htzljm2imo9\r\n Managers: 1\r\n Nodes: 2\r\n Orchestration:\r\n  Task History Retention Limit: 5\r\n Raft:\r\n  Snapshot Interval: 10000\r\n  Number of Old Snapshots to Retain: 0\r\n  Heartbeat Tick: 1\r\n  Election Tick: 3\r\n Dispatcher:\r\n  Heartbeat Period: 5 seconds\r\n CA Configuration:\r\n  Expiry Duration: 3 months\r\n  Force Rotate: 0\r\n Autolock Managers: false\r\n Root Rotation In Progress: false\r\n Node Address: 139.59.215.247\r\n Manager Addresses:\r\n  139.59.215.247:2377\r\nRuntimes: runc\r\nDefault Runtime: runc\r\nInit Binary: docker-init\r\ncontainerd version: 06b9cb35161009dcb7123345749fef02f7cea8e0\r\nrunc version: 3f2f8b84a77f73d38244dd690525642a72156c64\r\ninit version: 949e6fa\r\nSecurity Options:\r\n seccomp\r\n  Profile: default\r\nKernel Version: 4.9.0-4-amd64\r\nOperating System: Debian GNU/Linux 9 (stretch)\r\nOSType: linux\r\nArchitecture: x86_64\r\nCPUs: 1\r\nTotal Memory: 996.6MiB\r\nName: dev1\r\nID: CDVW:ZY3R:JMYQ:AW3L:CC6K:F7RL:JRZX:GPXQ:FOD6:4VTI:7TZV:7JDC\r\nDocker Root Dir: /var/lib/docker\r\nDebug Mode (client): false\r\nDebug Mode (server): false\r\nRegistry: https://index.docker.io/v1/\r\nExperimental: false\r\nInsecure Registries:\r\n 127.0.0.0/8\r\nLive Restore Enabled: false\r\n\r\nWARNING: No swap limit support\r\n\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/moby/moby/issues/comments/339984833","html_url":"https://github.com/moby/moby/issues/35318#issuecomment-339984833","issue_url":"https://api.github.com/repos/moby/moby/issues/35318","id":339984833,"user":{"login":"cpuguy83","id":799078,"avatar_url":"https://avatars3.githubusercontent.com/u/799078?v=4","gravatar_id":"","url":"https://api.github.com/users/cpuguy83","html_url":"https://github.com/cpuguy83","followers_url":"https://api.github.com/users/cpuguy83/followers","following_url":"https://api.github.com/users/cpuguy83/following{/other_user}","gists_url":"https://api.github.com/users/cpuguy83/gists{/gist_id}","starred_url":"https://api.github.com/users/cpuguy83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpuguy83/subscriptions","organizations_url":"https://api.github.com/users/cpuguy83/orgs","repos_url":"https://api.github.com/users/cpuguy83/repos","events_url":"https://api.github.com/users/cpuguy83/events{/privacy}","received_events_url":"https://api.github.com/users/cpuguy83/received_events","type":"User","site_admin":false},"created_at":"2017-10-27T14:19:15Z","updated_at":"2017-10-27T14:19:15Z","author_association":"CONTRIBUTOR","body":"@eyenx That seems correct as the service could be scheduled anywhere on the cluster."}}
{"actor":{"display_login":"cpuguy83"}}