Details
-
Type:
Bug
-
Status: Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 5.5.39, 10.0.14
-
Fix Version/s: 10.0
-
Component/s: None
-
Labels:None
Description
Currently a failed upgrade or incomplete installation, which ends up with mysqld_safe not being installed, becomes an investigation nightmare. The service attempts to start and after a timeout says that it failed:
sudo /etc/init.d/mysql start [FAIL] Starting MariaDB database server: mysqld . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . failed!
Syslog only contains unhelpful messages saying that something went wrong:
Sep 21 03:09:10 wheezy-64 /etc/init.d/mysql[13619]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in Sep 21 03:09:10 wheezy-64 /etc/init.d/mysql[13619]: #007/usr/bin/mysqladmin: connect to server at 'localhost' failed Sep 21 03:09:10 wheezy-64 /etc/init.d/mysql[13619]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' Sep 21 03:09:10 wheezy-64 /etc/init.d/mysql[13619]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists! Sep 21 03:09:10 wheezy-64 /etc/init.d/mysql[13619]:
That's how we end up with users' complaints like "server just does not start, nothing in the error log", at which point we get stuck because there's nothing to work with.
It is a realistic situation, for example that's exactly what happens when one tries to dist-upgrade from 5.5 to 10.0 on Wheezy.
It happens because all output of mysqld_safe call in the init script is redirected to /dev/null.
Gliffy Diagrams
Attachments
Issue Links
- relates to
-
MDEV-5957 mysqld_safe errors are lost when executed from the init script and additional arguments are not passed in case of a "restart" on Debian
-
- Open
-
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
I already proposed a fix for this issue for the Debian init script on MDEV-5957, it should have been fixed for MariaDB 10 packaged version on Debian and Ubuntu but not on the other cases.
--- /etc/init.d/mysql 2014-03-26 16:30:29.786052516 +0100 +++ /etc/init.d/mysql 2014-03-26 16:19:55.316198723 +0100 @@ -106,7 +106,7 @@ test -e /var/run/mysqld || install -m 755 -o mysql -g root -d /var/run/mysqld # Start MariaDB! - /usr/bin/mysqld_safe "${@:2}" > /dev/null 2>&1 & + /usr/bin/mysqld_safe "${@:2}" 2>&1 >/dev/null | $ERR_LOGGER & # 6s was reported in #352070 to be too few when using ndbcluster for i in $(seq 1 "${MYSQLD_STARTUP_TIMEOUT:-30}"); do