Page MenuHomePhabricator

error on doing vagrant up "mount.nfs: access denied by server while mounting" in ubuntu 14.04
Closed, DeclinedPublic

Description

I tried to set up the MediaWiki Vagrant environment according to the steps described here: http://www.mediawiki.org/wiki/MediaWiki-Vagrant
I used the most current VirtualBox and Vagrant.
When I tried to do vagrant up: mount.nfs: access denied by server while mounting.

Find the complete error here:

Bildschirmfoto_vom_2014-12-10_16:10:00.png (472×723 px, 59 KB)

Event Timeline

Sputniza raised the priority of this task from to Needs Triage.
Sputniza updated the task description. (Show Details)
Sputniza changed Security from none to None.
Sputniza added subscribers: Sputniza, Mvolz.

I am getting the same error on Ubuntu 14.04 with the most recent version of vagrant and virtualbox 4.3.12r93733

nfsd running
exportfs: duplicated export entries:
exportfs: 10.11.12.13:/home/marielle/Code/vagrant
exportfs: 10.11.12.13:/home/marielle/Code/vagrant
exportfs: /home/marielle/Code/vagrant does not support NFS export

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 'noatime,rsize=32767,wsize=32767,async' 10.11.12.1:'/home/marielle/Code/vagrant' /vagrant

Stdout from the command:

Stderr from the command:

stdin: is not a tty
mount.nfs: access denied by server while mounting 10.11.12.1:/home/marielle/Code/vagrant

Mvolz renamed this task from error on doing vagrant up: ubuntu 14.04 to error on doing vagrant up "mount.nfs: access denied by server while mounting" in ubuntu 14.04.Dec 10 2014, 4:00 PM

exportfs: /home/marielle/Code/vagrant does not support NFS export

This last error message sounds like /home/marielle is an encrypted partition. The only fix for this is to disable the use of nfs for your Vagrant shares. We have a command in our plugin that makes that pretty easy: vagrant config nfs_shares off

Sputniza, does doing

vagrant config nfs_shares off

then

vagrant reload

Work for you?

Additional info:

I have full disk encryption, but vagrant used to work for me (about 6 months ago?) and it's the same computer although I'm now on 14.04 instead of 13.* , since then- is this a new thing, that it's known not to work on fully encrypted disks but just on Trusty Tahr specifically?

I was able to complete vagrant up with NFS shares off, but unfortunately still with errors.

While there is a server running at http://127.0.0.1:8080/ I get File not found: /vagrant/mediawiki/index.php. Alas!

Output of vagrant up:

Stderr from the command:

stdin: is not a tty
Error: composer install --optimize-autoloader returned 1 instead of one of [0]
Error: /Stage[main]/Mediawiki/Php::Composer::Install[/vagrant/mediawiki]/Exec[composer-install--vagrant-mediawiki]/returns: change from notrun to 0 failed: composer install --optimize-autoloader returned 1 instead of one of [0]
Error: /usr/local/bin/multiversion-install wiki admin --dbname wiki --dbpass vagrant --dbuser root --pass vagrant --scriptpath /w --server http://127.0.0.1:8080 --confpath /vagrant/settings.d/wikis/wiki
returned 1 instead of one of [0]
Error: /Stage[main]/Mediawiki/Mediawiki::Wiki[devwiki]/Exec[wiki_setup]/returns: change from notrun to 0 failed: /usr/local/bin/multiversion-install wiki admin --dbname wiki --dbpass vagrant --dbuser root --pass vagrant --scriptpath /w --server http://127.0.0.1:8080 --confpath /vagrant/settings.d/wikis/wiki
returned 1 instead of one of [0]
Warning: /Stage[main]/Mediawiki/Mediawiki::Wiki[devwiki]/Exec[wiki_include_extra_settings]: Skipping because of failed dependencies
Warning: /Stage[main]/Role::Visualeditor/Mediawiki::Extension[VisualEditor]/Mediawiki::Extension::Browsertests[VisualEditor]/Browsertests::Bundle[VisualEditor_browsertests_bundle]/Ruby::Bundle[VisualEditor_browsertests_bundle]/File[/vagrant/mediawiki/extensions/VisualEditor/modules/ve-mw/tests/browser/.bundle/config]: Skipping because of failed dependencies
Warning: /Stage[main]/Role::Visualeditor/Mediawiki::Extension[VisualEditor]/Mediawiki::Extension::Browsertests[VisualEditor]/Browsertests::Bundle[VisualEditor_browsertests_bundle]/Ruby::Bundle[VisualEditor_browsertests_bundle]/Exec[bundle_install_VisualEditor_browsertests_bundle]: Skipping because of failed dependencies
Warning: /Stage[main]/Role::Codeeditor/Mediawiki::Extension[CodeEditor]/Git::Clone[mediawiki/extensions/CodeEditor]/Exec[git_clone_mediawiki/extensions/CodeEditor]: Skipping because of failed dependencies
Warning: /Stage[main]/Role::Parserfunctions/Mediawiki::Extension[ParserFunctions]/Git::Clone[mediawiki/extensions/ParserFunctions]/Exec[git_clone_mediawiki/extensions/ParserFunctions]: Skipping because of failed dependencies
Warning: /Stage[main]/Mediawiki/Exec[copy_LocalSettings]: Skipping because of failed dependencies
Warning: /Stage[main]/Role::Cite/Mediawiki::Extension[Cite]/Git::Clone[mediawiki/extensions/Cite]/Exec[git_clone_mediawiki/extensions/Cite]: Skipping because of failed dependencies
Warning: /Stage[main]/Role::Visualeditor/Mediawiki::Extension[VisualEditor]/Git::Clone[mediawiki/extensions/VisualEditor]/Exec[git_clone_mediawiki/extensions/VisualEditor]: Skipping because of failed dependencies
Warning: /Stage[main]/Role::Templatedata/Mediawiki::Extension[TemplateData]/Git::Clone[mediawiki/extensions/TemplateData]/Exec[git_clone_mediawiki/extensions/TemplateData]: Skipping because of failed dependencies
Warning: /Stage[main]/Role::Wikieditor/Mediawiki::Extension[WikiEditor]/Git::Clone[mediawiki/extensions/WikiEditor]/Exec[git_clone_mediawiki/extensions/WikiEditor]: Skipping because of failed dependencies
Warning: /Stage[main]/Browsertests/Mediawiki::User[Selenium_user]/Exec[mediawiki_user_Selenium_user]: Skipping because of failed dependencies
Warning: /Stage[main]/Mediawiki::Parsoid/Mediawiki::Extension[Parsoid]/Git::Clone[mediawiki/extensions/Parsoid]/Exec[git_clone_mediawiki/extensions/Parsoid]: Skipping because of failed dependencies
Warning: /Stage[main]/Role::Geshi/Mediawiki::Extension[SyntaxHighlight_GeSHi]/Git::Clone[mediawiki/extensions/SyntaxHighlight_GeSHi]/Exec[git_clone_mediawiki/extensions/SyntaxHighlight_GeSHi]: Skipping because of failed dependencies
Warning: /Stage[main]/Role::Wikieditor/Mediawiki::Extension[WikiEditor]/Mediawiki::Settings[WikiEditor]/File[/vagrant/settings.d/puppet-managed/10-WikiEditor.php]: Skipping because of failed dependencies
Warning: /Stage[main]/Role::Codeeditor/Mediawiki::Extension[CodeEditor]/Mediawiki::Settings[CodeEditor]/File[/vagrant/settings.d/puppet-managed/10-CodeEditor.php]: Skipping because of failed dependencies
Warning: /Stage[main]/Role::Cite/Mediawiki::Extension[Cite]/Mediawiki::Settings[Cite]/File[/vagrant/settings.d/puppet-managed/10-Cite.php]: Skipping because of failed dependencies
Warning: /Stage[main]/Role::Visualeditor/Mediawiki::Extension[VisualEditor]/Mediawiki::Settings[VisualEditor]/File[/vagrant/settings.d/puppet-managed/10-VisualEditor.php]: Skipping because of failed dependencies
Warning: /Stage[main]/Role::Templatedata/Mediawiki::Extension[TemplateData]/Mediawiki::Settings[TemplateData]/File[/vagrant/settings.d/puppet-managed/10-TemplateData.php]: Skipping because of failed dependencies
Warning: /Stage[main]/Role::Geshi/Mediawiki::Extension[SyntaxHighlight_GeSHi]/Mediawiki::Settings[SyntaxHighlight_GeSHi]/File[/vagrant/settings.d/puppet-managed/10-SyntaxHighlight_GeSHi.php]: Skipping because of failed dependencies
Warning: /Stage[main]/Role::Parserfunctions/Mediawiki::Extension[ParserFunctions]/Mediawiki::Settings[ParserFunctions]/File[/vagrant/settings.d/puppet-managed/10-ParserFunctions.php]: Skipping because of failed dependencies
Warning: /Stage[main]/Mediawiki::Parsoid/Mediawiki::Extension[Parsoid]/Mediawiki::Settings[Parsoid]/File[/vagrant/settings.d/puppet-managed/10-Parsoid.php]: Skipping because of failed dependencies
Warning: /Stage[main]/Role::Scribunto/Mediawiki::Extension[Scribunto]/Git::Clone[mediawiki/extensions/Scribunto]/Exec[git_clone_mediawiki/extensions/Scribunto]: Skipping because of failed dependencies
Warning: /Stage[main]/Role::Scribunto/Mediawiki::Extension[Scribunto]/Mediawiki::Settings[Scribunto]/File[/vagrant/settings.d/puppet-managed/10-Scribunto.php]: Skipping because of failed dependencies
Warning: /Stage[main]/Mediawiki::Jobrunner/Service[jobrunner]: Skipping because of failed dependencies
Warning: /Stage[main]/Apache/Service[apache2]: Skipping because of failed dependencies

Additional info:

I have full disk encryption, but vagrant used to work for me (about 6 months ago?) and it's the same computer although I'm now on 14.04 instead of 13.* , since then- is this a new thing, that it's known not to work on fully encrypted disks but just on Trusty Tahr specifically?

NFS was made the default disk sharing option on 2014-05-23 (https://gerrit.wikimedia.org/r/#/c/134995/). The ability to easily turn this off due to encryption was added on 2014-08-14 (https://gerrit.wikimedia.org/r/#/c/154153/).

I was able to complete vagrant up with NFS shares off, but unfortunately still with errors.

While there is a server running at http://127.0.0.1:8080/ I get File not found: /vagrant/mediawiki/index.php. Alas!

Output of vagrant up:

Stderr from the command:

stdin: is not a tty
Error: composer install --optimize-autoloader returned 1 instead of one of [0]

This composer failure looks to be the root cause of the rest of the failures. Running PUPPET_DEBUG=1 vagrant provision | tee puppet.log or manually running composer install --optimize-autoloader in /vagrant/mediawiki may lead to more information on the reason for this failure.

'access denied' also happens on unencrypted Fedora 21 with vagrant 1.7.1 and virtualbox 4.3.20. Turning off NFS allows it to work.

I wonder if there is a way we can detect the use of ecryptfs and either give a better error message/warning to the user or just automatically disable nfs like we do for Windows.

bd808 triaged this task as Low priority.Dec 30 2014, 2:00 AM

I'm getting a similar NFS 'access denied' on Fedora 23 alpha, no disk or home-dir encryption:

I'm getting the same mount.nfs: access denied by server while mounting error.

I just encountered the same issue on Lubuntu 15.10 (Vagrant 1.8.1, VirtualBox 5.0.16 r105871).

Using vagrant config nfs_shares off solved it for me

'access denied' also happens on unencrypted Fedora 21 with vagrant 1.7.1 and virtualbox 4.3.20. Turning off NFS allows it to work.

When using libvirt on Fedora 25, I managed to get NFS to work by setting the following firewall settings:

Example for easily configuring firewalld using the "firewall-config" GUI:

choose "Configuration: Permanent" from the drop down menu
select the zone you want to modify (i chose "internal").
go to the "Interfaces" tab, assign vboxnet0 (or other host-only adapter) to the zone.
go to the "Services" tab, check "mountd", "nfs" and "rpc-bind"
go to the global "Services" tab (next to "Zones"), select NFS and add Port 2049 UDP (only TCP is predefined).
Finally choose "Options/Reload Firewalld".
NFS mounts now work correctly from within the VM and you can leave firewalld enabled.

from https://github.com/mitchellh/vagrant/issues/2447#issuecomment-27763003

EDIT: Spoke too soon again. If NFS is enabled the initial provisioning hangs on

==> default: Notice: /Stage[main]/Apt/File[/etc/apt/apt.conf.d/01no-recommended]/ensure: defined content as '{md5}53ce69211afabdf3f0123353515e80f4'

EDIT2: When NFS shares were off, I got LXC to work on Fedora 25. (they happened to be off when I set up LXC; I don't know what would happen if it was enabled on initial provisioning) NFS worked after reenabling NFS shares, but I felt LXC was faster without NFS, so I turned it back off.

I have full disk encryption, but vagrant used to work for me (about 6 months ago?) and it's the same computer although I'm now on 14.04 instead of 13.* , since then- is this a new thing, that it's known not to work on fully encrypted disks but just on Trusty Tahr specifically?

I'm using Vagrant and NFS with full disk encryption (not home directory). However, I'm on Debian.

Krinkle subscribed.

Declining for now per inactivity and the task being filed in 2014 with Ubuntu 14, which is a long time ago now.