Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hosts file not being written to #167

Open
moosecodes opened this issue Jul 16, 2018 · 0 comments
Open

hosts file not being written to #167

moosecodes opened this issue Jul 16, 2018 · 0 comments
Labels

Comments

@moosecodes
Copy link

moosecodes commented Jul 16, 2018

Installed Vagrant Version: 2.1.1

I cannot get my vagrant machine to halt because it errors out during the shutdown procedure when it gets to removing the hosts from the hosts file. The vagrant machine keeps running because of the interruption. The terminal is saying that my user is not in the sudoers file, however, I never had to access the sudoers file to run vagrant in the first place (for the last few years).

When I run vagrant up, I see the plugin reporting that it is writing to the /etc/hosts file (like it always does). However, I cannot access any of my sites because the hosts file was not actually updated. This problem started occurring recently after I updated vagrant from an older version. Is there any way to fix this? I tried using vagrant plugin repair, however, that does not solve the problem either.

This is what the terminal reads:

==> default: [vagrant-hostsupdater] Checking for host entries
==> default: [vagrant-hostsupdater] Writing the following entries to (/etc/hosts)
==> default: [vagrant-hostsupdater]   192.168.50.4  vvv  # VAGRANT: 993e46400adbd7881ea0c8d2c23b726e (default) / 45a13e6c-8ef4-4b72-ac6e-539f7d63cae6
==> default: [vagrant-hostsupdater]   192.168.50.4  vvv.dev  # VAGRANT: 993e46400adbd7881ea0c8d2c23b726e (default) / 45a13e6c-8ef4-4b72-ac6e-539f7d63cae6
==> default: [vagrant-hostsupdater]   192.168.50.4  vvv.test  # VAGRANT: 993e46400adbd7881ea0c8d2c23b726e (default) / 45a13e6c-8ef4-4b72-ac6e-539f7d63cae6
==> default: [vagrant-hostsupdater]   192.168.50.4  vvv.local  # VAGRANT: 993e46400adbd7881ea0c8d2c23b726e (default) / 45a13e6c-8ef4-4b72-ac6e-539f7d63cae6
==> default: [vagrant-hostsupdater]   192.168.50.4  vvv.localhost  # VAGRANT: 993e46400adbd7881ea0c8d2c23b726e (default) / 45a13e6c-8ef4-4b72-ac6e-539f7d63cae6
==> default: [vagrant-hostsupdater]   192.168.50.4  local.wordpress.test  # VAGRANT: 993e46400adbd7881ea0c8d2c23b726e (default) / 45a13e6c-8ef4-4b72-ac6e-539f7d63cae6
==> default: [vagrant-hostsupdater]   192.168.50.4  local.wordpress.dev  # VAGRANT: 993e46400adbd7881ea0c8d2c23b726e (default) / 45a13e6c-8ef4-4b72-ac6e-539f7d63cae6
==> default: [vagrant-hostsupdater]   192.168.50.4  src.wordpress-develop.test  # VAGRANT: 993e46400adbd7881ea0c8d2c23b726e (default) / 45a13e6c-8ef4-4b72-ac6e-539f7d63cae6
==> default: [vagrant-hostsupdater]   192.168.50.4  build.wordpress-develop.test  # VAGRANT: 993e46400adbd7881ea0c8d2c23b726e (default) / 45a13e6c-8ef4-4b72-ac6e-539f7d63cae6
==> default: [vagrant-hostsupdater]   192.168.50.4  src.wordpress-develop.dev  # VAGRANT: 993e46400adbd7881ea0c8d2c23b726e (default) / 45a13e6c-8ef4-4b72-ac6e-539f7d63cae6
==> default: [vagrant-hostsupdater]   192.168.50.4  build.wordpress-develop.dev  # VAGRANT: 993e46400adbd7881ea0c8d2c23b726e (default) / 45a13e6c-8ef4-4b72-ac6e-539f7d63cae6

This is what my hosts file looks like:

127.0.0.1	localhost
255.255.255.255	broadcasthost
::1             localhost

my current workaround is to copy the output of the hostupdater (above) and modifying the hosts file manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants