nanobox-io / nanobox

The ideal platform for developers
https://nanobox.io
MIT License
1.61k stars 89 forks source link

Ensure nfs server is running on linux #286

Closed sdomino closed 7 years ago

sdomino commented 7 years ago

Linux users are having issues running nanobox. Nanobox fails when trying to write to their /etc/exports file, which it doesn't find, because it's not properly detecting if an nfs server is running.

tylerflint commented 7 years ago

Generally, there are a few issues blocking people from using nanobox on Linux. Fortunately, one of our great users cataloged the issues, here is the email:

Just spent the last half hour or so getting that django quickstart set up, and after a few hiccups it seems to be working flawlessly! I've attached a few terminal outputs just so you can see the whole process from the machine's point of view, but most everything that came up was pretty easy to solve.

Basic system info:

OS: Ubuntu 16.10 64-bit Memory: 16GB Processor: Intel Cor i7-4700HQ CPU @ 2.40GHz x 8 Graphics: GeForce GTX 860M/PCIe/SSE2 Disk: 120.6GB SSD Command language interpreter: zsh

Here's what happened on each attempt (numbers corresponding to attachments):

  1. VirtualBox was not installed. Simple fix: install virtualbox!
  2. VT-x was disabled in the BIOS. Had to go BIOS hunting for the virtualization setting, but found it in the end and enabled it.
  3. No such file /etc/exports. At the time I didn't know what that file was, so I just ran touch /etc/exports to see what would happen.
  4. exportfs not found in $PATH. Now I got the clue that I was missing more important programs, so I went and installed the nfs-common package.
  5. Bad file descriptor/connection refused. Although the error wasn't self-explanatory or "googleable" like the others, my first guess was that I needed to install the nfs-kernel-server package as well (given the "connection refused" bit). I would have installed that with nfs-common anyway, but I was trying to take the smallest actions possible so as to provide the maximum amount of opportunity for the system to fail (so that I would have more to report!).
  6. Started successfully! ...but then Django complained that 0.0.0.0 was not a valid port or address:port pair. Again, very simple fix, and on the 7th attempt...
  7. We were up and running!
tylerflint commented 7 years ago

› nanobox run python manage.py runserver 0.0.0.0 Starting Nanobox : ✓ Downloading docker-machine ! Launching VM Creating CA: /home/neill/.docker/machine/certs/ca.pem Creating client certificate: /home/neill/.docker/machine/certs/cert.pem Running pre-create checks... Error with pre-create check: "VBoxManage not found. Make sure VirtualBox is installed and VBoxManage is in the path" ! Launching VM Running pre-create checks... Error with pre-create check: "VBoxManage not found. Make sure VirtualBox is installed and VBoxManage is in the path"

Error : exit status 3 Context : failed to create the provider

tylerflint commented 7 years ago

› nanobox run python manage.py runserver 0.0.0.0 Starting Nanobox : ⡿ Launching VM : ! Launching VM Running pre-create checks... (nanobox) Image cache directory does not exist, creating it at /home/neill/.docker/machine/cache... Creating machine... (nanobox) Downloading /home/neill/.docker/machine/cache/boot2docker.iso from https://s3.amazonaws.com/tools.nanobox.io/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) Found a new host-only adapter: "vboxnet0" Error creating machine: Error in driver during machine creation: Unable to start the VM: /usr/bin/VBoxManage startvm nanobox --type headless failed: VBoxManage: error: VT-x is disabled in the BIOS for all CPU modes (VERR_VMX_MSR_ALL_VMX_DISABLED) VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole

Details: 00:00:00.179435 Power up failed (vrc=VERR_VMX_MSR_ALL_VMX_DISABLED, rc=NS_ERROR_FAILURE (0X80004005))

! Booting VM Starting "nanobox"... (nanobox) Check network to re-create if needed... Unable to start the VM: /usr/bin/VBoxManage startvm nanobox --type headless failed: VBoxManage: error: VT-x is disabled in the BIOS for all CPU modes (VERR_VMX_MSR_ALL_VMX_DISABLED) VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole

Details: 00:00:00.171714 Power up failed (vrc=VERR_VMX_MSR_ALL_VMX_DISABLED, rc=NS_ERROR_FAILURE (0X80004005))

! Booting VM Starting "nanobox"... (nanobox) Check network to re-create if needed... Unable to start the VM: /usr/bin/VBoxManage startvm nanobox --type headless failed: VBoxManage: error: VT-x is disabled in the BIOS for all CPU modes (VERR_VMX_MSR_ALL_VMX_DISABLED) VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole

Details: 00:00:00.186971 Power up failed (vrc=VERR_VMX_MSR_ALL_VMX_DISABLED, rc=NS_ERROR_FAILURE (0X80004005))

Error : exit status 1 Context : failed to start the provider

lyondhill commented 7 years ago

fixed in https://github.com/nanobox-io/nanobox/pull/291

pablorsk commented 6 years ago

Temporal solution:

sudo apt install nfs-kernel-server

Run again nanobox configure :)