{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/25981","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/25981/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/25981/comments","events_url":"https://api.github.com/repos/docker/docker/issues/25981/events","html_url":"https://github.com/docker/docker/issues/25981","id":172948515,"number":25981,"title":"[BUG] Docker-proxy binds on ports but no container is running (anymore)","user":{"login":"nagua","id":3310583,"avatar_url":"https://avatars.githubusercontent.com/u/3310583?v=3","gravatar_id":"","url":"https://api.github.com/users/nagua","html_url":"https://github.com/nagua","followers_url":"https://api.github.com/users/nagua/followers","following_url":"https://api.github.com/users/nagua/following{/other_user}","gists_url":"https://api.github.com/users/nagua/gists{/gist_id}","starred_url":"https://api.github.com/users/nagua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nagua/subscriptions","organizations_url":"https://api.github.com/users/nagua/orgs","repos_url":"https://api.github.com/users/nagua/repos","events_url":"https://api.github.com/users/nagua/events{/privacy}","received_events_url":"https://api.github.com/users/nagua/received_events","type":"User","site_admin":false},"labels":[{"id":237472034,"url":"https://api.github.com/repos/docker/docker/labels/area/networking","name":"area/networking","color":"fbca04","default":false},{"id":375714123,"url":"https://api.github.com/repos/docker/docker/labels/version/1.12","name":"version/1.12","color":"ededed","default":false}],"state":"open","locked":false,"assignee":{"login":"aboch","id":10080882,"avatar_url":"https://avatars.githubusercontent.com/u/10080882?v=3","gravatar_id":"","url":"https://api.github.com/users/aboch","html_url":"https://github.com/aboch","followers_url":"https://api.github.com/users/aboch/followers","following_url":"https://api.github.com/users/aboch/following{/other_user}","gists_url":"https://api.github.com/users/aboch/gists{/gist_id}","starred_url":"https://api.github.com/users/aboch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aboch/subscriptions","organizations_url":"https://api.github.com/users/aboch/orgs","repos_url":"https://api.github.com/users/aboch/repos","events_url":"https://api.github.com/users/aboch/events{/privacy}","received_events_url":"https://api.github.com/users/aboch/received_events","type":"User","site_admin":false},"assignees":[{"login":"aboch","id":10080882,"avatar_url":"https://avatars.githubusercontent.com/u/10080882?v=3","gravatar_id":"","url":"https://api.github.com/users/aboch","html_url":"https://github.com/aboch","followers_url":"https://api.github.com/users/aboch/followers","following_url":"https://api.github.com/users/aboch/following{/other_user}","gists_url":"https://api.github.com/users/aboch/gists{/gist_id}","starred_url":"https://api.github.com/users/aboch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aboch/subscriptions","organizations_url":"https://api.github.com/users/aboch/orgs","repos_url":"https://api.github.com/users/aboch/repos","events_url":"https://api.github.com/users/aboch/events{/privacy}","received_events_url":"https://api.github.com/users/aboch/received_events","type":"User","site_admin":false}],"milestone":null,"comments":27,"created_at":"2016-08-24T13:15:10Z","updated_at":"2016-12-21T10:17:43Z","closed_at":null,"body":"<!--\nIf you are reporting a new issue, make sure that we do not have any duplicates\nalready open. You can ensure this by searching the issue list for this\nrepository. If there is a duplicate, please close your issue and add a comment\nto the existing issue instead.\n\nIf you suspect your issue is a bug, please edit your issue description to\ninclude the BUG REPORT INFORMATION shown below. If you fail to provide this\ninformation within 7 days, we cannot debug your issue and will close it. We\nwill, however, reopen it if you later provide the information.\n\nFor more information about reporting issues, see\nhttps://github.com/docker/docker/blob/master/CONTRIBUTING.md#reporting-other-issues\n\n---------------------------------------------------\nBUG REPORT INFORMATION\n---------------------------------------------------\nUse the commands below to provide key information from your environment:\nYou do NOT have to include this information if this is a FEATURE REQUEST\n-->\n\n**Output of `docker version`:**\n\n```\nClient:\n Version:      1.12.1\n API version:  1.24\n Go version:   go1.6.3\n Git commit:   23cf638\n Built:        Thu Aug 18 05:02:53 2016\n OS/Arch:      linux/amd64\n\nServer:\n Version:      1.12.1\n API version:  1.24\n Go version:   go1.6.3\n Git commit:   23cf638\n Built:        Thu Aug 18 05:02:53 2016\n OS/Arch:      linux/amd64\n```\n\n**Output of `docker info`:**\n\n```\nContainers: 6\n Running: 0\n Paused: 0\n Stopped: 6\nImages: 93\nServer Version: 1.12.1\nStorage Driver: aufs\n Root Dir: /var/lib/docker/aufs\n Backing Filesystem: extfs\n Dirs: 211\n Dirperm1 Supported: true\nLogging Driver: json-file\nCgroup Driver: cgroupfs\nPlugins:\n Volume: local\n Network: bridge null host overlay\nSwarm: inactive\nRuntimes: runc\nDefault Runtime: runc\nSecurity Options:\nKernel Version: 3.16.0-4-amd64\nOperating System: Debian GNU/Linux 8 (jessie)\nOSType: linux\nArchitecture: x86_64\nCPUs: 2\nTotal Memory: 3.748 GiB\nName: motocom.2hg.org\nID: O4YH:4KEL:GEY3:C26M:QWMN:PCLK:RF6E:DQSG:XPWG:SSBE:FVE3:GWBL\nDocker Root Dir: /var/lib/docker\nDebug Mode (client): false\nDebug Mode (server): false\nRegistry: https://index.docker.io/v1/\nWARNING: No kernel memory limit support\nWARNING: No cpu cfs quota support\nWARNING: No cpu cfs period support\nInsecure Registries:\n 127.0.0.0/8\n```\n\n**Additional environment details (AWS, VirtualBox, physical, etc.):**\nThis is a dedicated server running Debian Jessie. Everything up to date.\n\n```\n# docker ps\nCONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES\n```\n\n```\n# netstat -ap\nActive Internet connections (servers and established)\nProto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name\ntcp        0      0 *:3389                  *:*                     LISTEN      890/openvpn\ntcp        0      0 localhost:mysql         *:*                     LISTEN      1276/mysqld\ntcp        0      0 *:ssh                   *:*                     LISTEN      727/sshd\ntcp        0    336 xxx:ssh     ip1f10d8b9.dynami:60637 ESTABLISHED 1641/sshd: xxx\ntcp        0      1 xxx:ssh     116.31.116.52:53774     FIN_WAIT1   -\ntcp6       0      0 [::]:smtp               [::]:*                  LISTEN      6346/docker-proxy\ntcp6       0      0 [::]:5280               [::]:*                  LISTEN      6366/docker-proxy\ntcp6       0      0 [::]:imaps              [::]:*                  LISTEN      6316/docker-proxy\ntcp6       0      0 [::]:5443               [::]:*                  LISTEN      6356/docker-proxy\ntcp6       0      0 [::]:xmpp-client        [::]:*                  LISTEN      6386/docker-proxy\ntcp6       0      0 [::]:submission         [::]:*                  LISTEN      6326/docker-proxy\ntcp6       0      0 [::]:imap2              [::]:*                  LISTEN      6336/docker-proxy\ntcp6       0      0 [::]:xmpp-server        [::]:*                  LISTEN      6376/docker-proxy\n[...]\n```\n\n**Steps to reproduce the issue:**\n1. I upgraded from version 1.12.0 to 1.12.1.\n2. I tried to restart my containers but they failed to allocate ports.\n3. The ports are allocated by `docker-proxy` but no container is running.\n\n**Describe the results you received:**\nI can not start the containers because the ports are already in use.\n\n**Describe the results you expected:**\nDocker-proxy does not allocate ports docker does not use.\n\n**Additional information you deem important (e.g. issue happens only occasionally):**\n\nI already tried to restrict docker to ipv4 but this was not changing anything. I also tried to restart docker/server but docker also allocates many ports. I use docker-compose to manage my containers if this matters.\n\nAre there more information needed? Is there a quick workaround available make docker think that the ports are not needed anymore?\n"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/268486609","html_url":"https://github.com/docker/docker/issues/25981#issuecomment-268486609","issue_url":"https://api.github.com/repos/docker/docker/issues/25981","id":268486609,"user":{"login":"marcelmfs","id":5718899,"avatar_url":"https://avatars.githubusercontent.com/u/5718899?v=3","gravatar_id":"","url":"https://api.github.com/users/marcelmfs","html_url":"https://github.com/marcelmfs","followers_url":"https://api.github.com/users/marcelmfs/followers","following_url":"https://api.github.com/users/marcelmfs/following{/other_user}","gists_url":"https://api.github.com/users/marcelmfs/gists{/gist_id}","starred_url":"https://api.github.com/users/marcelmfs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcelmfs/subscriptions","organizations_url":"https://api.github.com/users/marcelmfs/orgs","repos_url":"https://api.github.com/users/marcelmfs/repos","events_url":"https://api.github.com/users/marcelmfs/events{/privacy}","received_events_url":"https://api.github.com/users/marcelmfs/received_events","type":"User","site_admin":false},"created_at":"2016-12-21T10:17:43Z","updated_at":"2016-12-21T10:17:43Z","body":"I just saw this behaviour in 1.12.1, docker-compose 1.8.1.\r\n\r\nWe have some short lived containers that do bind to some ports for registration purposes, and after some runs, docker-proxy were still running referencing old runs of already stopped & removed containers, and then at some point docker reuses one of the IPs but the iptables rules are already in place and it causes all sorts of routing problems (trying to request one service reaches another).\r\n\r\nThis is really bad. It will happen in production (given that we expect docker to be a long lived process). "}}
{"actor":{"display_login":"marcelmfs"}}