Results 1 to 5 of 5

Thread: Docker Swarm networking

Threaded View

  1. #1

    Docker Swarm networking

    Hi,

    We are using the Docker distribution installed from the Containers_Module_12_x86_64 package.
    We have containers running locally on the host with mapped ports and everything works fine.

    When we attempt to run the containers as a service under swarm, the service starts up fine but the mapped ports are not exposed on the localhost.
    We have attempted this with very simple services and gotten the same results (including the docker tutorial).
    Example:
    Commands:
    docker swarm init
    docker service create --name my-web --publish published=8080,target=80 --replicas 1 nginx

    Both successful.
    Result from docker service ls
    ID NAME MODE REPLICAS IMAGE PORTS
    ze88zz31le31 my-web replicated 1/1 nginx:latest *:8080->80/tcp

    Result attempting to attach to localhost:8080 where nginx should be accessible
    curl localhost:8080
    curl: (7) Failed to connect to localhost port 8080: Connection refused

    Research on forums seems to indicate that this might be a potential missing dependency in our SLES.
    We are not running SuSEfirewall2 and iptables appears to be populated correctly:
    sudo iptables-save | grep DOCKER
    : DOCKER - [0:0]
    -A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER
    -A OUTPUT ! -d 127.0.0.0/8 -m addrtype --dst-type LOCAL -j DOCKER
    -A DOCKER -i docker0 -j RETURN
    -A DOCKER -i docker_gwbridge -j RETURN
    : DOCKER - [0:0]
    : DOCKER-ISOLATION - [0:0]
    : DOCKER-USER - [0:0]
    -A FORWARD -j DOCKER-USER
    -A FORWARD -j DOCKER-ISOLATION
    -A FORWARD -o docker0 -j DOCKER
    -A FORWARD -o docker_gwbridge -j DOCKER
    -A DOCKER-ISOLATION -i docker_gwbridge -o docker0 -j DROP
    -A DOCKER-ISOLATION -i docker0 -o docker_gwbridge -j DROP
    -A DOCKER-ISOLATION -j RETURN
    -A DOCKER-USER -j RETURN

    I have tried enabling ipv4 forwarding as recommended in a forum, with no seeming effect.
    The docker swarm management ports are available when swarm is running:
    netstat -nlp | grep 7946
    tcp 0 0 :::7946 :::* LISTEN 1828/dockerd
    udp 0 0 :::7946 :::* 1828/dockerd
    netstat -nlp | grep 4789
    udp 0 0 0.0.0.0:4789 0.0.0.0:* -

    I'm at a bit of a dead-end. I read one post that said that LVS / SLES HA Package may be a dependency but I found no corroboration of this.

    Any help would be appreciated.
    Last edited by philu1; 18-Oct-2018 at 23:15. Reason: formatting

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •