Bug 844901 - SQLgrey is started when mysql is not ready
SQLgrey is started when mysql is not ready
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: sqlgrey (Show other bugs)
16
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Steven Pritchard
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-01 04:24 EDT by Manuel Schilt
Modified: 2013-02-13 17:27 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-13 17:27:52 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Manuel Schilt 2012-08-01 04:24:31 EDT
Description of problem:
SQLgrey is started at the same time as mysqld. When SQLgrey starts, mysqld is not ready to process queries so SQLGrey reports an error. Later SQLgrey reconnects and the system works.
Starting SQLGrey *after* mysqld has successfully started would fix that.


Version-Release number of selected component (if applicable):
sqlgrey-1.7.6-4.fc15.noarch

How reproducible:
Rebooting.. 

Steps to Reproduce:
1.
2.
3.
  
Actual results:

/var/log/maillog:
Jul 29 14:50:08 qube sqlgrey: Process Backgrounded
Jul 29 14:50:08 qube sqlgrey: 2012/07/29-14:50:08 sqlgrey (type Net::Server::Multiplex) starting! pid(1498)
Jul 29 14:50:08 qube sqlgrey: Binding to TCP port 2501 on host localhost#012
Jul 29 14:50:08 qube sqlgrey: Setting gid to "995 995"
Jul 29 14:50:08 qube sqlgrey: Setting uid to "996"
Jul 29 14:50:08 qube sqlgrey: dbaccess: can't connect to DB: Can't connect to local MySQL server through socket '/var/lib
/mysql/mysql.sock' (2)
Jul 29 14:50:08 qube sqlgrey: dbaccess: error: couldn't get now() from DB: Can't connect to local MySQL server through so
cket '/var/lib/mysql/mysql.sock' (2)
Jul 29 14:50:08 qube sqlgrey: dbaccess: can't connect to DB: Can't connect to local MySQL server through socket '/var/lib
/mysql/mysql.sock' (2)
Jul 29 14:50:08 qube sqlgrey: dbaccess: error: couldn't access config table: Can't connect to local MySQL server through 
socket '/var/lib/mysql/mysql.sock' (2)
..
..

/var/log/messages: 
Jul 29 14:50:08 qube mysqld_safe[1239]: 120729 14:50:08 mysqld_safe Logging to '/var/log/mysqld.log'.
Jul 29 14:50:08 qube sqlgrey[1244]: Starting SQLgrey: [  OK  ]#015[  OK  ]
Jul 29 14:50:08 qube mysqld_safe[1239]: 120729 14:50:08 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Jul 29 14:50:09 qube postfix[1500]: Starting postfix: [  OK  ]

==> see, MySQL is started at the same time as SQLgrey (14:50:08)

/var/log/mysqld.log:
120729 14:50:08 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
120729 14:50:09 [Note] Plugin 'FEDERATED' is disabled.
120729 14:50:10 InnoDB: The InnoDB memory heap is disabled
120729 14:50:10 InnoDB: Mutexes and rw_locks use GCC atomic builtins
120729 14:50:10 InnoDB: Compressed tables use zlib 1.2.5
120729 14:50:10 InnoDB: Using Linux native AIO
120729 14:50:10 InnoDB: Initializing buffer pool, size = 512.0M
120729 14:50:10 InnoDB: Completed initialization of buffer pool
120729 14:50:10 InnoDB: highest supported file format is Barracuda.
120729 14:50:12  InnoDB: Waiting for the background threads to start
120729 14:50:13 InnoDB: 1.1.8 started; log sequence number 3227038
120729 14:50:14 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
120729 14:50:14 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
120729 14:50:14 [Note] Server socket created on IP: '0.0.0.0'.
120729 14:50:15 [Note] Event Scheduler: Loaded 0 events
120729 14:50:15 [Note] /usr/libexec/mysqld: ready for connections.

Expected results:

MySQL is ready at 14:50:15 to process queries.. so SQLGrey should start then..  would be interesting to see how that can be solved by using Requires/After with systemd

I made a workaround for myself by adding a "sleep 10" at the start of the initscript .. but this is pretty ugly.

Additional info:
Comment 1 Fedora End Of Life 2013-01-16 12:37:47 EST
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '16'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 16 is end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" and open it against that version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 2 Fedora End Of Life 2013-02-13 17:27:56 EST
Fedora 16 changed to end-of-life (EOL) status on 2013-02-12. Fedora 16 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

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