Vagrant DNS Restart Operation Not Permitted

One day, my MacBook Pro crashed during sleep, but after rebooting, my Vagrant VM did not come up, giving this error:

/Users/me/.vagrant.d/gems/2.4.6/gems/daemons-1.3.1/lib/daemons/application.rb:383:in `kill': Operation not permitted (Errno::EPERM)

TL;TR: remove PID file

The gist of the issue was that vagrant-dns plugin had left a stale PID file which had to be removed:

rm $HOME/.vagrant.d/tmp/dns/daemon/

For longer description of the hunt, do read on.

Use the source, Luke!

After trying to reinstall all plugins, upgrade Vagrant and VirtualBox, finally I remembered the basics: run vagrant up --debug to get better insight.

Screenshot of the error with

Seeing from the error message that VagrantDNS::Middlewares::Restart seems to be problematic, I quickly turned to GitHub for VagrantDNS source

This pointed me to the right direction, to check, find and remove the stale PID file:

rm $HOME/.vagrant.d/tmp/dns/daemon/

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s