RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1042644 - MySQL unable to start (after unclean shutdown) because /etc/init.d/mysqld wrongly check /var/lib/mysql/mysql.sock by -S and not by lsof
Summary: MySQL unable to start (after unclean shutdown) because /etc/init.d/mysqld wro...
Keywords:
Status: CLOSED DUPLICATE of bug 1037650
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: mysql
Version: 6.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Honza Horak
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-13 00:43 UTC by Milan Kerslager
Modified: 2013-12-13 08:36 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-13 08:36:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Milan Kerslager 2013-12-13 00:43:13 UTC
In mysql-server-5.1.71-1.el6.x86_64 there is a check in init script:

[ -S /var/lib/mysql/mysql.sock ]

When the socket exist (unclean shutdown for example), the mysqld did not start because this check by printing a message that this socket is in use, which is wrong. There should be check by lsof instead:

# lsof /var/lib/mysql/mysql.sock 
COMMAND   PID  USER   FD   TYPE             DEVICE SIZE/OFF   NODE NAME
mysqld  14235 mysql   12u  unix 0xffff880214ec0980      0t0 169827 /var/lib/mysql/mysql.sock

Only lsof could tell if the socket is really in use or not. If yes, the output above tells. If the socket is not in use, the output above is empty.

The workaround is to delete the socket manually before trying to start MySQL daemon.

Comment 1 Honza Horak 2013-12-13 08:36:37 UTC
Thank you for reporting, this is most probably the same issue as bug #1037650, so marking as duplicate.

*** This bug has been marked as a duplicate of bug 1037650 ***


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