Varying-Vagrant-Vagrants / VVV

An open source Vagrant configuration for developing with WordPress
https://varyingvagrantvagrants.org
MIT License
4.54k stars 847 forks source link

Can't connect to VM: Host timed out #2544

Closed conradolandia closed 3 years ago

conradolandia commented 3 years ago

Expected Behavior

It should connect to http://vvv.test/ and show the dashboard

Current Behavior

The browser times out. VM is running, all seems to work. Yesterday it worked fine. Only think that happened was a kernel update. Host was rebooted. Still doesn't work. The browser gives ERR_NAME_NOT_RESOLVED

Your Environment

==> default: Running trigger: VVV Post-Up...
    default: Running: inline script
    default:  * Restarting Nginx
    default:  * Restarting MariaDB
    default:  * Syncing clocks
    default: 21 Oct 17:24:47 ntpdate[3037]: adjust time server 91.189.91.157 offset 0.003494 sec
    default: 
    default:   ✧ ▄▀▀▀▄▄▄▄▄▄▄▀▀▀▄ ✧  Thanks for  __ __ __ __
    default:    ✧█▒▒░░░░░░░░░▒▒█    using       \ V\ V\ V /
    default:  ✧   █░░█░░░░░█░░█ ✧                \_/\_/\_/
    default:   ▄▄  █░░░▀█▀░░░█  ▄▄✧ 
    default:  █░░█ ▀▄░░░░░░░▄▀ █░░█ Vagrant Up has finished! Visit http://vvv.test
    default: ──────────────────────────────────────────────────────────────────────

Logs

 ~/vvv-local   stable ±  vagrant up
__ __ __ __
\ V\ V\ V / v3.7.2 Path:"/home/vantta/vvv-local"
 \_/\_/\_/  git::stable(92758fd)

Platform: linux shell:/bin/zsh systemd  vagrant-goodhosts CaseSensitiveFS shared_db_folder_disabled
Vagrant: v2.2.18, virtualbox: v6.1.28

Docs:       https://varyingvagrantvagrants.org/
Contribute: https://github.com/varying-vagrant-vagrants/vvv
Dashboard:  http://vvv.test

Bringing machine 'default' up with 'virtualbox' provider...
==> default: [vagrant-goodhosts] - found entry for: 192.168.50.4 vvv.test
==> default: [vagrant-goodhosts] - found entry for: 192.168.50.4 paz.test
==> default: [vagrant-goodhosts] Checking for host entries
==> default: Clearing any previously set forwarded ports...
==> 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: 22 (guest) => 2222 (host) (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: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Setting hostname...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
    default: /srv/www => /home/vantta/vvv-local/www
    default: /srv/config => /home/vantta/vvv-local/config
    default: /var/log/php => /home/vantta/vvv-local/log/php
    default: /srv/database => /home/vantta/vvv-local/database/sql
    default: /srv/provision => /home/vantta/vvv-local/provision
    default: /var/log/nginx => /home/vantta/vvv-local/log/nginx
    default: /srv/certificates => /home/vantta/vvv-local/certificates
    default: /var/log/memcached => /home/vantta/vvv-local/log/memcached
    default: /var/log/provisioners => /home/vantta/vvv-local/log/provisioners
==> default: Detected mount owner ID within mount options. (uid: 0 guestpath: /var/log/memcached)
==> default: Detected mount group ID within mount options. (gid: 110 guestpath: /var/log/memcached)
==> default: Detected mount owner ID within mount options. (uid: 0 guestpath: /var/log/nginx)
==> default: Detected mount group ID within mount options. (gid: 110 guestpath: /var/log/nginx)
==> default: Detected mount owner ID within mount options. (uid: 0 guestpath: /var/log/php)
==> default: Detected mount group ID within mount options. (gid: 110 guestpath: /var/log/php)
==> default: Detected mount owner ID within mount options. (uid: 0 guestpath: /var/log/provisioners)
==> default: Detected mount group ID within mount options. (gid: 110 guestpath: /var/log/provisioners)
==> default: Detected mount owner ID within mount options. (uid: 1000 guestpath: /srv/www)
==> default: Detected mount group ID within mount options. (gid: 33 guestpath: /srv/www)
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.
==> default: Running action triggers after up ...
==> default: Running trigger: VVV Post-Up...
    default: Running: inline script
    default:  * Restarting Nginx
    default:  * Restarting MariaDB
    default:  * Syncing clocks
    default: 21 Oct 17:24:47 ntpdate[3037]: adjust time server 91.189.91.157 offset 0.003494 sec
    default: 
    default:   ✧ ▄▀▀▀▄▄▄▄▄▄▄▀▀▀▄ ✧  Thanks for  __ __ __ __
    default:    ✧█▒▒░░░░░░░░░▒▒█    using       \ V\ V\ V /
    default:  ✧   █░░█░░░░░█░░█ ✧                \_/\_/\_/
    default:   ▄▄  █░░░▀█▀░░░█  ▄▄✧ 
    default:  █░░█ ▀▄░░░░░░░▄▀ █░░█ Vagrant Up has finished! Visit http://vvv.test
    default: ──────────────────────────────────────────────────────────────────────
tomjn commented 3 years ago

can you confirm the host entries for those domains are present in your hosts file?

conradolandia commented 3 years ago

I confirm the host entries are present.

tomjn commented 3 years ago

do they match what the command output says? The error you're seeing in the browser should not be possible if the hosts file has correct entries. Not being able to resolve the domain to an IP should be impossible if the hosts file contains that mapping

tomjn commented 3 years ago

Also does visiting the IP directly do anything? Did you try the develop branch?

conradolandia commented 3 years ago

I know. It's weird. I tried:

currently deleting and reinstalling everything related to virtualbox and vagrant. We'll see.

conradolandia commented 3 years ago

After deleting and reinstalling VirtualBox and Vagrant, a new error appears, and the machine won't start:

vagrant up --provision

__ __ __ __
\ V\ V\ V / v3.7.2 Path:"/home/vantta/vvv-local"
 \_/\_/\_/  git::stable(92758fd)

Platform: linux shell:/bin/zsh systemd  vagrant-goodhosts CaseSensitiveFS shared_db_folder_disabled
Vagrant: v2.2.18, virtualbox: v6.1.28

Docs:       https://varyingvagrantvagrants.org/
Contribute: https://github.com/varying-vagrant-vagrants/vvv
Dashboard:  http://vvv.test

Bringing machine 'default' up with 'virtualbox' provider...
==> default: [vagrant-goodhosts] - found entry for: 192.168.50.4 vvv.test
==> default: [vagrant-goodhosts] - found entry for: 192.168.50.4 paz.test
==> default: [vagrant-goodhosts] Checking for host entries
==> default: Clearing any previously set network interfaces...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["hostonlyif", "ipconfig", "vboxnet1", "--ip", "192.168.50.1", "--netmask", "255.255.255.0"]

Stderr: VBoxManage: error: Code E_ACCESSDENIED (0x80070005) - Access denied (extended info not available)
VBoxManage: error: Context: "EnableStaticIPConfig(Bstr(pszIp).raw(), Bstr(pszNetmask).raw())" at line 242 of file VBoxManageHostonly.cpp

These are the installed versions:

VBoxManage --version 
6.1.28r147628

vagrant --version
Vagrant 2.2.18
conradolandia commented 3 years ago

So... after fiddling around for a while, I changed the value of private_network_ip in config.yml and everything works now. No idea why the old IP won't work anymore.

tomjn commented 3 years ago

@conradolandia did you have an IP specified in config.yml? You shouldn't add it at all unless you absolutely have to

conradolandia commented 3 years ago

No I didn't; Adding one solved the issue.