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.

Thanks!
Noam

noam@nikanor:~/sand/discourse$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'discourse/discourse-0.9.9.15.box' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Loading metadata for box 'https://vagrantcloud.com/discourse/discourse-0.9.9.15.box'
    default: URL: https://vagrantcloud.com/discourse/discourse-0.9.9.15.box
==> default: Adding box 'discourse/discourse-0.9.9.15.box' (v0.9.9.15) for provider: virtualbox
    default: Downloading: https://vagrantcloud.com/discourse/boxes/discourse-0.9.9.15.box/versions/0.9.9.15/providers/virtualbox.box
==> default: Successfully added box 'discourse/discourse-0.9.9.15.box' (v0.9.9.15) for 'virtualbox'!
==> default: Importing base box 'discourse/discourse-0.9.9.15.box'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'discourse/discourse-0.9.9.15.box' 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: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Connection timeout. Retrying...
    default: 
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default: 
    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: 
    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' 192.168.10.1:'/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

#3

Ugh, you have some similar bug as me.

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