nanobox-io/nanobox

failed to initialize docker for provider -> failed to setup the provider network -> failed to add an IP to the provider for mounting

MattGaud2425 opened this issue · 3 comments

$ nanobox deploy
✓ Skipping (already running)

Error : exit status 255
: exit status 1
Context : failed to initialize docker for provider -> failed to setup the provider network -> failed to add an IP to the provider for mounting

Getting this as well all of a sudden...

resolved by switching from lightweight vm option to docker native option.

G3z commented

I had the same Issue:

$ nanobox start
Starting Nanobox :

--------------------------------------------------------------------------------
+ HEADS UP:
+ Nanobox will run a single VM transparently within VirtualBox.
+ All apps and containers will be launched within the same VM.
--------------------------------------------------------------------------------

  ! Launching VM
    Running pre-create checks...
    (nanobox) Boot2Docker URL was explicitly set to "https://d1ormdui8qdvue.cloudfront.net/boot2docker/v1/boot2docker.iso" at create time, so Docker Machine cannot upgrade this machine to the latest version.
    Creating machine...
    (nanobox) Boot2Docker URL was explicitly set to "https://d1ormdui8qdvue.cloudfront.net/boot2docker/v1/boot2docker.iso" at create time, so Docker Machine cannot upgrade this machine to the latest version.
    (nanobox) Downloading /Users/g3z/.docker/machine/cache/boot2docker.iso from https://d1ormdui8qdvue.cloudfront.net/boot2docker/v1/boot2docker.iso...
    (nanobox) 0%....10%....20%....30%....40%....50%....60%....70%....80%....90%....100%
    (nanobox) Creating VirtualBox VM...
    (nanobox) Creating SSH key...
    (nanobox) Starting the VM...
    (nanobox) Check network to re-create if needed...
    (nanobox) Waiting for an IP...
    Waiting for machine to be running, this may take a few minutes...
    Detecting operating system of created instance...
    Waiting for SSH to be available...
    Detecting the provisioner...
    Provisioning with boot2docker...
    Copying certs to the local machine directory...
    Copying certs to the remote machine...
    Setting Docker configuration on the remote daemon...
    Checking connection to Docker...
    Error creating machine: Error checking the host: Error checking and/or regenerating the certs: There was an error validating certificates for host "192.168.99.101:2376": x509: certificate has expired or is not yet valid
    You can attempt to regenerate them using 'docker-machine regenerate-certs [name]'.
    Be advised that this will trigger a Docker daemon restart which will stop running containers.

  ✓ Configuring Network
  ✓ Loading kernel modules
  ✓ Cleaning DHCP
  ✓ Regenerating Docker certs
  ✓ Joining virtual network

Error   : unable to communicate with Docker
Context : failed to initialize docker for provider

but i found out that manually finxing certs did the trick

$ docker-machine regenerate-certs -f --client-certs nanobox
$ docker-machine stop nanobox