I broke Local by deleting VirtualBox. I've *almost* fixed it but need help

So, I accidentally deleted VirtualBox earlier today, and I’m afraid I’ve broken Local, where I have several sites in development for which there’s no other copy.

When I fired up Local the first time, it reinstalled VirtualBox, then hung, saying that the “host already exists: local-by-flywheel.” I followed the directions here and got the installation process completed. Host already exists: “local-by-flywheel”

So, everything seems reinstalled, and I can see all my sites in the list. Initially, each of them showed an orange error (something about the container being missing), and the first one I selected fixed that issue and starts normally. But after I did that, the error message went away on all of them (but only the one I’d selected first actually starts).

Now, when I attempt to start most of my sites, they simply don’t start (it hangs on “Starting…”). If I attempt to clone one of those sites (one of the ones that doesn’t work), I get an error saying “no such container”).

Do you have any guidance? Is there a way to re-import sites or anything like that?

1 Like

Hey Jon,

I’d start by going to Help » Restart Local’s Machine.

The sites without a container should show the error again. If they don’t, please reply back here with your log.

Another thing you can do is navigate to the Local sites folder, zip up the ones that aren’t functioning properly and then import them.

Here are the logs from a start, then an unsuccessful attempt to open one of the sites:

Apr 26, 2018, 2:44 PM CDT - info: [main/index] Existing Pressmatic data does not exist.
Apr 26, 2018, 2:44 PM CDT - info: [main/check-system] Check System: Docker Machine:  
{ stdout: 'Stopped\n', stderr: '' }
Apr 26, 2018, 2:44 PM CDT - info: [renderer/CheckEnvPage] Check system promise response: 
[ undefined, 'machine-halted' ]
Apr 26, 2018, 2:44 PM CDT - info: [main/docker-machine] Checking Boot2Docker.iso hash
Apr 26, 2018, 2:44 PM CDT - info: [main/docker-machine] Boot2Docker.iso hash does not match!
Apr 26, 2018, 2:44 PM CDT - info: [main/docker-machine] Copying /Applications/Local by Flywheel 2.app/Contents/Resources/extraResources/virtual-machine/vendor/docker/boot2docker.iso to /Users/jonschroeder/.docker/machine/machines/local-by-flywheel/boot2docker.iso
Apr 26, 2018, 2:44 PM CDT - info: [main/docker-machine] Running  /Applications/Local by Flywheel 2.app/Contents/Resources/extraResources/virtual-machine/vendor/docker/osx/docker-machine start local-by-flywheel
Apr 26, 2018, 2:44 PM CDT - info: [main/docker-machine] Starting "local-by-flywheel"...
Apr 26, 2018, 2:44 PM CDT - info: [main/docker-machine] (local-by-flywheel) Check network to re-create if needed...
Apr 26, 2018, 2:44 PM CDT - info: [main/docker-machine] (local-by-flywheel) Waiting for an IP...
Apr 26, 2018, 2:45 PM CDT - info: [main/docker-machine] Machine "local-by-flywheel" was started.
Apr 26, 2018, 2:45 PM CDT - info: [main/docker-machine] Waiting for SSH to be available...
Apr 26, 2018, 2:45 PM CDT - info: [main/docker-machine] Detecting the provisioner...
Apr 26, 2018, 2:45 PM CDT - info: [main/docker-machine] Started machines may have new IP addresses. You may need to re-run the `docker-machine env` command.
Apr 26, 2018, 2:45 PM CDT - info: [main/set-docker-env] Getting Docker Machine env.
Apr 26, 2018, 2:45 PM CDT - info: [main/set-docker-env] Received Docker Machine env. export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.94.100:2376"
export DOCKER_CERT_PATH="/Users/jonschroeder/.docker/machine/machines/local-by-flywheel"
export DOCKER_MACHINE_NAME="local-by-flywheel"
# Run this command to configure your shell: 
# eval $("/Applications/Local by Flywheel 2.app/Contents/Resources/extraResources/virtual-machine/vendor/docker/osx/docker-machine" env --shell bash local-by-flywheel)

Apr 26, 2018, 2:45 PM CDT - info: [main/docker-machine-fdv] NFS Mount Status 
{ mountedPoints: [ '/Users', '/Volumes' ],
  mountPoints: [ '/Users', '/Volumes' ] }
Apr 26, 2018, 2:45 PM CDT - info: [main/docker-machine-fdv] unfsd already running
Apr 26, 2018, 2:45 PM CDT - info: [main/docker-machine] checking IP
Apr 26, 2018, 2:45 PM CDT - info: [main/set-docker-env] Getting Docker Machine env.
Apr 26, 2018, 2:45 PM CDT - info: [main/docker-machine] checked IP 192.168.94.100

Apr 26, 2018, 2:45 PM CDT - info: [main/set-docker-env] Received Docker Machine env. export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.94.100:2376"
export DOCKER_CERT_PATH="/Users/jonschroeder/.docker/machine/machines/local-by-flywheel"
export DOCKER_MACHINE_NAME="local-by-flywheel"
# Run this command to configure your shell: 
# eval $("/Applications/Local by Flywheel 2.app/Contents/Resources/extraResources/virtual-machine/vendor/docker/osx/docker-machine" env --shell bash local-by-flywheel)

Apr 26, 2018, 2:45 PM CDT - warn: [main/index] Unhandled Rejection at: Promise  Promise {
  <rejected> { Error: (HTTP code 404) no such container - No such container: b9ea6e3883a94308ead7e660308fa27de5ebf0f29fe9744aed62c4e108bd127b 
    at /Applications/Local by Flywheel 2.app/Contents/Resources/app.asar/node_modules/docker-modem/lib/modem.js:239:17
    at getCause (/Applications/Local by Flywheel 2.app/Contents/Resources/app.asar/node_modules/docker-modem/lib/modem.js:269:7)
    at Modem.buildPayload (/Applications/Local by Flywheel 2.app/Contents/Resources/app.asar/node_modules/docker-modem/lib/modem.js:238:5)
    at IncomingMessage.<anonymous> (/Applications/Local by Flywheel 2.app/Contents/Resources/app.asar/node_modules/docker-modem/lib/modem.js:214:14)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:188:7)
    at endReadableNT (_stream_readable.js:975:12)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickDomainCallback (internal/process/next_tick.js:128:9)
  reason: 'no such container',
  statusCode: 404,
  json: { message: 'No such container: b9ea6e3883a94308ead7e660308fa27de5ebf0f29fe9744aed62c4e108bd127b' } } }  reason:  Error: (HTTP code 404) no such container - No such container: b9ea6e3883a94308ead7e660308fa27de5ebf0f29fe9744aed62c4e108bd127b 
    at /Applications/Local by Flywheel 2.app/Contents/Resources/app.asar/node_modules/docker-modem/lib/modem.js:239:17
    at getCause (/Applications/Local by Flywheel 2.app/Contents/Resources/app.asar/node_modules/docker-modem/lib/modem.js:269:7)
    at Modem.buildPayload (/Applications/Local by Flywheel 2.app/Contents/Resources/app.asar/node_modules/docker-modem/lib/modem.js:238:5)
    at IncomingMessage.<anonymous> (/Applications/Local by Flywheel 2.app/Contents/Resources/app.asar/node_modules/docker-modem/lib/modem.js:214:14)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:188:7)
    at endReadableNT (_stream_readable.js:975:12)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickDomainCallback (internal/process/next_tick.js:128:9)
Apr 26, 2018, 2:45 PM CDT - info: [main/waitForMySQL] Querying MySQL

OK, I’ll try those things.

Beautiful! That did it. I’ll repeat the process for the other sites. Thanks so much, Clay.

I’ll reach back out if there are any more issues, but I think this gets me to where I need to go.

Glad to hear! Were you able to use the restore button in Local or did you import the sites?

I’ve been using the restore button in Local. I did find that I had to do it one or two sites at a time, or it essentially hangs and thinks through everything, so a bit of a process, but much easier than re-importing (each site will have multiple associated git repos that I’d rather not mess with if possible).

Got it. I’ll look into that!