Bug 133993 - Service mysqld restart
Service mysqld restart
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: mysql (Show other bugs)
3.0
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Tom Lane
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-09-28 16:53 EDT by Ryan Shultz
Modified: 2013-07-02 23:02 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-20 15:41:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
mysql.init from 3.23.58-10 (2.40 KB, text/plain)
2004-10-05 14:48 EDT, Tom Lane
no flags Details

  None (edit)
Description Ryan Shultz 2004-09-28 16:53:01 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; 
SV1; .NET CLR 1.1.4322)

Description of problem:
When you attempt to run the command "service mysqld restart" it does 
not restart the server it errors out but comes back with OK.  When I 
check the service it shows the following after a restart "mysqld dead 
but subsys locked".

Version-Release number of selected component (if applicable):
mysql-server-3.23.58-1

How reproducible:
Always

Steps to Reproduce:
1. Key in service mysqld restart
2.
3.
    

Actual Results:  mysqld dead but subsys locked when performing 
a "service mysqld status" and shows that the service is OK.

Expected Results:  The service should have restarted.

Additional info:
Comment 1 Tom Lane 2004-10-05 14:47:12 EDT
I couldn't see any such problem in testing the current FC3 release
(3.23.58-10).  I think this might have been resolved by the updates
made to mysql.init in release -4 and -5.  I will attach the current
version of mysql.init to this bugzilla entry; could you try it and see
if it works for you?
Comment 2 Tom Lane 2004-10-05 14:48:54 EDT
Created attachment 104794 [details]
mysql.init from 3.23.58-10
Comment 3 Ryan Shultz 2004-10-05 15:21:53 EDT
I attempted to put that file in place in the init.d folder and it 
kept giving me a timeout error when trying to start mysqld.  I 
replaced it with the old file to keep the server running.  My box is 
completely up2date and the newest version I can even get (for 
enterprise) is the version I am running.
Comment 4 Tom Lane 2004-10-05 17:17:47 EDT
I think I may have confused you by referring to the file by the wrong
name.  The place to install it is actually /etc/rc.d/init.d/mysqld ...
is that where you put it, or did you call it mysql.init?
Comment 5 Ryan Shultz 2004-10-05 21:28:28 EDT
I put it in the /etc/init.d/ directory with the name mysqld.  I don't 
have the machine available right now but I believe that that is a sym 
link to /etc/rc.d/init.d

This file did not fix the issue.  Again, I am using AS3.
Comment 6 Tom Lane 2004-10-06 12:16:01 EDT
I tried this on a machine running stock RHEL3 U3, with both straight
mysql 3.23.58-1 and the updated version with the new init script. 
Works fine for me ... so there must be some additional contributing
factor that makes it not work for you.  Any idea what?
Comment 7 Ryan Shultz 2004-10-06 12:19:58 EDT
I have no idea.  Apache is installed but other than that, no major 
app server is running.  This is running on the new Sun x86 boxes 
(v60x).  Other than that I have no idea.  Is there any log file that 
will help with the diagnosis?
Comment 8 Tom Lane 2004-10-06 12:30:28 EDT
I dunno what a v60x is --- do we consider that still i386
architecture, or is it ia64 or x86_64?

One theory that comes to mind while looking at the init script is that
stop() doesn't seem to wait for the mysqld daemon to actually shut
down.  It seems possible that the restart fails because safe_mysqld
recognizes that there's an old daemon still running.  If you stick a
"sleep 1" between the stop and start steps in restart(), does it help?
Comment 9 Ryan Shultz 2004-10-06 13:41:10 EDT
I cannot confirm whether or not it actually kills the service or not 
as when I put the sleep 1 it shows FAILED for the stop and OK for the 
start though the service is then running.  I might not have even 
stopped the process.
Comment 10 Tom Lane 2004-10-06 13:43:37 EDT
Um, did you put the sleep into restart() as I suggested, or into
stop()?  If the latter you'd need to be careful about where.
Comment 11 Ryan Shultz 2004-10-11 09:02:46 EDT
I put it in the restart() section but one of our other sysadmins
replaced the my.cnf but did not kill the pid since the pid location
was not the same in his file.  The sleep command fixed the issue.  Thanks.
Comment 12 Tom Lane 2004-10-11 09:52:02 EDT
Great.  I had put the sleep into the latest RPMs (3.23.58-2.2 for
RHEL3), on speculation, but it looks like it was the right thing.
It looks like this can be marked as fixed for RHEL3 U4.
Comment 13 Josh Bressers 2004-10-20 15:41:30 EDT
An errata has been issued which should help the problem 
described in this bug report. This report is therefore being 
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, 
please follow the link below. You may reopen this bug report 
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2004-569.html

Note You need to log in before you can comment on or make changes to this bug.