In case someone else runs into this.  I added 'purge_networks' during the 
docker_container run and it seems to have fixed the issue.  Apparently this 
removes the container from all other network interfaces.

On Sunday, February 5, 2017 at 8:28:48 AM UTC-8, Sonny Heer wrote:
>
> Hi all,
>
> I've been fighting this one for a while.   adding N containers to a custom 
> network.  host1 starts services that listen on 50070.  on host1 I can 
> 'telnet host1.dev 50070' and it works.  host2 is connected to the same 
> 'dev' network, but from host2 connection is refused to host1 on 50070, but 
> ping to host1 works fine.  I've tried exposing/publishing ports.  Although 
> its my understanding inter-container communication on a shared network 
> doesn't need ports exposed as a requirement.
>
> host: linux mint - 4.4.0-62-generic #83-Ubuntu
> ansible 2.2.1.0
> Docker version 1.12.3, build 6b644ec
>
> relevant files:
>
>   tasks:
>     - name: Create dev cluster network
>       docker_network:
>         name: dev
>
>     - name: Start docker node images
>       docker_container:
>         image: "test/image"
>         name: "host{{ item }}"
>         hostname: "host{{ item }}.dev"
>         state: started
>         privileged: true
>         interactive: yes
>         restart_policy: always
>         exposed_ports: "{{ node_ports }}"
>         #published_ports: "{{ node_ports }}"
>         networks:
>         - name: dev
>       with_sequence: count=3
>
>
> I have another container started the same way that starts a service on 
> 8080, and all containers can connect to that node/port fine.  I'm guessing 
> it has to do with how each service is starting, but i do not control how 
> services are started.  any ideas...?  
>
> Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/68f6e80d-09e3-44ca-92de-e22395cff984%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to