We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
Vesta loses connection to MySQL
-
- Posts: 2
- Joined: Thu Jan 22, 2015 2:18 pm
Vesta loses connection to MySQL
The following problem started after I changed my admin pwd (from the one given me during install):
After the server (Ubuntu 14.04 on Digital Ocean) has been running for a few minutes, Vesta loses its ability to connect to MySQL. If I reboot, MySQL works fine for a couple minutes (I can add / edit DBs in Vesta's dashboard & my sites stay connected as well), but after that couple minutes of success, something goes wrong & neither Vesta nor individual sites installed in its [user]/web/ directory can connect to MySQL. Error messages are vague. Front-end merely says "Error establishing a database connection" and Vesta's Add DB command returns "Error: Connection failed"
I've followed instructions for setting the root user's MySQL password in Terminal, and the password I've set there is the same as the password I've put in [root]/.my.cnf & /usr/local/vesta/conf/mysql.conf.
When I get the error in Vesta (trying to add a DB), the following error ends up in /var/log/vesta/error.log:
[Error 15 2015-01-22 09:23:41 v-add-database admin db_name db_user ****** mysql localhost utf8 ]
I feel like there may be two separate mysql related processes? The following is from the end of /var/log/mysql/error.log:
===
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
150122 9:18:15 InnoDB: Unable to open the first data file
InnoDB: Error in opening ./ibdata1
150122 9:18:15 InnoDB: Operating system error number 11 in a file operation.
InnoDB: Error number 11 means 'Resource temporarily unavailable'.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/ ... codes.html
150122 9:18:15 InnoDB: Could not open or create data files.
150122 9:18:15 InnoDB: If you tried to add new data files, and it failed here,
150122 9:18:15 InnoDB: you should now edit innodb_data_file_path in my.cnf back
150122 9:18:15 InnoDB: to what it was, and remove the new ibdata files InnoDB created
150122 9:18:15 InnoDB: in this failed attempt. InnoDB only wrote those files full of
150122 9:18:15 InnoDB: zeros, but did not yet use them in any way. But be careful: do not
150122 9:18:15 InnoDB: remove old data files which contain your precious data!
150122 9:18:15 [ERROR] Plugin 'InnoDB' init function returned error.
150122 9:18:15 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
150122 9:18:15 [ERROR] Unknown/unsupported storage engine: InnoDB
150122 9:18:15 [ERROR] Aborting
150122 9:18:15 [Note] /usr/sbin/mysqld: Shutdown complete
150122 09:18:15 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
===
How do I find & stop the duplicated mysql process from running? It looks like after I reboot, Vesta behaves nicely, then some other mysql process kicks in & breaks things, perhaps? Thanks in advance for your help!
After the server (Ubuntu 14.04 on Digital Ocean) has been running for a few minutes, Vesta loses its ability to connect to MySQL. If I reboot, MySQL works fine for a couple minutes (I can add / edit DBs in Vesta's dashboard & my sites stay connected as well), but after that couple minutes of success, something goes wrong & neither Vesta nor individual sites installed in its [user]/web/ directory can connect to MySQL. Error messages are vague. Front-end merely says "Error establishing a database connection" and Vesta's Add DB command returns "Error: Connection failed"
I've followed instructions for setting the root user's MySQL password in Terminal, and the password I've set there is the same as the password I've put in [root]/.my.cnf & /usr/local/vesta/conf/mysql.conf.
When I get the error in Vesta (trying to add a DB), the following error ends up in /var/log/vesta/error.log:
[Error 15 2015-01-22 09:23:41 v-add-database admin db_name db_user ****** mysql localhost utf8 ]
I feel like there may be two separate mysql related processes? The following is from the end of /var/log/mysql/error.log:
===
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
150122 9:18:15 InnoDB: Unable to open the first data file
InnoDB: Error in opening ./ibdata1
150122 9:18:15 InnoDB: Operating system error number 11 in a file operation.
InnoDB: Error number 11 means 'Resource temporarily unavailable'.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/ ... codes.html
150122 9:18:15 InnoDB: Could not open or create data files.
150122 9:18:15 InnoDB: If you tried to add new data files, and it failed here,
150122 9:18:15 InnoDB: you should now edit innodb_data_file_path in my.cnf back
150122 9:18:15 InnoDB: to what it was, and remove the new ibdata files InnoDB created
150122 9:18:15 InnoDB: in this failed attempt. InnoDB only wrote those files full of
150122 9:18:15 InnoDB: zeros, but did not yet use them in any way. But be careful: do not
150122 9:18:15 InnoDB: remove old data files which contain your precious data!
150122 9:18:15 [ERROR] Plugin 'InnoDB' init function returned error.
150122 9:18:15 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
150122 9:18:15 [ERROR] Unknown/unsupported storage engine: InnoDB
150122 9:18:15 [ERROR] Aborting
150122 9:18:15 [Note] /usr/sbin/mysqld: Shutdown complete
150122 09:18:15 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
===
How do I find & stop the duplicated mysql process from running? It looks like after I reboot, Vesta behaves nicely, then some other mysql process kicks in & breaks things, perhaps? Thanks in advance for your help!
Re: Vesta loses connection to MySQL
viewtopic.php?f=14&t=6861&p=20746&hilit ... ice#p20746
Can you check, may be it was a duplicate copy of /etc/init/rc.conf so upstart was running /etc/init.d/rc twice?
Can you check, may be it was a duplicate copy of /etc/init/rc.conf so upstart was running /etc/init.d/rc twice?
-
- Posts: 2
- Joined: Thu Jan 22, 2015 2:18 pm
Re: Vesta loses connection to MySQL
Thanks - not quite sure what caused it, but the command here – https://github.com/serghey-rodin/vesta/ ... t-63156504 – fixed it: `update-rc.d mysql disable`
There's only one rc.conf in my /etc/init folder now.
There's only one rc.conf in my /etc/init folder now.