baikal - can not (re)start mysql Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
Sully

baikal - can not (re)start mysql

Post by Sully »

Hi,

I followed your instructions for installing Dietpi and baikal. (Btw: great Installation and setup routine)
Everything worked fine until I reach the point where I must restart mysql.

All I get is:

Code: Select all

root@DietPi:~# service mysql restart
Job for mysql.service failed. See 'systemctl status mysql.service' and 'journalctl -xn' for details.
with

Code: Select all

root@DietPi:~# systemctl status mysql.service -l
● mysql.service - LSB: Start and stop the mysql database server daemon
   Loaded: loaded (/etc/init.d/mysql)
   Active: failed (Result: exit-code) since Sat 2016-07-23 11:40:52 BST; 24s ago
  Process: 12438 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILUR                                                                                                                     E)

Jul 23 11:40:52 DietPi /etc/init.d/mysql[13248]: 0 processes alive and '/usr/bin                                                                                                                     /mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
Jul 23 11:40:52 DietPi mysql[12438]: Starting MySQL database server: mysqld . .                                                                                                                      . . . . . . . . . . . . . . . . . . . . . . . . . . . . failed!
Jul 23 11:40:52 DietPi systemd[1]: mysql.service: control process exited, code=e                                                                                                                     xited status=1
Jul 23 11:40:52 DietPi systemd[1]: Failed to start LSB: Start and stop the mysql                                                                                                                      database server daemon.
Jul 23 11:40:52 DietPi systemd[1]: Unit mysql.service entered failed state.
and

Code: Select all

root@DietPi:~# journalctl -xn
-- Logs begin at Sat 2016-07-23 10:17:30 BST, end at Sat 2016-07-23 11:40:52 BST. --
Jul 23 11:40:16 DietPi systemd[1]: Starting LSB: Start and stop the mysql database server daemon...
-- Subject: Unit mysql.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has begun starting up.
Jul 23 11:40:52 DietPi /etc/init.d/mysql[13248]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
Jul 23 11:40:52 DietPi /etc/init.d/mysql[13248]: [61B blob data]
Jul 23 11:40:52 DietPi /etc/init.d/mysql[13248]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Jul 23 11:40:52 DietPi /etc/init.d/mysql[13248]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Jul 23 11:40:52 DietPi /etc/init.d/mysql[13248]:
Jul 23 11:40:52 DietPi mysql[12438]: Starting MySQL database server: mysqld . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . failed!
Jul 23 11:40:52 DietPi systemd[1]: mysql.service: control process exited, code=exited status=1
Jul 23 11:40:52 DietPi systemd[1]: Failed to start LSB: Start and stop the mysql database server daemon.
-- Subject: Unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has failed.
--
-- The result is failed.
Jul 23 11:40:52 DietPi systemd[1]: Unit mysql.service entered failed state.
That means I still get the "Baïkal was not able to establish a connexion to the configured MySQL database (as configured in Specific/config.system.php)." error and it doesn´t work.

Any ideas on how to fix that?

Kind Regards
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: baikal - can not (re)start mysql

Post by Fourdee »

Looks like the Baikal installation is completely breaking mysql. I can't even SIGKILL mysqld process.
EDIT: This was caused by fstrim corrupting fileystem which is disabled in v125

Git ticket: https://github.com/Fourdee/DietPi/issues/438
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: baikal - can not (re)start mysql

Post by Fourdee »

Hi Sully,

Apologies for the delay.

We had some issues with daily FStrim which was possibly corrupting file systems. This was resolved in v125 as a hotfix, although, I think this may be causing your current issues with MySQL.
I tested a BaiKal installation today on v125 and could not replicate the issue.

Would you be able to write a new DietPi image and retry the BaiKal installation? v125 is the current version, your system will update automatically during 1st run.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Sully

Re: baikal - can not (re)start mysql

Post by Sully »

Hi Fourdee,

thanks for the reply and the help. I will try if it works an tell you the result.

Regards
Sully

Re: baikal - can not (re)start mysql

Post by Sully »

Installation and stetting up of baikal worked as explained in the manual. So everything seems fixed.
Thanks for the help!:)
Now I only need to figure out the right calendar URLs for Lightning...

Regards
Sully

Re: baikal - can not (re)start mysql

Post by Sully »

Sorry for bothering you again but could someone tell me please the needed URLs for CalDav and CardDav if I use baikal. (I´m using lightning at the moment)

All info I can find is either for old versions of baikal (0.2.x) or is simply saying: that depends on the way you installed baikal. Since I did not do the installation but DietPi did I can not say ho it was installed.

I would be very thankful for some help! :)

Kind Regards
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: baikal - can not (re)start mysql

Post by Fourdee »

Sully wrote:Sorry for bothering you again but could someone tell me please the needed URLs for CalDav and CardDav if I use baikal. (I´m using lightning at the moment)

All info I can find is either for old versions of baikal (0.2.x) or is simply saying: that depends on the way you installed baikal. Since I did not do the installation but DietPi did I can not say ho it was installed.

I would be very thankful for some help! :)

Kind Regards
Hi Sully,

The DietPi install location is the same as the BaiKal online docs for installation: http://sabre.io/baikal/install/

I believe the links your after is (change IP as needed):

Code: Select all

http://192.168.0.112/baikal/html/cal.php
http://192.168.0.112/baikal/html/card.php
http://192.168.0.112/baikal/html/dav.php
Found them using:

Code: Select all

root@DietPi:~# ls -lha /var/www/baikal/html/
total 32K
drwxr-xr-x 4 www-data www-data 4.0K May 28 20:28 .
drwxr-xr-x 6 www-data www-data 4.0K Aug  6 06:13 ..
drwxr-xr-x 3 www-data www-data 4.0K May 28 20:28 admin
-rw-r--r-- 1 www-data www-data 2.2K May 28 20:28 cal.php
-rw-r--r-- 1 www-data www-data 2.1K May 28 20:28 card.php
-rw-r--r-- 1 www-data www-data 2.0K May 28 20:28 dav.php
-rw-r--r-- 1 www-data www-data  462 May 28 20:28 .htaccess
lrwxrwxrwx 1 www-data www-data   43 Aug  6 06:12 index.php -> ../Core/Frameworks/Baikal/WWWRoot/index.php
drwxr-xr-x 2 www-data www-data 4.0K May 28 20:28 res
We havn't applied any rewrite rules in the DietPi installation, so you may need to add those in manually for now: http://sabre.io/baikal/install/.
Either way, please let us know if you get into any issues.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Post Reply