{"action":"created","issue":{"url":"https://api.github.com/repos/docker/swarm/issues/1402","labels_url":"https://api.github.com/repos/docker/swarm/issues/1402/labels{/name}","comments_url":"https://api.github.com/repos/docker/swarm/issues/1402/comments","events_url":"https://api.github.com/repos/docker/swarm/issues/1402/events","html_url":"https://github.com/docker/swarm/issues/1402","id":116320938,"number":1402,"title":"Network connect multihost env | invalid container <nil> :","user":{"login":"cerias","id":1044564,"avatar_url":"https://avatars.githubusercontent.com/u/1044564?v=3","gravatar_id":"","url":"https://api.github.com/users/cerias","html_url":"https://github.com/cerias","followers_url":"https://api.github.com/users/cerias/followers","following_url":"https://api.github.com/users/cerias/following{/other_user}","gists_url":"https://api.github.com/users/cerias/gists{/gist_id}","starred_url":"https://api.github.com/users/cerias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cerias/subscriptions","organizations_url":"https://api.github.com/users/cerias/orgs","repos_url":"https://api.github.com/users/cerias/repos","events_url":"https://api.github.com/users/cerias/events{/privacy}","received_events_url":"https://api.github.com/users/cerias/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/swarm/labels/area/network","name":"area/network","color":"fbca04"},{"url":"https://api.github.com/repos/docker/swarm/labels/kind/bug","name":"kind/bug","color":"207de5"},{"url":"https://api.github.com/repos/docker/swarm/labels/priority/P1","name":"priority/P1","color":"e11d21"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-11-11T12:01:24Z","updated_at":"2015-12-10T00:31:56Z","closed_at":"2015-12-10T00:31:56Z","body":"If i try to connect an container to an network it's works only on the same host as the master is. When i connect to an other host direct to docker i can connect the container to the network and everything works as excepted.\r\n\r\nSteps to reproduce:\r\n```\r\n# eval \"$(docker-machine env --swarm docker-app1)\"\r\n# docker ps\r\nCONTAINER ID        IMAGE                 COMMAND                  CREATED             STATUS              PORTS               NAMES\r\n243268f57f74        elasticsearch:2.0.0   \"/docker-entrypoint.s\"   48 minutes ago      Up 48 minutes                           docker-app1/es3\r\n19b319ccfd75        elasticsearch:2.0.0   \"/docker-entrypoint.s\"   49 minutes ago      Up 49 minutes                           docker-app2/es1\r\nb9d355311060        elasticsearch:2.0.0   \"/docker-entrypoint.s\"   49 minutes ago      Up 49 minutes                           docker-app2/es2\r\n\r\n# network ls\r\nNETWORK ID          NAME                 DRIVER\r\nb85370d450ec        docker-app1/host     host                \r\nfa3f0425c192        test                 overlay             \r\ncc1f7df9d179        docker-app2/bridge   bridge              \r\nceddf908f39d        docker-app2/none     null                \r\nef2d1f54becb        docker-app2/host     host                \r\n15d19af8965b        docker-app1/bridge   bridge              \r\n2e13fa81d306        docker-app1/none     null   \r\n\r\n# docker network connect test es3\r\n# docker network connect test es2\r\nError response from daemon: invalid container <nil> : nosuchcontainer: no such id: es2\r\n# eval \"$(docker-machine env  docker-app2)\"\r\n# docker network connect test es2\r\n\r\n```\r\n\r\n\r\nInspecting the Network delivers only for the current host the connected containers.\r\n```\r\n[\r\n    {\r\n        \"Name\": \"test\",\r\n        \"Id\": \"fa3f0425c19243cc84c6f0ffd73a754f6f86ef8380e519f466eac7259b4dfcf2\",\r\n        \"Scope\": \"global\",\r\n        \"Driver\": \"overlay\",\r\n        \"IPAM\": {\r\n            \"Driver\": \"default\",\r\n            \"Config\": [\r\n                {}\r\n            ]\r\n        },\r\n        \"Containers\": {\r\n            \"b9d3553110600e558f7963fddcd8d737a8d694cb8d6d6e68196c9a2969fff716\": {\r\n                \"EndpointID\": \"f3a82c84c451018d365fd567c5767ea62d14d3151f108edcd4e3f1d48f239e52\",\r\n                \"MacAddress\": \"02:42:0a:00:01:03\",\r\n                \"IPv4Address\": \"10.0.1.3/24\",\r\n                \"IPv6Address\": \"\"\r\n            }\r\n        },\r\n        \"Options\": {}\r\n    }\r\n]\r\n\r\n```\r\n\r\nAll machines was installed by docker-machine. \r\n\r\nSystem informations:\r\ndocker info\r\n```\r\nContainers: 6\r\nImages: 11\r\nRole: primary\r\nStrategy: spread\r\nFilters: health, port, dependency, affinity, constraint\r\nNodes: 2\r\n docker-app1: 192.168.100.49:2376\r\n  └ Containers: 3\r\n  └ Reserved CPUs: 0 / 2\r\n  └ Reserved Memory: 0 B / 4.049 GiB\r\n  └ Labels: disk=ssd, executiondriver=native-0.2, kernelversion=3.19.0-25-generic, mtype=app, operatingsystem=Ubuntu 14.04.3 LTS, provider=generic, storagedriver=aufs\r\n docker-app2: 192.168.100.46:2376\r\n  └ Containers: 3\r\n  └ Reserved CPUs: 0 / 2\r\n  └ Reserved Memory: 0 B / 4.053 GiB\r\n  └ Labels: disk=ssd, executiondriver=native-0.2, kernelversion=3.19.0-25-generic, mtype=app, operatingsystem=Ubuntu 14.04.3 LTS, provider=generic, storagedriver=aufs\r\nCPUs: 4\r\nTotal Memory: 8.102 GiB\r\nName: 7415c30d0456\r\n```\r\n\r\ndocker version\r\n```\r\nClient:\r\n Version:      1.9.0\r\n API version:  1.21\r\n Go version:   go1.4.2\r\n Git commit:   76d6bc9\r\n Built:        Tue Nov  3 17:43:42 UTC 2015\r\n OS/Arch:      linux/amd64\r\n\r\nServer:\r\n Version:      swarm/1.0.0\r\n API version:  1.21\r\n Go version:   go1.5.1\r\n Git commit:   087e245\r\n Built:        \r\n OS/Arch:      linux/amd64\r\n\r\n```\r\ndocker-machine -v\r\n```\r\ndocker-machine version 0.5.0 (04cfa58)\r\n```\r\n\r\nThe problem also appear when connecting containers via rest api. Only the container on the host with the swarm-master could connect.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/docker/swarm/issues/comments/163447265","html_url":"https://github.com/docker/swarm/issues/1402#issuecomment-163447265","issue_url":"https://api.github.com/repos/docker/swarm/issues/1402","id":163447265,"user":{"login":"abronan","id":1655859,"avatar_url":"https://avatars.githubusercontent.com/u/1655859?v=3","gravatar_id":"","url":"https://api.github.com/users/abronan","html_url":"https://github.com/abronan","followers_url":"https://api.github.com/users/abronan/followers","following_url":"https://api.github.com/users/abronan/following{/other_user}","gists_url":"https://api.github.com/users/abronan/gists{/gist_id}","starred_url":"https://api.github.com/users/abronan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abronan/subscriptions","organizations_url":"https://api.github.com/users/abronan/orgs","repos_url":"https://api.github.com/users/abronan/repos","events_url":"https://api.github.com/users/abronan/events{/privacy}","received_events_url":"https://api.github.com/users/abronan/received_events","type":"User","site_admin":false},"created_at":"2015-12-10T00:31:56Z","updated_at":"2015-12-10T00:31:56Z","body":"Fixed by #1438 "}}