Cannot get VM started due to Waiting for an IP / Maximum number of retries (60) exceeded error

Hi there,

I’m trying to get Local installed for the first time, but I’m having issues getting the VM to start. I already had VirtualBox installed, along with Hyper-V that I enable on an as-needed basis with a startup option configured in bcdedit.

I’ve tried deleting Local, deleting the VM, restarting, reinstalling Local, but I keep hitting either a Too many retries waiting for SSH to be available. Last error: Maximum number of retries (60) exceeded error, or it sits there for a long time waiting for an IP.

I’ve ensured all the Hyper-V networking interfaces are disabled. For some reason, Local will install a second VirtualBox Host-Only Network interface even though I already have one set up. The VirtualBox NDIS6 Bridged Networking Driver is installed.

Any ideas on how to overcome this? I had a look around the forums but couldn’t see a clear solution. I also get a Boot2Docker.iso hash does not match! error.

local-by-flywheel.log (39.1 KB) (Local version 2.2.1).

Thanks for your help.

I tried uninstalling Local and VirtualBox, then installing Local and having it install VirtualBox but I’m still getting errors. Any ideas?

local-by-flywheel.log (42.7 KB)

I just tried updating to 2.2.2 but get the same issue. I can boot the VM directly in VirtualBox, but it will not work through the Local app.

Would appreciate any help getting this to work…

Thanks.

Hi Stuart,

Sorry for the delay!

Are you running a VPN, firewall, or any other software that’s shaping/controlling your networking?

Hi Clay,

No problem. I’m only the inbuilt Windows 10 firewall. Does the installer not add the necessary rules automatically?

Thanks.

@StuartMorrisAU,

Windows Firewall isn’t a problem.

One thing you can try is restarting your PC and then re-opening Local. Sometimes this is what Docker Machine (one of Local’s dependencies) needs in order to get up-to-speed.

Hi @clay, I tried resetting the computer but I get the same error.

local-by-flywheel.log (50.8 KB)

Anything else I can try to get this working @clay?

Thanks.

@StuartMorrisAU,

Can you please try the following?

  1. Open Cmd.exe
  2. Run the following:
%LocalAppData%\Programs\local-by-flywheel\resources\extraResources\virtual-machine\vendor\docker\windows\docker-machine.exe --native-ssh create test-vm --virtualbox-boot2docker-url=file://C:/Users/micro/AppData/Local/Programs/local-by-flywheel/resources/extraResources/virtual-machine/vendor/docker/boot2docker.iso
  1. Provide the output in your reply here

Hi @clay, I get the following response:

Running pre-create checks…
Creating machine…
(test-vm) Downloading
C:\Users\micro.docker\machine\cache\boot2docker.iso from file://C:/Users/micro/AppData/Local/Programs/local-by-
flywheel/resources/extraResources/virtual-
machine/vendor/docker/boot2docker.iso…Error creating machine: Error in driver during machine creation: open
/Users/micro/AppData/Local/Programs/local-by-
flywheel/resources/extraResources/virtual-
machine/vendor/docker/boot2docker.iso: The system cannot find the path
specified.

Give this a try:

%LocalAppData%\Programs\local-by-flywheel\resources\extraResources\virtual-machine\vendor\docker\windows\docker-machine.exe create test-vm

If that fails, try:

%LocalAppData%\Programs\local-by-flywheel\resources\extraResources\virtual-machine\vendor\docker\windows\docker-machine.exe --native-ssh create test-vm2

Hi @clay,

I ran these commands earlier and it started to download the iso from GitHub, but my computer randomly shut down for some reason so I don’t know if the download finished. I re-ran the commands again and got the following results.

D:\SEM\Dropbox (Personal)\Documents\WindowsPowerShell>%LocalAppData%\Programs\local-by-flywheel\resources\extraResources\virtual-machine\vendor\docker\windows\docker-machine.exe create test-vm
Host already exists: "test-vm"

D:\SEM\Dropbox (Personal)\Documents\WindowsPowerShell>%LocalAppData%\Programs\local-by-flywheel\resources\extraResources\virtual-machine\vendor\docker\windows\docker-machine.exe --native-ssh create test-vm2
Host already exists: "test-vm2"

D:\SEM\Dropbox (Personal)\Documents\WindowsPowerShell>%LocalAppData%\Programs\local-by-flywheel\resources\extraResources\virtual-machine\vendor\docker\windows\docker-machine.exe --native-ssh create test-vm2
Host already exists: "test-vm2"

D:\SEM\Dropbox (Personal)\Documents\WindowsPowerShell>%LocalAppData%\Programs\local-by-flywheel\resources\extraResources\virtual-machine\vendor\docker\windows\docker-machine.exe --native-ssh create test-vm3
Running pre-create checks...
Creating machine...
(test-vm3) Copying C:\Users\micro\.docker\machine\cache\boot2docker.iso to C:\Users\micro\.docker\machine\machines\test-vm3\boot2docker.iso...
(test-vm3) Creating VirtualBox VM...
(test-vm3) Creating SSH key...
(test-vm3) Starting the VM...
(test-vm3) Check network to re-create if needed...
(test-vm3) Waiting for an IP...

@clay any more things I can try?

Thanks.

OS: Windows 10
VirtualBox: 5.2.8 (also tried 5.2.6)
FlyWheel 2.2.4 (also tried 2.2.3)

  • Install adds host-only network to VirtualBox ok (192.168.95.1/24) and creates VM with 2 x NICs, one NAT and one to the newly created host-only
  • VM starts and boot2docker loads correctly ending up at command prompt
  • Flywheel install sits waiting for an IP for at least 5 minutes (the longest I’ve left it!)
  • Shutting down the install also triggers the VM shutdown correctly
  • Re-running Flywheel boots the VM fine (again loading up boot2docker correctly) but again just sits there waiting for an IP … :frowning:

I’ve un-installed Flywheel, removed any host only adapters from VirtualBox and re-installed again - both on current and previous versions of FlyWheel and VirtualBox. I’m now stuck … any thoughts please?

[Edit: Link to screenshot: ScreenShot

Mar 5, 2018, 7:51 AM GMT - info: [main/index] Existing Pressmatic data does not exist.
Mar 5, 2018, 7:51 AM GMT - info: [main/check-system] Check System: Docker Machine:  
{ stdout: 'Stopped\n', stderr: '' }
Mar 5, 2018, 7:51 AM GMT - info: [renderer/CheckEnvPage] Check system promise response: 
[ undefined, 'machine-halted' ]
Mar 5, 2018, 7:51 AM GMT - info: [main/docker-machine] Checking Boot2Docker.iso hash
Mar 5, 2018, 7:51 AM GMT - info: [main/docker-machine] Boot2Docker.iso hash does not match!
Mar 5, 2018, 7:51 AM GMT - info: [main/docker-machine] Copying C:\Users\steve\AppData\Local\Programs\local-by-flywheel\resources\extraResources\virtual-machine\vendor\docker\boot2docker.iso to C:\Users\steve\.docker\machine\machines\local-by-flywheel\boot2docker.iso
Mar 5, 2018, 7:51 AM GMT - info: [main/docker-machine] Running  C:\Users\steve\AppData\Local\Programs\local-by-flywheel\resources\extraResources\virtual-machine\vendor\docker\windows\docker-machine.exe start local-by-flywheel
Mar 5, 2018, 7:51 AM GMT - info: [main/docker-machine] Starting "local-by-flywheel"...
Mar 5, 2018, 7:51 AM GMT - info: [main/docker-machine] (local-by-flywheel) Check network to re-create if needed...
Mar 5, 2018, 7:51 AM GMT - info: [main/docker-machine] (local-by-flywheel) Waiting for an IP...

Hi Steve,

Sorry for the trouble! I appreciate the logs and info. :smiley:

Sometimes the Waiting for an IP... step on Windows can take up to 10-15 minutes so I wouldn’t give up on it until 15 minutes has passed.

Still no good I’m afraid :frowning:

Mar 5, 2018, 3:53 PM GMT - info: [main/docker-machine] Checking Boot2Docker.iso hash
Mar 5, 2018, 3:53 PM GMT - info: [main/docker-machine] Boot2Docker.iso hash does not match!
Mar 5, 2018, 3:53 PM GMT - info: [main/docker-machine] Copying C:\Users\steve\AppData\Local\Programs\local-by-flywheel\resources\extraResources\virtual-machine\vendor\docker\boot2docker.iso to C:\Users\steve\.docker\machine\machines\local-by-flywheel\boot2docker.iso
Mar 5, 2018, 3:53 PM GMT - info: [main/docker-machine] Running  C:\Users\steve\AppData\Local\Programs\local-by-flywheel\resources\extraResources\virtual-machine\vendor\docker\windows\docker-machine.exe start local-by-flywheel
Mar 5, 2018, 3:53 PM GMT - info: [main/docker-machine] Starting "local-by-flywheel"...
Mar 5, 2018, 3:53 PM GMT - info: [main/docker-machine] (local-by-flywheel) Check network to re-create if needed...
Mar 5, 2018, 3:53 PM GMT - info: [main/docker-machine] (local-by-flywheel) Waiting for an IP...
Mar 5, 2018, 4:07 PM GMT - warn: [main/docker-machine] Too many retries waiting for SSH to be available.  Last error: Maximum number of retries (60) exceeded

@SteveCliff,

Heads up, I merged your topic into @StuartMorrisAU’s topic about the same issue.


@StuartMorrisAU @SteveCliff, can you both try the two following commands in either Cmd or PowerShell?

%LocalAppData%\Programs\local-by-flywheel\resources\extraResources\virtual-machine\vendor\docker\windows\docker-machine.exe -D --native-ssh create local-test-vm-native-ssh
%LocalAppData%\Programs\local-by-flywheel\resources\extraResources\virtual-machine\vendor\docker\windows\docker-machine.exe -D create local-test-vm

These commands both have debug flags set for docker-machine.exe so there will be a considerable amount of output. Please provide it all :slight_smile:

I’m just about to travel to a client but will upload logs etc. when I get back later tonight. In the meantime however, I have noticed this:

(local-test-vm-native-ssh) DBG | About to run SSH command:
(local-test-vm-native-ssh) DBG | exit 0
(local-test-vm-native-ssh) DBG | SSH cmd err, output: exit status 255:
(local-test-vm-native-ssh) DBG | Error getting ssh command 'exit 0' : ssh command error:
(local-test-vm-native-ssh) DBG | command : exit 0
(local-test-vm-native-ssh) DBG | err     : exit status 255

I have Git for Windows installed which I know added OpenSSH although I set it up so that it only should have path’d it in when I open a proper Git Bash windows rather than normal Windows command box/
With the “SSH cmd err” statement above I’m wondering if it’s picking up an incompatible version of SSH?

Either way I will upload the logs later for review … thanks.

Yes, it was a different version of SSH that was causing the issue! However, it wasn’t with Git for Windows (I un-installed it), it was the new OpenSSH client for Windows 10 (the one still in beta).

I’m presuming that it picked up this SSH version before picking up the one Flywheel wanted to use?

Either way, after un-installing OpenSSH for Windows 10 it works fine :slight_smile:

NB. I have also re-installed Git For Windows (with the “Use Git from Bash only” option) and everything still works ok.

Hi @clay,

Here’s the output as requested. FWIW, I also have Git for Windows installed, which I didn’t even remember as I don’t use it often! It’s also configured to use git from bash only, however C:\WINDOWS\System32\OpenSSH\ is included in the system environment path variable by default. Removing it allowed local to start. :slight_smile:

local-command-log.log (174.8 KB)