You are here
ajeffs - Fri, 2013/06/21 - 04:01
Dear All,
I'm having a problem restoring a redmine-12.1-squeeze-amd64 appliance from the hub to a fresh local VM install - works fine with 11.3 x86 appliances, but no luck with 12.1 thanks to the following error:
"Restoring databases
===================
SKIPPING MYSQL DATABASE RESTORE: mysql error (1): ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)"
myslq, which *had* been running on the local VM before the restore, has been stopped, and there is no sock file. Sounds similar to this post. mysql fails to start manually. myslq .log and .err are emtpy (there are a lot of innodb errors relating to ./ibdata1 in syslog, possibly unrelated).
So tklbam-restore appears to stop mysql before it is able to restore any databases. If I do a tklbam-restore-rollback, then myslql automatically starts up again, sock file is created, and all is as it was before the restore.
Any advice would be very much appreciated.
Regards,
Aaron.
Forum:
Update re. tklbam-restore cannot restore databases
Some extra experiments:
This behaviour does not occur with 11.3 appliances - is this a tklbam-restore bug in 12.1 appliances? tklbam is of limited use if it cannot restore the databases.
If it is not a tklbam bug, then does anyone have any idea why this is occuring?
Aaron.
Have the same issue with 12.1
Have the same issue with 12.1-core-x64 with mysql installed there. This is a showstopper bug.
Best regards,
Dmytro
Thanks for reporting this.
Any progress in reproducing and fixing this?
I too feel that this is a showstopper. I am consistently seeing this with v12.1 appliances that include MySQL, such as LAMP and WordPress.
On a local guest machine, when applying a TKLBAM restore to a freshly created appliance (of the same exact type that was previously restored),
[1] the log shows:
> Restoring databases
> ===================
> SKIPPING MYSQL DATABASE RESTORE: mysql error (1): ERROR 2002 (HY000): Can't connect to local
> MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
>
> We're done. You may want to reboot now to restart all services.
[2] WordPress shows: "Error establishing a database connection"
[3] MySQL server is up, but not running properly. Connecting to MySQL with phpMyAdmin shows
"Connection for controluser as defined in your configuration failed."
I have verified that the above does not occur with v11.3 or v12.0 appliances.
On the other hand, when the hub is used to "restore a backup to a new cloud server", MySQL server is down and efforts to bring it up do not succeed. As before, WordPress shows: "Error establishing a database connection"
issue opened on Dev Tracker
I took the liberty of opening a new issue on the TurnKey Dev Tracker on GitHub:
https://github.com/turnkeylinux/tracker/issues/40
Thanks, Alon, for fixing this!
Works flawlessly for me, even without a reboot (both on the hub and on my VMware guest)!
The temporary fix is no longer needed
Hard to know what is going on
And whether it is a TKLBAM issue or one with AWS... Looking at your log, it seems that there was an AWS DHCP issue, although in my experience that shouldn't stop your server from starting. However it may make it uncontactable via normal means.
My suggestion would be to stop it and start it again (assuming that it's a EBS backed server).
Everything seems to be working on my end
Specifically, I installed Redmine (TurnKey 12.1) on a local VM, created a test project, and backed it up to our test Hub account. I then launched a Redmine instance on EC2 and restored the backup.
I suggest you take advantage of the new TKLBAM v1.3 features to try to isolate what is it about your backup that is causing the restore to fail:
Hi JB, I tested the
Hi JB,
I tested the backup/restore process with Wordpress earlier today (e.g., 12.1 => 12.1 and 12.1 => 13.0) and everything seems to be working perfectly.
Anyhow, your best bet would be to investigate what is actually in your backup with the latest version of TKLBAM. The backup structures are human readable. Try these commands:
apt-get update
apt-get install tklbam
tklbam-restore --raw-download=/tmp/yourbackup your-backup-id
You can use tklbam-restore-rollback to rollback the restore and try again as many times as you like.
PS: FWIW TKLBAM is a free service. Perhaps you meant you are signed up to the Hub's cloud deployment service? In any case you're not actually "forking" any money over to TurnKey for TKLBAM. The service is provided at cost which means you only get charged the regular S3 storage fees. In fact we actually lose a little bit of money providing it to you because Amazon charge us for per-user subscription fees.
Error establishing a database connection
I am also seeing the same issue with wordpress + mysql: "Error establishing a database connection"
I was wondering if there are any ideas how to troubleshoot this error? for me it shows up periodically on the website..
Probably best to start a new thread...
If you are having an intermittent problem with "Error establishing a database connection" on your TKL WordPress site then it is unlikely to be this issue IMO (unless of course that it happens following backup/restore).
Your best bet is to start a new thread and provide details of what version of TKL you are running, where your appliance is running (e.g. AWS, including size and region) and the steps required to reproduce the issue.
An intermittent issue may just be caused by insufficient RAM for the load your server is getting...?
Thanks a lot - i will go
Thanks a lot - i will go ahead and do that!
Add new comment