-
Notifications
You must be signed in to change notification settings - Fork 848
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
Comments
Have you rebooted your machine since you reinstalled virtualbox? Unless you
get an error message from virtualbox or vagrant you should not have updated
anything other than VVV. Your new issues are likely unconnected to your
original.
If you can look through your log folders provisioner logs and find the log
from when you first started having database issues that would be best but
in the meantime a system restart is most likely to solve your timeout
problem. Messing with virtualbox messes with kernel level things that
require a reboot even if the installers say you don’t.
Upgrading vagrant and virtualbox are highly unlikely to resolve issues
inside a VM that is able to turn on and show browser output.
…On Mon, 21 Nov 2022 at 20:40, shanebp ***@***.***> wrote:
My vvv browser dashboard opened today, but all sites returned a mysql
unable to connect error.
I updated VVV, VirtualBox and Vagrant.
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(41e7850)
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
—
Reply to this email directly, view it on GitHub
<#2642>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAOLZ2FZ46NG4BML6VZSC3WJPM4LANCNFSM6AAAAAASHBIZBU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I rebooted and tried vagrant up and got this error:
|
Did you destroy the .vagrant folder or do anything other than updating
software? When you say you updated VVV how did you do it?
…On Mon, 21 Nov 2022 at 20:54, shanebp ***@***.***> wrote:
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
—
Reply to this email directly, view it on GitHub
<#2642 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAOLZ6ZNUVU55VSPZAUWYDWJPORNANCNFSM6AAAAAASHBIZBU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I updated VVV with a git pull. |
And you’re using the same user to run these actions as before? I don’t know
what you’ve done but vagrant no longer sees that you already have a VM. I
do not have an answer for you.
You may be forced to destroy your VM manually via Virtualbox. You may be
able to save your database by starting it in virtualbox and SSH’ing in
manually to do a DB export
…On Mon, 21 Nov 2022 at 21:00, shanebp ***@***.***> wrote:
I updated VVV with a git pull.
I did not destroy the .vagrant folder.
—
Reply to this email directly, view it on GitHub
<#2642 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAOLZ457JKZLREMK4LRZLTWJPPHHANCNFSM6AAAAAASHBIZBU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Destroyed the VM via their GUI. btw - I think the original db connection issue was simply a corrupted hosts file - it was missing: 127.0.0.1 localhost |
VirtualBox VMs have their own IP address so it shouldn't matter that |
This issue has returned.
I then ran vagrant halt and this was the result:
And if I try to start it again, this is the result:
|
I need the output of the command that resulted in 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? |
Even a 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 |
the other thing this might be, is if you filled your VMs virtual drive with stuff and there is no free space left |
It is a solid state drive - on Windows 10 64 bit. There are no logs for today.
|
And you're sure your machine has enough free space? So the reproduction steps are:
Is that correct? And be very very specific, include all other commands, e.g. only say yes if there was a single 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:
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 I also see that you said that you updated VirtualBox, yet you're running 6.1.40, not 7.x. |
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 |
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 |
Hmm so vagrant up then sleep then broken, did phoMyAdmin fail to login or
did it fail to load entirely?
|
It failed to load entirely. |
With an error or a timeout?
…On Tue, 22 Nov 2022 at 17:30, shanebp ***@***.***> wrote:
It failed to load entirely.
—
Reply to this email directly, view it on GitHub
<#2642 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAOLZYBNYXD67MQWWBQG3LWJT7NDANCNFSM6AAAAAASHBIZBU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
With an error - which I did not copy. But the text was red. |
If you start up a VVV in a separate folder do you think sleeping and
resuming would trigger this again?
…On Tue, 22 Nov 2022 at 17:33, shanebp ***@***.***> wrote:
With an error - which I did not copy. But the text was red.
—
Reply to this email directly, view it on GitHub
<#2642 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAOLZYOEA3OBAUHJUZJYM3WJT7UXANCNFSM6AAAAAASHBIZBU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I have no idea. |
yes, just to test without messing with your main install, not necessarily because of the folder. Some questions:
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 |
I installed VVV in a new dir and everything worked.
|
Updated Virtualbox and |
This issue is back. It worked for weveral days. Ihave not touched anything re command line or config files, etc.
And opening phpmyadmin gives this:
|
Can you SSH into the VM and check the Maria DB service status and try to
start it?
…On Mon, 28 Nov 2022 at 19:57, shanebp ***@***.***> wrote:
This issue is back. It worked for weveral days. Ihave not touched anything
re command line.
The dashboard loads, but opening any site gives this:
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)
—
Reply to this email directly, view it on GitHub
<#2642 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAOLZ63PAPTQ56XD5OUOZ3WKUFAZANCNFSM6AAAAAASHBIZBU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
That might give clues as to what’s happening inside the VM but it doesn’t
say much about the VM otherwise or explain why sleep breaks your VM. It may
be that this problem is unsolvable from the VVV side and requires a fix
deeper down the stack in the VirtualBox side of things
|
Sorry to ask, but how do I do this from the command liine? |
I’m on my phone so I can’t give you exact commands
Something similar to sudo service MariaDB status, it should be super
googleable as it’s an Ubuntu VM
…On Mon, 28 Nov 2022 at 21:05, shanebp ***@***.***> wrote:
Does this help:
c:\Users\sam3d\vvv-new>vagrant ssh
✧ Hello Again! ✧ ✧ ✧
✧ ▄▀▀▀▄▄▄▄▄▄▄▀▀▀▄ ✧ __ __ __ __
✧█▒▒░░░░░░░░░▒▒█ \ V\ V\ V /
▄▄ █░░█░░░░░█░░█ ✧ \_/\_/\_/
█░░█ █░░░▀█▀░░░█ ✧ ✧
█░░█ ▀▄░░░░░░░▄▀ ✧ Have a nice day :)
This system is built by the Bento project by Chef Software
More information can be found at https://github.com/chef/bento
***@***.***:~$ # systemctl status mariadb
***@***.***:~$ systemd status mariadb
Excess arguments.
***@***.***:~$ mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
—
Reply to this email directly, view it on GitHub
<#2642 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAOLZ4KGPBZCWZ3L3ZKRU3WKUM7ZANCNFSM6AAAAAASHBIZBU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Thanks -result
|
It might have another name I don’t remember the specific service name
…On Mon, 28 Nov 2022 at 21:10, shanebp ***@***.***> wrote:
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)
***@***.***:~$ sudo service MariaDB status
Unit MariaDB.service could not be found.``
—
Reply to this email directly, view it on GitHub
<#2642 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAOLZ2VLOU54EMXFM5LSPTWKUNSTANCNFSM6AAAAAASHBIZBU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Got this using mysql instead of mariadb:
|
If you replace status with start what happens
…On Mon, 28 Nov 2022 at 21:13, shanebp ***@***.***> wrote:
Got this using mysql instead of mariadb:
***@***.***:~$ 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```
<https://camo.githubusercontent.com/660371578c4b5db6ea6c86d3f4c67756e82e91a053ef7b29c23f37428860e59d/687474703a2f2f6d6172696164622e636f6d61736b6d6f6e74792d6c6f676f2e706e67>
<http:///kb/static/images/favicons/favicon-16x16.5801f8f0f34e.png>
MariaDB KnowledgeBase
*systemd <https://mariadb.com/kb/en/systemd/>*
How systemd is configured on MariaDB packages and how to alter its
configuration.
—
Reply to this email directly, view it on GitHub
<#2642 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAOLZ776F5QCQVHSVYWJ6LWKUOA5ANCNFSM6AAAAAASHBIZBU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
with 'start':
|
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:
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. |
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. |
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...
The text was updated successfully, but these errors were encountered: