-
Notifications
You must be signed in to change notification settings - Fork 849
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
Mysql not started on boot #287
Comments
Thanks for the report @cbrunnkvist! We do have a custom init script that should take care of MySQL after I'll do some testing in a bit to duplicate the issue and toss that line in. |
+1, have had the same problem more than a couple of times. Have to SSH in and start MySQL manually |
I just checked out a fresh copy of master and did an initial I also did a Is there a chance that something failed during the initial provisioning? There may be an error we can detect. |
"Works for me" vs. "Doesn't work for me". Strange. Yeah it could be some case where something fails, perhaps due to a timeout or ephemeral DNS error, during initial apt-get & dpkg configure, and that's why it doesn't start automatically. |
I think I'm having the same issue. Yesterday I downloaded Vagrant, VirtualBox and master, and got everything running (btw, love it). Today it seems MySQL isn't running. If I Though I didn't think to start MySQL manually as @toringerottum suggested, but seems to be the same issue. |
Same here. Manually starting MySQL works though. |
I am having this problem all the time. No exceptions. |
I just had the database problem too. Provisioning did it for me. |
@kraftner @cfoellmann @obenland (and anyone else having this trouble)
This sounds so much like it used to be before we got the right init scripts in the for MySQL. The entire thing is hacky though. I'm guessing that some of this goes away once we stop worrying about persistent database data, but it would still be cool to figure out so that nobody has to run |
In my case I never shut the VM down. After restarting my computer at some point and |
|
Hey guys- I stumbled across this page while looking for answers for a similar problem: MySQL was not coming up automatically after In my case, MySQL is configured to listen on a particular IP on the VM. It turned out that MySQL was trying to start before the network came up. I changed my upstart configuration to wait until after the network was configured- see [1]. So, changing the "start on" line in
worked well. I'm not sure if your case is the same, so YMMV. Good luck! [1] http://askubuntu.com/questions/62812/why-isnt-my-upstart-service-starting-on-system-boot |
I've been silently following this issue and trying to track down the problem for a couple of weeks now, since it happens in all of my VMs. I use Windows 7 (64 bits) as host, so this may not be useful for Linux users. I initially went the upstart way, thinking that something might be wrong there, but none of the things I tried worked. Just a few minutes ago, I started one of my VMs from the Virtualbox Administrator, which shows some information that is not visible when you start via Vagrant. This was what showed up for me: Something was failing indeed, so I went to the tl;dr; version: If you're using Windows, make sure your |
This is specifically directed to #287, in which these line endings may be causing issues when starting the MySQL service after a restart of the VM.
Great hunting @andrezrv! I just modified |
I'm having this problem as well. Does MySQL fail to start after halting the VM with vagrant halt and then bringing it back up with vagrant up? Or is this vagrant up from scratch or after vagrant destroy? Every time, or sporadically? What OS / VirtualBox version / Vagrant version? How long does vagrant up take after a vagrant halt? I checked my file endings etc. like andrezvr has posted above but they're already set to Unix and UTF-8. |
@jonathan-dejong: You may want to run manually your On the other hand, since I'm working on Windows, I'm really not sure if another solution is needed for OS X systems. |
I'm experiencing this too.
It fails after every halt/up. It works with vagrant up --provision, though.
Every time.
OS X 10.9.2
~25 seconds. About 10 of those are sitting idle after
With
I think that's an unrelated issue, but I though I'd mention it in case everyone else is seeing it too.
Some notables from various logs:
Expanded logs are at http://pastebin.com/MNNhzyxv. |
This finally happened for me just now. 👍 |
Just saw this, too. |
This shifts the default behavior for VVV to non-persisting databases. If an existing VM is already storing database data on the guest machine, drives will continue to mount. If you remove this data or start fresh with VVV, the MySQL directory will not be stored on your computer. This addresses the pain that is #287 and moves to a model that (to me) makes more sense at all. We'll probably want to think of ways we can avoid data loss by making it easy to backup data on a regular basis as required.
Happens to me, but only in an employee's home, not our main office. weird. Will have the employee bring in the machine tomorrow and determine if local LAN can have an incidence or not, ... but it really shouldn't ... Edit : problems seems to come from employee's home LAN, as it's working fine in our office. |
Happening to me now, I triggered it with an "sudo apt-get update && sudo apt-get upgrade" (provisioning brings it up) |
you can save yourself from a lengthy provisioning by simply SSH-ing into guest and issuing a 'sudo service mysql start'. It'll work (guess we're all in the same issue) |
Same issue here after
|
Making progress today in the VVV database branch on PR #322. By removing our reliance on a persistent database connection, we can avoid these timing issues.
|
Great work Jeremy! |
|
Thx! That is very helpful 👍 |
Jeremy, that was the money solution! |
Ok. As of today, #322 has been merged into master and MySQL data will no longer be mapped locally. This clears up the issue where MySQL is not available after a halt, as we no longer need to be hacky about detecting when the drive is mapped before starting the service. A few things about the latest master:
|
Hi! Great news Jeremy.
EDIT: |
I am still experiencing this. I did a https://www.dropbox.com/s/einh8ha0rs7u7zb/Screenshot%202014-05-16%2011.55.16.png Like the guy above I'm not sure about:
|
@jeremyfelt same question for me as @jonathan-dejong and @aubreypwd regarding deleting everything in |
This is tough. I do want to find a way. Theoretically with a grain of salt in the current form.... :)
Phew... More testing is definitely required. I'd be very careful at the moment with data you don't want to lose. It would be worth using phpMyAdmin to backup everything if you're more familiar with that. |
That is a handful! I'm most likely going to take a backup of each database like you say… Probably backup the entire VVV folder as well. Fortunately I've only got 3-4 projects running in vagrant so far :) Can't say when I'll give this a try but I'll come back with a report afterwards. |
So I've done some testing on this.. Deleted all files from database/data however I found this readme inside database/backups: For this to work properly, databases should be created in your database/init-custom.sql file as explained in database/init-custom.sql.sample. Once these original files have been imported, they will exist in database/data as the actual mysql data directory and will not need to be reimported on the next vagrant up. Is this something I have to do manually first? And if so, do I have to do this for each new site? ==> default: mysql start/running, process 20962 You also write that it's possible to "OR rename the one file we check for in provisioning." To which file are you referring? |
Haha, you caught me being lazy. :) If These databases do need to be defined in |
So a quick update for anyone finding this thread. Could also be noted that I didnt do it in the exact same way since I already had wp-triggers installed. But the basics are the same.. destroy, pull från official repo, up, destroy, delete /data, up again and you're done! Another thing, I had to reboot my computer before running the last vagrant up because of constant timedout issues with SSH. |
@jeremyfelt's input above helped me resolve my situation. |
This is specifically directed to Varying-Vagrant-Vagrants#287, in which these line endings may be causing issues when starting the MySQL service after a restart of the VM.
This shifts the default behavior for VVV to non-persisting databases. If an existing VM is already storing database data on the guest machine, drives will continue to mount. If you remove this data or start fresh with VVV, the MySQL directory will not be stored on your computer. This addresses the pain that is Varying-Vagrant-Vagrants#287 and moves to a model that (to me) makes more sense at all. We'll probably want to think of ways we can avoid data loss by making it easy to backup data on a regular basis as required.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
According to the tutorial, provisioning should take care of everything so you should be good to go after the initial
vagrant up
. However, in the current master mysqld does not come up automatically.I'm currently unaware of whether there are some issues with mysqld+upstart in Precise, but sticking an
update-rc.d mysql defaults
somewhere around provision.sh:328 should fix this.(In case it is a conscious design decision I don't see it documented anywhere;))
The text was updated successfully, but these errors were encountered: