1
votes

I'm trying to run a rather simple example of a swarm on Docker 1.12:

I have two services:

drupalapp     mastermindg/rpi-apache2php7  
drupaldb      mysql:latest

Drupalapp has published port 80:

"Endpoint": {
        "Spec": {
            "Mode": "vip",
            "Ports": [
                {
                    "Protocol": "tcp",
                    "TargetPort": 80,
                    "PublishedPort": 80
                }
            ]
        },
        "Ports": [
            {
                "Protocol": "tcp",
                "TargetPort": 80,
                "PublishedPort": 80
            }
        ],
        "VirtualIPs": [
            {
                "NetworkID": "5citix4eeoe9isd2ainbt2uvn",
                "Addr": "10.255.0.7/16"
            },
            {
                "NetworkID": "6lgv0o648l7inrbu6abh5ac79",
                "Addr": "10.0.9.4/24"
            }
        ]
    },

I have an overlay network:

swarmed       "Subnet": "10.0.9.0/24",
                "Gateway": "10.0.9.1"

The drupalapp instances are started and stable.

My problem is that even though I see port 80 listening on each node I can't reach port 80 on any host.

How do I connect to drupalapp running on my swarm?

1
There have been several issues filed on the service discovery/published ports failing in the 1.12 swarm. The 1.12.1 release came out last week and has some fixes so I'd start with an upgrade to see if it resolves your issues. - BMitch
Yep, that did it. I upgraded all of my swarms to 12.1 and now I'm able to connect on the running nodes. Thanks! - user3063045

1 Answers

2
votes

(converting comment into an answer)

There were several issues reported in 1.12 on the service discovery and published ports failing. Pull request #25603 appears to fix a bunch of them and is included in 1.12.1 which was released last week. Note that some users in issue #24789 are still reporting problems even in 1.12.1 so there may still be some edge cases to work out.