[Bug 583310] Re: service command should report more information on failure
Steve Langasek
steve.langasek at canonical.com
Fri May 17 22:00:49 UTC 2013
In later releases of Ubuntu, this has been addressed by providing per-
service log files in /var/log/upstart.
** Package changed: sysvinit (Ubuntu) => upstart (Ubuntu)
** Changed in: upstart (Ubuntu)
Status: New => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to upstart in Ubuntu.
https://bugs.launchpad.net/bugs/583310
Title:
service command should report more information on failure
Status in “upstart” package in Ubuntu:
Fix Released
Bug description:
Binary package hint: sysvinit-utils
thomas at home:/etc/mysql$ lsb_release -rd
Description: Ubuntu 10.04 LTS
Release: 10.04
sysvinit-utils : 2.87dsf-4ubuntu17
Hi,
Lately I was facing this bug :
https://bugs.launchpad.net/ubuntu/+source/mysql-dfsg-5.1/+bug/573318
This involved specifically how services are started.
In the case of mysql :
From my understanding, the service command process
/etc/init/mysql.conf
Run the "pre-start script",start the service and run the "post-init
script" if pre-start is ok.
On the mysql case, the pre-init script fails because /etc/mysql/my.cnf
was missing (the fact that it's missing is the point of the bug
mention at the beginning of this bug).
this command return 1 instead of 0
[ -r $HOME/my.cnf ]
And all we get is this message:
start: Job failed to start
This just informs that the service couldn't start, but there is no clue about why it did fail.
There's is absolutely nothing logged about this failure despite this in deamon.log :
May 17 19:05:28 sd1 init: mysql pre-start process (4506) terminated
with status 1
but still, it doesn't help the admin to solve the issue (ok we know
that pre-init script exists and it fails).
What I had to do to find out what is going wrong is :
1/ understand how the service command works
2/ understand how /etc/init/*.conf scritps works
3/ execute the pre init script to see where it fails
which is not straight forward.
We need that pre-init and post-init script reports verbosely the
failures on stdout or at least in deamon.log so that error can be fix
quicker (and in these case, it can be stressfull to see that a service
won’t start without knowing why).
This could be done by catching what the script writes out stderr and
then display this to the user and in the logs. (or any other mean, but
we need a detailed reports of the failure)
Anyhow, ubuntu is by far my favourite distribution and I try to spread its use every time I have the occasion.
Thomas.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/583310/+subscriptions
More information about the foundations-bugs
mailing list