Skip to content

1.7.1-rc1/2 - container cannot connect establish a tcp socket to itself via the hosts IP address / this works in 1.6.1 #13873

Closed

Description

@alvinr

Problem

I'm trying to model a distributed system (MongoDB) with a set of containers. In order to establish a quorum, each process takes a list of nodes and confirms a tcp connection between the nodes.

+-- host 1 192.x.x.10- / 28001 -+                      
| +-- container 1 178.x.x.20 / 27017   

+-- host 2 192.x.x.11 / 28002--+
| +-- container 2 178.x.x.21/27017

So in the example above container 1 tries to open tcp socket to 192.x.x.10 / 28001 and 192.x.x.11 / 28002, container 2 does the same thing.

In 1.6.1 this succeeds. in 1.7.0-rc1 and rc2 this connection to the IP of the host that the container resides fails.

Reproduce

This is the original testcase

docker-machine create -d virtualbox --virtualbox-boot2docker-url https://github.com/tianon/boot2docker/releases/download/v1.7.0-rc2/boot2docker.iso dev17

eval "$(docker-machine env dev17)"

docker run -p 28001:27017 -v /data/db/s1rs1a:/data/db --name s1rs1a -d mongo --replSet rs1 --smallfiles --noprealloc 

docker run -p 28002:27017 -v /data/db/s1rs1b:/data/db --name s1rs1b -d mongo --replSet rs1 --smallfiles --noprealloc

mongo <host>:28001
> use admin
> cfg={_id:"rs1",members:[{_id:0,host:"<host ip>:28001"},{_id:1,host:"<host ip>"}]}
> rs.initiate(cfg)

Workaround:

None

Activity

  1. alvinr commented on Jun 11, 2015

    @alvinr
    ContributorAuthor

    I'll see if I can find a simpler reproduction without MongoDB

  2. thaJeztah commented on Jun 11, 2015

    @thaJeztah
    Member

    ping @mrjana @mavenugo for regression in networking, thanks!

  3. added this to the 1.7.0 milestone on Jun 11, 2015
  4. tiborvass commented on Jun 11, 2015

    @tiborvass
    Contributor

    could reproduce with rc2, trying with soon-to-be-rc3

  5. changed the title [-]1.7.1-rc1/2 - container connect establish a tcp socket to itself via the hosts IP address / this works in 1.6.1[/-] [+]1.7.1-rc1/2 - container cannot connect establish a tcp socket to itself via the hosts IP address / this works in 1.6.1[/+] on Jun 11, 2015
  6. added a commit that references this issue on Jun 12, 2015
    5a02d07
  7. added a commit that references this issue on Jun 12, 2015
    7ffbd7e
  8. added a commit that references this issue on Jul 25, 2015
    cd8dab9
  9. added a commit that references this issue on Jul 27, 2015
    5062bb3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions