-
-
Notifications
You must be signed in to change notification settings - Fork 144
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 failing to start #191
Comments
Hi, have the same issue with starting mysql service. My case is:
After many time, after server was restarted mysql not starting. In error logs of mysql I see next errors:
|
Ok, so I've experienced this issue also of late. After a certain number of events (whether spread over multiple days, or not), mariaDB would fail to connect to the DB on restart (regardless of why I restarted the container), forcing me to purge my container, restore from backup and start again. In my case data retention was important (e.g. filter to purge events older than a certain number of days) because one would want to rely on being able to access any and all relevant events (and footage) when required. After much searching I had found that the issue does lie with the mariadb itself and not any of the other software stack configured in this docker. A possible option forward to fix the issue would be to either: Instead, a workaround I have configured and tested (5 days so far, appears to be OK) was to throw a daily cron job to run: I configured this to run on my host to keep as much hands off altering the container as possible (other than my /mnt data). Might be worth a try, I haven't actually run this command on a corrupt DB (because it wont run because mariadb fails to connect to the db in the first instance). Your mileage may vary. Cheers, and many thanks for keeping this docker going @dlandon, feel free to reach out if you need a contrib to assist. |
i had a similar issue just now. Restoring the db from backup after manually running the Here's what i did to be able to grab a dump and restore. Im using docker-compose so added an entrypoint to my docker-compose.yml to sleep for a enough time to allow me to get a shell and do the work. my docker-compose.yml looks like this:
then in one terminal i get a shell ( |
@sam-mancarella Do you have a reference handy? |
[user@localhost docker]$ docker exec -it zoneminder /bin/bash
root@aa16a0f9da47:/# service mysql start
root@aa16a0f9da47:/# mysql
ERROR 2013 (HY000): Lost connection to MySQL server at 'handshake: reading initial communication packet', system error: 104
root@aa16a0f9da47:/# service zoneminder start
Starting ZoneMinder:
DBD::mysql::st execute failed: Lost connection to MySQL server during query at /usr/share/perl5/ZoneMinder/Config.pm line 98.
Can't execute: Lost connection to MySQL server during query at /usr/share/perl5/ZoneMinder/Config.pm line 150.
BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder/Config.pm line 150.
Compilation failed in require at /usr/share/perl5/ZoneMinder.pm line 33.
BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder.pm line 33.
Compilation failed in require at /usr/bin/zmpkg.pl line 34.
BEGIN failed--compilation aborted at /usr/bin/zmpkg.pl line 34.
ZoneMinder failed to start
The text was updated successfully, but these errors were encountered: