17

I use vagrnat with virtualbox vm and nfs synced folders to run django app and after update to 16.10 vagrant up fails on provision step with error:

Executed: /bin/bash -l -c "cd /home/vagrant/proj >/dev/null && /home/vagrant/venv/bin/python manage.py collectstatic --noinput"

Copying '/home/vagrant/venv/lib/python3.5/site-packages/django/contrib/admin/static/admin/img/LICENSE'

...
OSError: [Errno 37] No locks available

I tried to reinstall nfs-kernel-server, nfs-common, liblockfile1, libnfsidmap2 but with no luck. Any ideas?

mr. Noobey
  • 183
  • 1
  • 1
  • 8

1 Answers1

42

Someone in systemd land decided that starting nfs shouldn't start the statd service which nfs uses to provide locks. So, your fix should be simple, on the host machine:

sudo systemctl enable rpc-statd  # Enable statd on boot
sudo systemctl start rpc-statd  # Start statd for the current session

You don't even need to reboot, just launch vagrant after doing that.

Thanks systemd!

Offlein
  • 147
  • 6
aychedee
  • 8,137
  • 4
  • 21
  • 13
  • 1
    You don't even need to reload vagrant after that. Just run the rpc-statd start command, and the lock service would be available even for the already launched vagrant machines. – zed Nov 08 '16 at 11:16
  • Cool, thanks bro! It work for me , vagrant enviroment and django app :D ubuntu 16.04 Elementary Os – xtornasol512 Dec 02 '16 at 20:03
  • Wow man. Thanks. This was killing me for a while, since in my particular case it wasn't always giving me obvious errors. Had to strace an sqlite file to get here. – vpassapera Apr 29 '17 at 04:56