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

Bug: Windows: vagrant stopped working #2642

Closed
shanebp opened this issue Nov 21, 2022 · 36 comments
Closed

Bug: Windows: vagrant stopped working #2642

shanebp opened this issue Nov 21, 2022 · 36 comments

Comments

@shanebp
Copy link

shanebp commented Nov 21, 2022

My vvv browser dashboard opened today, but all sites returned a mysql unable to connect error.
I updated VVV, VirtualBox and Vagrant.
I did not change my config.yml
Now I cannot start Vagrant, any tips appreciated...


c:\Users\sam3d\vvv-local>vagrant up
__ __ __ __
\ V\ V\ V / v3.10.0 Ruby:2.7.6, Path:"c:/Users/sam3d/vvv-local"
 \_/\_/\_/  git::develop(41e7850c)

Platform: mingw32 windows  HasWinAdminPriv  vagrant-goodhosts monochrome-terminal shared_db_folder_disabled
Vagrant: v2.3.3, virtualbox: v6.1.40

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.56.4 vvv.test
==> default: [vagrant-goodhosts] - found entry for: 192.168.56.4 one.wordpress.test
==> default: [vagrant-goodhosts] - found entry for: 192.168.56.4 buddyboss.test
==> default: [vagrant-goodhosts] - found entry for: 192.168.56.4 buddypress.test
==> default: [vagrant-goodhosts] - found entry for: 192.168.56.4 atrium.test
==> default: [vagrant-goodhosts] Checking for host entries
==> default: [vagrant-goodhosts] Finished processing
==> 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: Trigger run failed
==> default: An error occurred in the underlying SSH library that Vagrant uses.
==> default: The error message is shown below. In many cases, errors from this
==> default: library are caused by ssh-agent issues. Try disabling your SSH
==> default: agent or removing some keys and try again.
==> default:
==> default: If the problem persists, please report a bug to the net-ssh project.
==> default:
==> default: Net::SSH::ConnectionTimeout
@tomjn
Copy link
Member

tomjn commented Nov 21, 2022 via email

@shanebp
Copy link
Author

shanebp commented Nov 21, 2022

I rebooted and tried vagrant up and got this error:


Bringing machine 'default' up with 'virtualbox' provider...
==> default: Setting the name of the VM: vvv-local_f22e18711e2
The name of your virtual machine couldn't be set because VirtualBox
is reporting another VM with that name already exists. Most of the
time, this is because of an error with VirtualBox not cleaning up
properly. To fix this, verify that no VMs with that name do exist
(by opening the VirtualBox GUI). If they don't, then look at the
folder in the error message from VirtualBox below and remove it
if there isn't any information you need in there.

VirtualBox error:

VBoxManage.exe: error: Could not rename the directory 'C:\Users\sam3d\VirtualBox VMs\ubuntu-20.04-amd64_1669060828560_37737' to 'C:\Users\sam3d\VirtualBox VMs\vvv-local_f22e18711e2' to save the settings file (VERR_ALREADY_EXISTS)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component SessionMachine, interface IMachine, callee IUnknown
VBoxManage.exe: error: Context: "SaveSettings()" at line 3286 of file VBoxManageModifyVM.cpp

@tomjn
Copy link
Member

tomjn commented Nov 21, 2022 via email

@shanebp
Copy link
Author

shanebp commented Nov 21, 2022

I updated VVV with a git pull.
I did not destroy the .vagrant folder.

@tomjn
Copy link
Member

tomjn commented Nov 21, 2022 via email

@shanebp
Copy link
Author

shanebp commented Nov 21, 2022

Destroyed the VM via their GUI.
Ran vagrant up again - now working.
Lost the old databases but that's ok - this time.
Thanks for your help. Next time I'll ask sooner rather than going ignorant overboard.

btw - I think the original db connection issue was simply a corrupted hosts file - it was missing: 127.0.0.1 localhost

@shanebp shanebp closed this as completed Nov 21, 2022
@tomjn
Copy link
Member

tomjn commented Nov 22, 2022

VirtualBox VMs have their own IP address so it shouldn't matter that localhost was missing, but it wouldn't surprise me if that caused issues elsewhere

@shanebp shanebp reopened this Nov 22, 2022
@shanebp
Copy link
Author

shanebp commented Nov 22, 2022

This issue has returned.
I can open the VVV Dashboard.
But opening any site gives this browser message:

Connection refused

Error reconnecting to the database
This means that the contact with the database server at localhost was lost. This could mean 
your host’s database server is down.

Are you sure the database server is running?
Are you sure the database server is not under particularly heavy load?
If you are unsure what these terms mean you should probably contact your host. If you still need help 
you can always visit the WordPress Support Forums.

 This message was triggered by WordPress Core.

Call stack:

wp_die()
wp-includes/class-wpdb.php:3673
add_option()
wp-includes/option.php:972
set_transient('doing_cron')
wp-includes/cron.php:884
spawn_cron()
wp-includes/cron.php:994
_wp_cron()
wp-includes/class-wp-hook.php:308
do_action('wp_loaded')
wp-settings.php:639

I then ran vagrant halt and this was the result:

c:\Users\sam3d\vvv-local>vagrant halt
==> default: Running action triggers before halt ...
==> default: Running trigger: VVV Pre-Halt...
==> default: Trigger run failed
==> default: ☺scp: /tmp/vagrant-shell: Read-only file system
==> default:
==> default: Attempting graceful shutdown of VM...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

echo; printf $SSH_AUTH_SOCK

Stdout from the command:

Stderr from the command:

printf: usage: printf [-v var] format [arguments]

And if I try to start it again, this is the result:

c:\Users\sam3d\vvv-local>vagrant up
__ __ __ __
\ V\ V\ V / v3.10.0 Ruby:2.7.6, Path:"c:/Users/sam3d/vvv-local"
 \_/\_/\_/  git::develop(41e7850c)

Platform: mingw32 windows  HasWinAdminPriv  vagrant-goodhosts monochrome-terminal shared_db_folder_disabled
Vagrant: v2.3.3, virtualbox: v6.1.40

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

Bringing machine 'default' up with 'virtualbox' provider...
==> 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
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.

If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.

If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.

If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.

@tomjn
Copy link
Member

tomjn commented Nov 22, 2022

I need the output of the command that resulted in Connection refused errors happening in the browser. The more things you do after this error occurs the more the error is compounded and the less useful the output is.

E.g. at some point you re-provisioned, it had issues, and those issues were not noticed until you went to the browser. I need those provisioner logs.

btw is this on a spinning mechanical hard drive or a solid state flash drive?

@tomjn
Copy link
Member

tomjn commented Nov 22, 2022

Even a vagrant up --provision from the current broken state would be more helpful, but everything that came after when the error started is significantly less useful.

Note all this information is logged to the log folder, arranged by time, date, and each provisioner is a separate log file. To my understanding there are no new commands you can run that will reveal what happened. If you don't have the output then unfortunately you may have missed your opportunity to debug the problem

@tomjn
Copy link
Member

tomjn commented Nov 22, 2022

the other thing this might be, is if you filled your VMs virtual drive with stuff and there is no free space left

@shanebp
Copy link
Author

shanebp commented Nov 22, 2022

It is a solid state drive - on Windows 10 64 bit.
I did not add anything other than basic WP sites to the VM via config yml.
I have all the logs from yesterday when things started working again.
2022.11.21_21-08-12.zip

There are no logs for today.
I just ran vagrant up --provision - the result:

c:\Users\sam3d\vvv-local>vagrant up --provision
__ __ __ __
\ V\ V\ V / v3.10.0 Ruby:2.7.6, Path:"c:/Users/sam3d/vvv-local"
 \_/\_/\_/  git::develop(41e7850c)

Platform: mingw32 windows  HasWinAdminPriv  vagrant-goodhosts monochrome-terminal shared_db_folder_disabled
Vagrant: v2.3.3, virtualbox: v6.1.40

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.56.4 vvv.test
==> default: [vagrant-goodhosts] - found entry for: 192.168.56.4 one.wordpress.test
==> default: [vagrant-goodhosts] - found entry for: 192.168.56.4 buddyboss.test
==> default: [vagrant-goodhosts] - found entry for: 192.168.56.4 buddypress.test
==> default: [vagrant-goodhosts] - found entry for: 192.168.56.4 atrium.test
==> default: [vagrant-goodhosts] Checking for host entries
==> default: [vagrant-goodhosts] Finished processing
==> default: Running provisioner: file...
Guest-specific operations were attempted on a machine that is not
ready for guest communication. This should not happen and a bug
should be reported.

@tomjn
Copy link
Member

tomjn commented Nov 22, 2022

And you're sure your machine has enough free space?

So the reproduction steps are:

  1. Install VVV
  2. vagrant up
  3. It works!
  4. vagrant halt
  5. vagrant up ( no --provision )
  6. dashboard works but could not connect to database
  7. all vagrant commands timeout

Is that correct? And be very very specific, include all other commands, e.g. only say yes if there was a single vagrant up, if there were 2 or you turned it on and off several times then that's different. Likewise if you never halted the machine.

I need to know what happened between DB works and DB does not work, even the mundane steps. E.g. is it working then you close the lid on your machine and when you reopen it things are broken, etc. Avoid paraphrasing too.

e.g. when you say this:

I did not add anything other than basic WP sites to the VM via config yml.

Is that the point at which it stops working? You never mentioned reprovisioning to add sites before, or any details of those sites

Focus less on it not working/the end result, and more on the specific changing point when it deviated from working ok. This also means that for now the inability to run vagrant up or vagrant halt is irrelevant, because those happen after the DB connection issues you reported, so focus on what broke first, at the very first time it was broken, and the things that happened immediately before then.

I also see that you said that you updated VirtualBox, yet you're running 6.1.40, not 7.x.

@tomjn
Copy link
Member

tomjn commented Nov 22, 2022

Also if you end up in the unable to connect to the database situation again, do not try to halt or destroy the VM, instead SSH in and check if the mariadb service is running, and if not, try to start it and report back the output.

Likewise try to connect as the root database user via phpmyadmin. Also note what you'd done in the hour before you first noticed it, and be pendantic about what you list, e.g. as I mentioned before powering down your device or it going to sleep, using other local dev environments, updates, etc

@shanebp
Copy link
Author

shanebp commented Nov 22, 2022

I only using 66 GBs of my 377 GB c drive.

Everything was working properly yesterday - after provisioning the sites.

This morning I woke my computer, and went to the VVV dashboard and tried to open a site and got the DB connection error. So the only thing between yesterday and this morning was sleep mode.

After seeing the db connection error, I tried and failed to open phpmyadmin via the vvv dashboard.

Re virtualbox - I downloaded the newest windows version which was 6.1.40

@tomjn
Copy link
Member

tomjn commented Nov 22, 2022 via email

@shanebp
Copy link
Author

shanebp commented Nov 22, 2022

It failed to load entirely.

@tomjn
Copy link
Member

tomjn commented Nov 22, 2022 via email

@shanebp
Copy link
Author

shanebp commented Nov 22, 2022

With an error - which I did not copy. But the text was red.

@tomjn
Copy link
Member

tomjn commented Nov 22, 2022 via email

@shanebp
Copy link
Author

shanebp commented Nov 22, 2022

I have no idea.
Are you saying install VVV in a folder other than vvv-local ?

@tomjn
Copy link
Member

tomjn commented Nov 22, 2022

yes, just to test without messing with your main install, not necessarily because of the folder.

Some questions:

  • what's the output of vagrant plugin list --local?
    • is the vbguest updater plugin installed
  • what's the output of vagrant box list?
  • I assume you tried halting the VM from inside VirtualBox then running vagrant up and that too timed out?

After checking these, I'd also suggest updating to VirtualBox 7 and doing a system restart, the current latest is 7.0.4:

https://download.virtualbox.org/virtualbox/7.0.4/VirtualBox-7.0.4-154605-Win.exe

@shanebp
Copy link
Author

shanebp commented Nov 22, 2022

I installed VVV in a new dir and everything worked.
I shut it down and restarted my computer - and everything worked in the new dir.

c:\Users\sam3d\vvv-new>vagrant plugin list --local
vagrant-goodhosts (1.1.4, local)

c:\Users\sam3d\vvv-new>vagrant box list
bento/ubuntu-20.04 (virtualbox, 202206.03.0)

@shanebp
Copy link
Author

shanebp commented Nov 22, 2022

Updated Virtualbox and vagrant up worked on the new VVV dir.
Everything is working... fingers crossed. thanks again for your help.

@shanebp
Copy link
Author

shanebp commented Nov 28, 2022

This issue is back. It worked for weveral days. Ihave not touched anything re command line or config files, etc.
The dashboard loads, but opening any site gives this:

Warning: mysqli_real_connect(): (HY000/2002): Connection refused
 in /srv/www/wordpress-one/public_html/wp-includes/class-wpdb.php 
on line 1775
Connection refused
Error establishing a database connection
 This message was triggered by WordPress Core.

Call stack:

wp_die()


wp-includes/functions.php:5318
dead_db()
wp-includes/class-wpdb.php:2009
add_option()
wp-includes/option.php:972
set_transient('doing_cron')
wp-includes/cron.php:884
spawn_cron()
wp-includes/cron.php:994
_wp_cron()
wp-includes/class-wp-hook.php:308
do_action('wp_loaded')
wp-settings.php:639

And opening phpmyadmin gives this:

phpMyAdmin - Error
Error during session start; please check your PHP and/or webserver log file 
and configure your PHP installation properly. Also ensure that 
cookies are enabled in your browser.
session_start(): open(SESSION_FILE, O_RDWR) failed: Read-only file system (30)
session_start(): Failed to read session data: files (path: /var/lib/php/sessions)

@tomjn
Copy link
Member

tomjn commented Nov 28, 2022 via email

@tomjn
Copy link
Member

tomjn commented Nov 28, 2022 via email

@shanebp
Copy link
Author

shanebp commented Nov 28, 2022

Can you SSH into the VM and check the Maria DB service status

Sorry to ask, but how do I do this from the command liine?

@tomjn
Copy link
Member

tomjn commented Nov 28, 2022 via email

@shanebp
Copy link
Author

shanebp commented Nov 28, 2022

Thanks -result Unit MariaDB.service could not be found.

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
vagrant@vvv:~$ sudo service MariaDB status
Unit MariaDB.service could not be found.``

@tomjn
Copy link
Member

tomjn commented Nov 28, 2022 via email

@shanebp
Copy link
Author

shanebp commented Nov 28, 2022

Got this using mysql instead of mariadb:


``vagrant@vvv:~$ sudo service mysql status
● mariadb.service - MariaDB 10.5.18 database server
     Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/mariadb.service.d
             └─migrated-from-my.cnf-settings.conf
     Active: failed (Result: exit-code) since Mon 2022-11-28 19:44:58 UTC; 1h 27min ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
    Process: 20980 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
    Process: 20984 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
    Process: 20995 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`cd /usr/bin/..; /usr/bin/gal>
    Process: 21063 ExecStart=/usr/sbin/mariadbd $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, statu>
   Main PID: 21063 (code=exited, status=1/FAILURE)
     Status: "MariaDB server is down"

Nov 28 19:44:58 vvv mariadbd[21063]: 2022-11-28 19:44:58 0 [ERROR] Plugin 'Aria' init function returned error.
Nov 28 19:44:58 vvv mariadbd[21063]: 2022-11-28 19:44:58 0 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
Nov 28 19:44:58 vvv mariadbd[21063]: 2022-11-28 19:44:58 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be wr>
Nov 28 19:44:58 vvv mariadbd[21063]: 2022-11-28 19:44:58 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be wr>
Nov 28 19:44:58 vvv mariadbd[21063]: 2022-11-28 19:44:58 0 [ERROR] Plugin 'InnoDB' init function returned error.
Nov 28 19:44:58 vvv mariadbd[21063]: 2022-11-28 19:44:58 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
Nov 28 19:44:58 vvv mariadbd[21063]: 2022-11-28 19:44:58 0 [Note] Plugin 'FEEDBACK' is disabled.
Nov 28 19:44:58 vvv mariadbd[21063]: 2022-11-28 19:44:58 0 [ERROR] Could not open mysql.plugin table: "Unknown storage engi>
Nov 28 19:44:58 vvv mariadbd[21063]: 2022-11-28 19:44:58 0 [ERROR] Failed to initialize plugins.
Nov 28 19:44:58 vvv mariadbd[21063]: 2022-11-28 19:44:58 0 [ERROR] Aborting```

@tomjn
Copy link
Member

tomjn commented Nov 28, 2022 via email

@shanebp
Copy link
Author

shanebp commented Nov 28, 2022

with 'start':

vagrant@vvv:~$ sudo service mysql start
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.
vagrant@vvv:~$ journalctl -xe
Nov 28 21:33:10 vvv mariadbd[21992]: 2022-11-28 21:33:10 0 [Warning] Can't create test file /var/lib/mysql/vvv.lower-te>
Nov 28 21:33:10 vvv mariadbd[21992]: /usr/sbin/mariadbd: Can't create file '/var/log/mysql/error.log' (errno: 30 "Read->
Nov 28 21:33:10 vvv mariadbd[21992]: 2022-11-28 21:33:10 0 [ERROR] mariadbd: File '/var/lib/mysql/aria_log_control' not>
Nov 28 21:33:10 vvv mariadbd[21992]: 2022-11-28 21:33:10 0 [ERROR] mariadbd: Got error 'Can't open file' when trying to>
Nov 28 21:33:10 vvv mariadbd[21992]: 2022-11-28 21:33:10 0 [ERROR] Plugin 'Aria' init function returned error.
Nov 28 21:33:10 vvv mariadbd[21992]: 2022-11-28 21:33:10 0 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE faile>
Nov 28 21:33:10 vvv mariadbd[21992]: 2022-11-28 21:33:10 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must b>
Nov 28 21:33:10 vvv mariadbd[21992]: 2022-11-28 21:33:10 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must b>
Nov 28 21:33:10 vvv mariadbd[21992]: 2022-11-28 21:33:10 0 [ERROR] Plugin 'InnoDB' init function returned error.
Nov 28 21:33:10 vvv mariadbd[21992]: 2022-11-28 21:33:10 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE fai>
Nov 28 21:33:10 vvv mariadbd[21992]: 2022-11-28 21:33:10 0 [Note] Plugin 'FEEDBACK' is disabled.
Nov 28 21:33:10 vvv mariadbd[21992]: 2022-11-28 21:33:10 0 [ERROR] Could not open mysql.plugin table: "Unknown storage >
Nov 28 21:33:10 vvv mariadbd[21992]: 2022-11-28 21:33:10 0 [ERROR] Failed to initialize plugins.
Nov 28 21:33:10 vvv mariadbd[21992]: 2022-11-28 21:33:10 0 [ERROR] Aborting
Nov 28 21:36:20 vvv mariadbd[22475]: 2022-11-28 21:36:20 0 [Note] /usr/sbin/mariadbd (mysqld 10.5.18-MariaDB-1:10.5.18+>
Nov 28 21:36:20 vvv mariadbd[22475]: 2022-11-28 21:36:20 0 [Warning] Can't create test file /var/lib/mysql/vvv.lower-te>
Nov 28 21:36:20 vvv mariadbd[22475]: /usr/sbin/mariadbd: Can't create file '/var/log/mysql/error.log' (errno: 30 "Read->
Nov 28 21:36:20 vvv mariadbd[22475]: 2022-11-28 21:36:20 0 [ERROR] mariadbd: File '/var/lib/mysql/aria_log_control' not>
Nov 28 21:36:20 vvv mariadbd[22475]: 2022-11-28 21:36:20 0 [ERROR] mariadbd: Got error 'Can't open file' when trying to>
Nov 28 21:36:20 vvv mariadbd[22475]: 2022-11-28 21:36:20 0 [ERROR] Plugin 'Aria' init function returned error.
Nov 28 21:36:20 vvv mariadbd[22475]: 2022-11-28 21:36:20 0 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE faile>
Nov 28 21:36:20 vvv mariadbd[22475]: 2022-11-28 21:36:20 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must b>
Nov 28 21:36:20 vvv mariadbd[22475]: 2022-11-28 21:36:20 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must b>
Nov 28 21:36:20 vvv mariadbd[22475]: 2022-11-28 21:36:20 0 [ERROR] Plugin 'InnoDB' init function returned error.
Nov 28 21:36:20 vvv mariadbd[22475]: 2022-11-28 21:36:20 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE fai>
Nov 28 21:36:20 vvv mariadbd[22475]: 2022-11-28 21:36:20 0 [Note] Plugin 'FEEDBACK' is disabled.
Nov 28 21:36:20 vvv mariadbd[22475]: 2022-11-28 21:36:20 0 [ERROR] Could not open mysql.plugin table: "Unknown storage >
Nov 28 21:36:20 vvv mariadbd[22475]: 2022-11-28 21:36:20 0 [ERROR] Failed to initialize plugins.
Nov 28 21:36:20 vvv mariadbd[22475]: 2022-11-28 21:36:20 0 [ERROR] Aborting

@tomjn
Copy link
Member

tomjn commented Dec 28, 2022

There's not a lot that can be done with what we have here, the main suggestion I have right now is to switch to a provider that isn't VirtualBox, such as Hyper-V.

At the moment there is no change to VVV I can make that will magically fix this for you, and it's unlikely Vagrant itself could be changed to fix this. The problem is in the VirtualBox layer or deeper. It could even be specific to your hardware and the set of drivers installed on your machine.

I don't know why VirtualBox is doing this, possibly there is something else on your system that prevents it running or interferes with it but I couldn't possibly guess what it is or why. You could try exploring using NFS based filesystem shares, but that would mean forking VVV and you'd be on your own.

Things to note:

  • if you had the vbguest updater plugin then this might have been useful to know as it would imply that updating guest additions breaks the filesystem. Unfortunately you checked for this and didn't have it or any other plugins than goodhosts
  • older virtualbox versions may have contributed to this, but you upgraded and the issue returned

The perplexing thing is that it fails to run no matter what once the issue happens according to your report, and when it does happen the filesystem is still accessible in a way that lets PHP run and execute, but anything more complex such as a database engine fails.

One thing I haven't seen from you, is if starting the VM from the VirtualBox interface succeeds in starting the VM. This won't give you sites, but it would mean you could log in to a shell environment via the VirtualBox UI, maybe see if there are error messages on boot. Note that if you do this, do not expect the VVV dashboard or any vagrant commands to work or suddenly become functional.

The very last thing to look into, is VirtualBox Hardening troubleshooting:

https://forums.virtualbox.org/viewtopic.php?f=25&t=82106

It may well be that Antivirus or poorly written software is trying to inject code and the interaction is going badly. If this is the case for you, let me know ASAP. One other person had a similar issue to you in Slack and found that updating to VirtualBox 7 fixed it for them and they were never seen from again.

@shanebp
Copy link
Author

shanebp commented Dec 28, 2022

If my laptop goes to sleep, the VM powers down. So now when I wake up the laptop, I use the VirtualBox UI to start the the VM in headless state and then do 'vagrant up' - works every time without issues.

@shanebp shanebp closed this as completed Dec 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants