{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/24679","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/24679/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/24679/comments","events_url":"https://api.github.com/repos/docker/docker/issues/24679/events","html_url":"https://github.com/docker/docker/issues/24679","id":165758727,"number":24679,"title":"[1.12 rc4]service discovery failed","user":{"login":"upccup","id":13341880,"avatar_url":"https://avatars.githubusercontent.com/u/13341880?v=3","gravatar_id":"","url":"https://api.github.com/users/upccup","html_url":"https://github.com/upccup","followers_url":"https://api.github.com/users/upccup/followers","following_url":"https://api.github.com/users/upccup/following{/other_user}","gists_url":"https://api.github.com/users/upccup/gists{/gist_id}","starred_url":"https://api.github.com/users/upccup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/upccup/subscriptions","organizations_url":"https://api.github.com/users/upccup/orgs","repos_url":"https://api.github.com/users/upccup/repos","events_url":"https://api.github.com/users/upccup/events{/privacy}","received_events_url":"https://api.github.com/users/upccup/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/area/swarm","name":"area/swarm","color":"fbca04"},{"url":"https://api.github.com/repos/docker/docker/labels/group/networking","name":"group/networking","color":"F6FBFF"},{"url":"https://api.github.com/repos/docker/docker/labels/version/1.12","name":"version/1.12","color":"ededed"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/docker/docker/milestones/57","html_url":"https://github.com/docker/docker/milestones/1.12.1","labels_url":"https://api.github.com/repos/docker/docker/milestones/57/labels","id":1907496,"number":57,"title":"1.12.1","description":"milestone to track issues that can possibly warrant a patch release.\r\n\r\nsee our Patch release policy for more information about the procedure;\r\nhttps://github.com/docker/docker/blob/master/project/PATCH-RELEASES.md\r\n","creator":{"login":"thaJeztah","id":1804568,"avatar_url":"https://avatars.githubusercontent.com/u/1804568?v=3","gravatar_id":"","url":"https://api.github.com/users/thaJeztah","html_url":"https://github.com/thaJeztah","followers_url":"https://api.github.com/users/thaJeztah/followers","following_url":"https://api.github.com/users/thaJeztah/following{/other_user}","gists_url":"https://api.github.com/users/thaJeztah/gists{/gist_id}","starred_url":"https://api.github.com/users/thaJeztah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thaJeztah/subscriptions","organizations_url":"https://api.github.com/users/thaJeztah/orgs","repos_url":"https://api.github.com/users/thaJeztah/repos","events_url":"https://api.github.com/users/thaJeztah/events{/privacy}","received_events_url":"https://api.github.com/users/thaJeztah/received_events","type":"User","site_admin":false},"open_issues":26,"closed_issues":4,"state":"open","created_at":"2016-07-27T15:59:34Z","updated_at":"2016-07-29T13:04:53Z","due_on":null,"closed_at":null},"comments":18,"created_at":"2016-07-15T10:40:29Z","updated_at":"2016-07-29T17:05:00Z","closed_at":null,"body":"now i create two service and network like this\r\n```\r\n   docker network create --driver overlay mynet\r\n   docker service create --network mynet --name redis redis\r\n   docker service create --network mynet --name web my-web\r\n```\r\nnow i try to connect redis server in my web server but failed\r\n```\r\n➜  ~ docker exec -it  web.1.4i3r3f3djfgpwmtkc6kivacvf  sh\r\n# ping redis\r\nPING redis (10.0.0.2): 56 data bytes\r\n92 bytes from f8c0f07ea3e3 (10.0.0.5): Destination Host Unreachable\r\n92 bytes from f8c0f07ea3e3 (10.0.0.5): Destination Host Unreachable\r\n92 bytes from f8c0f07ea3e3 (10.0.0.5): Destination Host Unreachable\r\n92 bytes from f8c0f07ea3e3 (10.0.0.5): Destination Host Unreachable\r\n```\r\nbecause the redis container ip is changed\r\n```\r\n➜  ~ docker exec -it redis.1.6y9v4qwgd68b1e4b04khxl754 sh\r\n# ip a\r\n1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default\r\n    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00\r\n    inet 127.0.0.1/8 scope host lo\r\n       valid_lft forever preferred_lft forever\r\n    inet6 ::1/128 scope host\r\n       valid_lft forever preferred_lft forever\r\n68: eth0@if69: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UP group default\r\n    link/ether 02:42:0a:00:00:03 brd ff:ff:ff:ff:ff:ff\r\n    inet 10.0.0.3/24 scope global eth0\r\n       valid_lft forever preferred_lft forever\r\n    inet6 fe80::42:aff:fe00:3/64 scope link\r\n       valid_lft forever preferred_lft forever\r\n70: eth1@if71: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default\r\n    link/ether 02:42:ac:12:00:03 brd ff:ff:ff:ff:ff:ff\r\n    inet 172.18.0.3/16 scope global eth1\r\n       valid_lft forever preferred_lft forever\r\n    inet6 fe80::42:acff:fe12:3/64 scope link\r\n       valid_lft forever preferred_lft forever\r\n```\r\n\r\n**docker version**\r\n```\r\n➜  ~ docker info\r\nContainers: 1\r\n Running: 1\r\n Paused: 0\r\n Stopped: 0\r\nImages: 2\r\nServer Version: 1.12.0-rc4\r\nStorage Driver: devicemapper\r\n Pool Name: docker-253:0-34333044-pool\r\n Pool Blocksize: 65.54 kB\r\n Base Device Size: 10.74 GB\r\n Backing Filesystem: xfs\r\n Data file: /dev/loop0\r\n Metadata file: /dev/loop1\r\n Data Space Used: 959.6 MB\r\n Data Space Total: 107.4 GB\r\n Data Space Available: 17.27 GB\r\n Metadata Space Used: 2.425 MB\r\n Metadata Space Total: 2.147 GB\r\n Metadata Space Available: 2.145 GB\r\n Thin Pool Minimum Free Space: 10.74 GB\r\n Udev Sync Supported: true\r\n Deferred Removal Enabled: false\r\n Deferred Deletion Enabled: false\r\n Deferred Deleted Device Count: 0\r\n Data loop file: /var/lib/docker/devicemapper/devicemapper/data\r\n WARNING: Usage of loopback devices is strongly discouraged for production use. Use `--storage-opt dm.thinpooldev` to specify a custom block storage device.\r\n Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata\r\n Library Version: 1.02.107-RHEL7 (2015-10-14)\r\nLogging Driver: json-file\r\nCgroup Driver: cgroupfs\r\nPlugins:\r\n Volume: local\r\n Network: overlay bridge null host\r\nSwarm: active\r\n NodeID: 3q9rse4k6v0jlf12hb68fuelr\r\n IsManager: No\r\nRuntimes: runc\r\nDefault Runtime: runc\r\nSecurity Options: seccomp\r\nKernel Version: 3.10.0-327.el7.x86_64\r\nOperating System: CentOS Linux 7 (Core)\r\nOSType: linux\r\nArchitecture: x86_64\r\nCPUs: 2\r\nTotal Memory: 3.703 GiB\r\nName: localhost\r\nID: PD5B:R7W4:Q64C:X5VW:ET6Q:OFQP:GFYE:5NYG:V3DU:XS5Q:B6UL:RWIV\r\nDocker Root Dir: /var/lib/docker\r\nDebug Mode (client): false\r\nDebug Mode (server): true\r\n File Descriptors: 42\r\n Goroutines: 101\r\n System Time: 2016-07-15T05:15:55.033930206-04:00\r\n EventsListeners: 1\r\nRegistry: https://index.docker.io/v1/\r\nWARNING: bridge-nf-call-ip6tables is disabled\r\nExperimental: true\r\nInsecure Registries:\r\n 127.0.0.0/8\r\n```\r\n\r\n**service redis**\r\n```\r\n➜  ~ docker service inspect redis\r\n[\r\n    {\r\n        \"ID\": \"8jiozk9zwwm3ujry15kgn0alh\",\r\n        \"Version\": {\r\n            \"Index\": 224\r\n        },\r\n        \"CreatedAt\": \"2016-07-15T08:33:11.804914778Z\",\r\n        \"UpdatedAt\": \"2016-07-15T08:33:11.808655794Z\",\r\n        \"Spec\": {\r\n            \"Name\": \"redis\",\r\n            \"TaskTemplate\": {\r\n                \"ContainerSpec\": {\r\n                    \"Image\": \"redis\"\r\n                },\r\n                \"Resources\": {\r\n                    \"Limits\": {},\r\n                    \"Reservations\": {}\r\n                },\r\n                \"RestartPolicy\": {\r\n                    \"Condition\": \"any\",\r\n                    \"MaxAttempts\": 0\r\n                },\r\n                \"Placement\": {}\r\n            },\r\n            \"Mode\": {\r\n                \"Replicated\": {\r\n                    \"Replicas\": 1\r\n                }\r\n            },\r\n            \"UpdateConfig\": {},\r\n            \"Networks\": [\r\n                {\r\n                    \"Target\": \"28om24odrwbevea8kuwww7kpb\"\r\n                }\r\n            ],\r\n            \"EndpointSpec\": {\r\n                \"Mode\": \"vip\"\r\n            }\r\n        },\r\n        \"Endpoint\": {\r\n            \"Spec\": {\r\n                \"Mode\": \"vip\"\r\n            },\r\n            \"VirtualIPs\": [\r\n                {\r\n                    \"NetworkID\": \"28om24odrwbevea8kuwww7kpb\",\r\n                    \"Addr\": \"10.0.0.2/24\"\r\n                }\r\n            ]\r\n        }\r\n    }\r\n]\r\n```\r\n**service web**\r\n```\r\n➜  ~ docker service inspect web\r\n[\r\n    {\r\n        \"ID\": \"9zx2r9jpxrb04vsx8mdn10oe2\",\r\n        \"Version\": {\r\n            \"Index\": 233\r\n        },\r\n        \"CreatedAt\": \"2016-07-15T08:35:29.858726294Z\",\r\n        \"UpdatedAt\": \"2016-07-15T08:35:29.86259807Z\",\r\n        \"Spec\": {\r\n            \"Name\": \"web\",\r\n            \"TaskTemplate\": {\r\n                \"ContainerSpec\": {\r\n                    \"Image\": \"demoregistry.dataman-inc.com/library/yaoyun-web:0711\"\r\n                },\r\n                \"Resources\": {\r\n                    \"Limits\": {},\r\n                    \"Reservations\": {}\r\n                },\r\n                \"RestartPolicy\": {\r\n                    \"Condition\": \"any\",\r\n                    \"MaxAttempts\": 0\r\n                },\r\n                \"Placement\": {}\r\n            },\r\n            \"Mode\": {\r\n                \"Replicated\": {\r\n                    \"Replicas\": 1\r\n                }\r\n            },\r\n            \"UpdateConfig\": {},\r\n            \"Networks\": [\r\n                {\r\n                    \"Target\": \"28om24odrwbevea8kuwww7kpb\"\r\n                }\r\n            ],\r\n            \"EndpointSpec\": {\r\n                \"Mode\": \"vip\"\r\n            }\r\n        },\r\n        \"Endpoint\": {\r\n            \"Spec\": {\r\n                \"Mode\": \"vip\"\r\n            },\r\n            \"VirtualIPs\": [\r\n                {\r\n                    \"NetworkID\": \"28om24odrwbevea8kuwww7kpb\",\r\n                    \"Addr\": \"10.0.0.4/24\"\r\n                }\r\n            ]\r\n        }\r\n    }\r\n]\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/236236329","html_url":"https://github.com/docker/docker/issues/24679#issuecomment-236236329","issue_url":"https://api.github.com/repos/docker/docker/issues/24679","id":236236329,"user":{"login":"jhorwit2","id":3876739,"avatar_url":"https://avatars.githubusercontent.com/u/3876739?v=3","gravatar_id":"","url":"https://api.github.com/users/jhorwit2","html_url":"https://github.com/jhorwit2","followers_url":"https://api.github.com/users/jhorwit2/followers","following_url":"https://api.github.com/users/jhorwit2/following{/other_user}","gists_url":"https://api.github.com/users/jhorwit2/gists{/gist_id}","starred_url":"https://api.github.com/users/jhorwit2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhorwit2/subscriptions","organizations_url":"https://api.github.com/users/jhorwit2/orgs","repos_url":"https://api.github.com/users/jhorwit2/repos","events_url":"https://api.github.com/users/jhorwit2/events{/privacy}","received_events_url":"https://api.github.com/users/jhorwit2/received_events","type":"User","site_admin":false},"created_at":"2016-07-29T17:05:00Z","updated_at":"2016-07-29T17:05:00Z","body":"Service discovery seems fine to me though. I can both ping and curl services. \r\n\r\n```\r\ndocker service create --name swarmtest --replicas 2 --network backend jhorwit2/swarm-test:0.0.1\r\n```\r\n\r\nThen in another container:\r\n\r\n ```\r\n$ docker exec -it (docker ps -lq)  bash\r\ncurl swarmtest\r\neth0:\t10.0.0.10\r\nroot@b4184eab6c47:/# curl swarmtest\r\neth0:\t10.0.0.9\r\nroot@b4184eab6c47:/# curl swarmtest\r\neth0:\t10.0.0.10\r\nroot@b4184eab6c47:/# curl swarmtest\r\neth0:\t10.0.0.9\r\n```\r\nAs you can see i'm RR between each vip in the network for swarmtest service. \r\n"}}
{"actor":{"display_login":"jhorwit2"}}