Vagrant failed, sudo: /etc/init.d/nfs-kernel-server: command not found

(Noam Yorav-Raphael) #1

I followed the instructions here
I cloned the github repo, current revision is ee3442e5.
“vagrant up” failed. Here’s what I have in the terminal.
I’m using Ubuntu 14.04, 64 bit machine.


noam@nikanor:~/sand/discourse$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'discourse/' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Loading metadata for box ''
    default: URL:
==> default: Adding box 'discourse/' (v0.9.9.15) for provider: virtualbox
    default: Downloading:
==> default: Successfully added box 'discourse/' (v0.9.9.15) for 'virtualbox'!
==> default: Importing base box 'discourse/'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'discourse/' is up to date...
==> default: Setting the name of the VM: discourse_default_1428354394433_85043
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 3000 => 4000 (adapter 1)
    default: 1080 => 4080 (adapter 1)
    default: 22 => 2222 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address:
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Connection timeout. Retrying...
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if its present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
    default: The guest additions on this VM do not match the installed version of
    default: VirtualBox! In most cases this is fine, but in rare cases it can
    default: prevent things such as shared folders from working properly. If you see
    default: shared folder errors, please make sure the guest additions within the
    default: virtual machine match the version of VirtualBox you have installed on
    default: your host and reload your VM.
    default: Guest Additions Version: 4.2.0
    default: VirtualBox Version: 4.3
==> default: Configuring and enabling network interfaces...
==> default: Exporting NFS shared folders...
==> default: Preparing to edit /etc/exports. Administrator privileges will be required...
[sudo] password for noam: 
sudo: /etc/init.d/nfs-kernel-server: command not found
==> default: Mounting NFS shared folders...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mount -o 'vers=3,udp''/home/noam/sand/discourse' /vagrant

Stdout from the command:

Stderr from the command:

stdin: is not a tty
mount.nfs: requested NFS version or transport protocol is not supported

(Noam Yorav-Raphael) #2

Ok, this was solved by installing nfs-kernel-server on my host machine:

sudo apt-get install nfs-kernel-server


Ugh, you have some similar bug as me.

@noamraph Does it still spit out that stdin error after you had installed the nfs server?