Skip to content
This repository was archived by the owner on Sep 26, 2021. It is now read-only.
This repository was archived by the owner on Sep 26, 2021. It is now read-only.

Docker-machine - Error - IP address conflict with latest docker release #1573

Closed
@piyush12321

Description

@piyush12321

Here are my environment:

Windows 7 64 bit
Docker for windows
When I create new machine with docker-machibne command , I encounter the IP address conflict:

IP Address conflict Pop up comes.

And the console is stuck at phase starting VM

Creating VirtualBox VM...
Creating SSH key...
Starting VirtualBox VM...
Starting VM...
Furthermore, when I press Ctrl-C to stop the script and run eval "$(docker-machine env dev)", I receive following error:

Also more than 60 tries attempted error in creating VM encountered
$ eval "$(docker-machine env dev)"

Please help me out here!

Activity

bobfields

bobfields commented on Aug 4, 2015

@bobfields

I'm also on Win7 x64 using Docker 1.7.1 build 786b29d (Jul 15 2015) - is this a problem specific to Windows?

This problem was temporarily solved (for me) by setting the IP address options before creating the machine (see https://docs.docker.com/machine/#oracle-virtualbox CIDR options):

set VIRTUALBOX_HOSTONLY_CIDR=192.168.99.100/24

The docs don't explain this option very well, but basically 100 is the starting address and 24 is the number of addresses in the range to check if available. A note to the person above - use the Windows commands to get the environment values, as described in the docs. Specifically: 'docker-machine env --shell cmd dev', rather than the 'eval' command which required bsh or other scripting host. Delete the machine 'docker-machine rm dev' before trying the create again.

The logs to see which address is in conflict is available under Administrative Tools -> Event Viewer -> Windows Logs -> System:
"The system detected an address conflict for IP address 192.168.99.1 with the system having network hardware address 08-00-27-F8-37-24. Network operations on this system may be disrupted as a result."

Interestingly, boot2docker does not have this problem. It picks address 192.168.99.100 to start with.

However (in a large corporate environment where hundred of developer machines share the same network) docker really should check for an unused IP address conflict before grabbing an address during launch.

m3sol

m3sol commented on Sep 9, 2015

@m3sol

I had a this same problem with creating and starting machines with Docker-Machine (or Kitematic):

  • Machine creation never completes (99% in Kitematic and hangs on command line)
  • new Host-Only network adapter is created
  • Windows Duplicate IP Error is raised
  • VirtualBox shows the Machine as running
  • docker-machine config and Kitematic (may need to close and reopen) gives ...

    ENOENT: no such file or directory, open 'C:\Users\ca.pem'

  • Can't ping VM, but can ssh to it.

Have previously had no issues creating several machines with boot2docker (v1.8.0 and before) so looked for differences in the newly Host-Only network adapters.
Appears to be that in docker-machine created adapters the interface host adapter address and the DHCP server address are the same.

Secondary Problem
Any change to Host-Only interface settings results in creation of another interface with the same issue when restarting from Docker-Machine or Kitematic (similar to #1804)

The workaround was to use different IPs for the adapter Host and DHCP server settings, then start the machine from VBoxManage, from then on all docker and docker-machine commands work as expected.

VBoxManage.exe startvm docker-vm --type headless
docker-machine env docker-vm --shell cmd>%userprofile%\dockerConfig.bat
call %userprofile%\dockerConfig.bat
docker-machine ssh docker-vm "sudo mkdir -p /vmdata/ & sudo mount -t vboxsf vmdata /vmdata/"

Things working fine now for a few days and several reboot / restart cycles

  • Win7x64
  • VirtualBox 4.3.26
  • Docker-Machine 0.4.0
gmanfunky

gmanfunky commented on Oct 7, 2015

@gmanfunky

Duplicate of #1673
The Fix was merged Aug. 28 - #1674

A release with fixes would be nice.

nathanleclaire

nathanleclaire commented on Oct 7, 2015

@nathanleclaire
Contributor

@gmanfunky The release will be out in about two weeks' time. In the meantime, you can get master builds at https://docker-machine-builds.evanhazlett.com/latest (we will host an official version eventually as well) or compiling from source.

Thanks!

  • N
mtricht

mtricht commented on Oct 11, 2015

@mtricht

@nathanleclaire The link you posted sadly has no builds, any idea where I can find them?

nathanleclaire

nathanleclaire commented on Oct 12, 2015

@nathanleclaire
Contributor

@michaeltricht Looks like the unofficial master binaries are having a hiccup -- in the interim your best bet is to build yourself from source.

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

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @gmanfunky@nathanleclaire@bobfields@mtricht@piyush12321

        Issue actions

          Docker-machine - Error - IP address conflict with latest docker release · Issue #1573 · docker/machine