{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/24310","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/24310/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/24310/comments","events_url":"https://api.github.com/repos/docker/docker/issues/24310/events","html_url":"https://github.com/docker/docker/issues/24310","id":163690875,"number":24310,"title":"problem with publishing ports in swarm mode - works (sometimes) only on worker nodes, not on manager, no load balancing ","user":{"login":"slawekgh","id":11534862,"avatar_url":"https://avatars.githubusercontent.com/u/11534862?v=3","gravatar_id":"","url":"https://api.github.com/users/slawekgh","html_url":"https://github.com/slawekgh","followers_url":"https://api.github.com/users/slawekgh/followers","following_url":"https://api.github.com/users/slawekgh/following{/other_user}","gists_url":"https://api.github.com/users/slawekgh/gists{/gist_id}","starred_url":"https://api.github.com/users/slawekgh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slawekgh/subscriptions","organizations_url":"https://api.github.com/users/slawekgh/orgs","repos_url":"https://api.github.com/users/slawekgh/repos","events_url":"https://api.github.com/users/slawekgh/events{/privacy}","received_events_url":"https://api.github.com/users/slawekgh/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":392678049,"url":"https://api.github.com/repos/docker/docker/labels/area/swarm","name":"area/swarm","color":"fbca04","default":false},{"id":283253906,"url":"https://api.github.com/repos/docker/docker/labels/priority/P1","name":"priority/P1","color":"eb6420","default":false},{"id":375241490,"url":"https://api.github.com/repos/docker/docker/labels/version/master","name":"version/master","color":"ededed","default":false}],"state":"closed","locked":false,"assignee":{"login":"mrjana","id":1693482,"avatar_url":"https://avatars.githubusercontent.com/u/1693482?v=3","gravatar_id":"","url":"https://api.github.com/users/mrjana","html_url":"https://github.com/mrjana","followers_url":"https://api.github.com/users/mrjana/followers","following_url":"https://api.github.com/users/mrjana/following{/other_user}","gists_url":"https://api.github.com/users/mrjana/gists{/gist_id}","starred_url":"https://api.github.com/users/mrjana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrjana/subscriptions","organizations_url":"https://api.github.com/users/mrjana/orgs","repos_url":"https://api.github.com/users/mrjana/repos","events_url":"https://api.github.com/users/mrjana/events{/privacy}","received_events_url":"https://api.github.com/users/mrjana/received_events","type":"User","site_admin":false},"assignees":[],"milestone":{"url":"https://api.github.com/repos/docker/docker/milestones/58","html_url":"https://github.com/docker/docker/milestones/1.12.2","labels_url":"https://api.github.com/repos/docker/docker/milestones/58/labels","id":1973095,"number":58,"title":"1.12.2","description":"","creator":{"login":"tiborvass","id":827131,"avatar_url":"https://avatars.githubusercontent.com/u/827131?v=3","gravatar_id":"","url":"https://api.github.com/users/tiborvass","html_url":"https://github.com/tiborvass","followers_url":"https://api.github.com/users/tiborvass/followers","following_url":"https://api.github.com/users/tiborvass/following{/other_user}","gists_url":"https://api.github.com/users/tiborvass/gists{/gist_id}","starred_url":"https://api.github.com/users/tiborvass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiborvass/subscriptions","organizations_url":"https://api.github.com/users/tiborvass/orgs","repos_url":"https://api.github.com/users/tiborvass/repos","events_url":"https://api.github.com/users/tiborvass/events{/privacy}","received_events_url":"https://api.github.com/users/tiborvass/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":112,"state":"closed","created_at":"2016-08-30T16:26:40Z","updated_at":"2016-10-28T06:15:01Z","due_on":"2016-10-10T00:00:00Z","closed_at":"2016-10-14T18:47:41Z"},"comments":56,"created_at":"2016-07-04T14:43:57Z","updated_at":"2016-11-23T13:29:19Z","closed_at":"2016-09-27T21:17:52Z","body":"3 nodes (node02 - master, node01 & node03 - workers) \n\non all of them docker 1.12 \n\nroot@node02:~# docker node ls\nID                           HOSTNAME  MEMBERSHIP  STATUS  AVAILABILITY  MANAGER STATUS\n24l3ymmyj28oagu8egrbds74d \\*  node02    Accepted    Ready   Active        Leader\n2ojam2qis4hmxd833lsmr0655    node01    Accepted    Ready   Active  \n9l21flvdxqs9dftc61trl95eo    node03    Accepted    Ready   Active        \n\nroot@node02:~# docker version\nClient:\n Version:      1.12.0-dev\n API version:  1.25\n Go version:   go1.6.2\n Git commit:   2358d54\n Built:        Fri Jul  1 03:39:09 2016\n OS/Arch:      linux/amd64\n\nServer:\n Version:      1.12.0-dev\n API version:  1.25\n Go version:   go1.6.2\n Git commit:   2358d54\n Built:        Fri Jul  1 03:39:09 2016\n OS/Arch:      linux/amd64\nroot@node02:~# \n\nmy Dockerfile:\nFROM ubuntu:14.04\nEXPOSE 80\nRUN apt-get -y update && apt-get -y install apache2\nCMD apachectl start && hostname > /var/www/html/index.html && ping some_host_on_internet.com \n\nfrom this Dockerfile I built new image with name \"www_server\"\n\nWhen I create new service with name \"www-service\" via command:\nroot@node02:~# docker service create --replicas 2 --name www-service --publish 80:80/tcp  www_server \nmy swarm put 2 copies on master-node :\n\nroot@node02:~# docker service tasks www-service\nID                         NAME           SERVICE      IMAGE       LAST STATE          DESIRED STATE  NODE\n4xupw6dqolrqeymturu77ycgn  www-service.1  www-service  www_server  Starting 3 seconds  Running        node02\nbxmug188but65xp5yax12hj4j  www-service.2  www-service  www_server  Starting 3 seconds  Running        node02\n\nbut none of 3 hosts open port 80 (tested by curl 127.0.0.1:80 & telnet on 127.0.0.1 port 80) \n\nwhen I rescale my service to 3 replicas:\nroot@node02:~# docker service scale www-service=3\nwww-service scaled to 3\n\nswarm put new (3rd) container) to worker-node (node03) \nroot@node02:~# docker service tasks www-service\nID                         NAME           SERVICE      IMAGE       LAST STATE              DESIRED STATE  NODE\n4xupw6dqolrqeymturu77ycgn  www-service.1  www-service  www_server  Running About a minute  Running        node02\nbxmug188but65xp5yax12hj4j  www-service.2  www-service  www_server  Running About a minute  Running        node02\n6hhlq6wtasgmuvqdotk9v1qt2  www-service.3  www-service  www_server  Starting 3 seconds      Running        node03\nroot@node02:~# \n\nand on node03 swarm opened port 80, but not on node02 and not on node01 \n\nlets scale to = 4 \n\nroot@node02:~# docker service scale www-service=4\nwww-service scaled to 4\nroot@node02:~# docker service tasks www-service\nID                         NAME           SERVICE      IMAGE       LAST STATE           DESIRED STATE  NODE\n4xupw6dqolrqeymturu77ycgn  www-service.1  www-service  www_server  Running 2 minutes    Running        node02\nbxmug188but65xp5yax12hj4j  www-service.2  www-service  www_server  Running 2 minutes    Running        node02\n6hhlq6wtasgmuvqdotk9v1qt2  www-service.3  www-service  www_server  Running 56 seconds   Running        node03\n90qz3jmnsf1jq28s9fuwljtyz  www-service.4  www-service  www_server  Preparing 1 seconds  Running        node01\n\nAnd ONLY NOW swarm opens port 80 on 1st worker node (node01) , but still not open this port on node02 (even if there are 2 containers with my app) \n\nAnd worse - there is no load-balancing - curl on node03 returns only 1st container \n\nroot@node03:/tmp# curl  127.0.0.1 80\n8c605fa61d10\nroot@node03:/tmp# curl  127.0.0.1 80\n8c605fa61d10\nroot@node03:/tmp# curl  127.0.0.1 80\n8c605fa61d10\n"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/262512494","html_url":"https://github.com/docker/docker/issues/24310#issuecomment-262512494","issue_url":"https://api.github.com/repos/docker/docker/issues/24310","id":262512494,"user":{"login":"slawekgh","id":11534862,"avatar_url":"https://avatars.githubusercontent.com/u/11534862?v=3","gravatar_id":"","url":"https://api.github.com/users/slawekgh","html_url":"https://github.com/slawekgh","followers_url":"https://api.github.com/users/slawekgh/followers","following_url":"https://api.github.com/users/slawekgh/following{/other_user}","gists_url":"https://api.github.com/users/slawekgh/gists{/gist_id}","starred_url":"https://api.github.com/users/slawekgh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slawekgh/subscriptions","organizations_url":"https://api.github.com/users/slawekgh/orgs","repos_url":"https://api.github.com/users/slawekgh/repos","events_url":"https://api.github.com/users/slawekgh/events{/privacy}","received_events_url":"https://api.github.com/users/slawekgh/received_events","type":"User","site_admin":false},"created_at":"2016-11-23T13:29:19Z","updated_at":"2016-11-23T13:29:19Z","body":"rhel 7.2 + docker 1.12.2 + firewalld disabled \r\n\r\nover 400 tests , everything works great"}}
{"actor":{"display_login":"slawekgh"}}