Hi Stephen, Your fix has resolved the issue on my system. Thanks for the rapid response.
Cheers, Paul On Wednesday, October 29, 2014 11:39:53 PM UTC, Stephen Gallagher wrote: > > > > > On Wed, 2014-10-29 at 16:27 -0400, Stephen Gallagher wrote: > > > > > > On Wed, 2014-10-29 at 11:04 -0700, Paul Fee wrote: > > > Hi all (and Stephen Gallagher), > > > > > > I'm using CentOS7 + EPEL with ReviewBoard-2.0.11 (fresh install + > > > today's updates). My site is listed in /etc/reviewboard/sites. When > > > httpd starts up, it checks if any sites need upgraded. I'm using a > > > mariadb database. > > > > > > When I reboot the box, httpd fails to startup. > > > > > > ======== > > > $ sudo systemctl status httpd > > > httpd.service - The Apache HTTP Server > > > Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled) > > > Drop-In: /usr/lib/systemd/system/httpd.service.d > > > └─reviewboard-sites.conf > > > Active: failed (Result: exit-code) since Wed 2014-10-29 17:42:28 > > > GMT; 16s ago > > > Process: 1184 ExecStartPre=/usr/bin/rb-site upgrade --all-sites > > > (code=exited, status=1/FAILURE) > > > > > > Oct 29 17:42:28 centos7 rb-site[1184]: File > > > "/usr/lib/python2.7/site-packages/django/db/backends/mysql/base.py", > > > line 435, in get_new_connection > > > Oct 29 17:42:28 centos7 rb-site[1184]: conn = > > > Database.connect(**conn_params) > > > Oct 29 17:42:28 centos7 rb-site[1184]: File > > > "/usr/lib64/python2.7/site-packages/MySQLdb/__init__.py", line 81, in > > > Connect > > > Oct 29 17:42:28 centos7 rb-site[1184]: return Connection(*args, > > > **kwargs) > > > Oct 29 17:42:28 centos7 rb-site[1184]: File > > > "/usr/lib64/python2.7/site-packages/MySQLdb/connections.py", line 187, > > > in __init__ > > > Oct 29 17:42:28 centos7 rb-site[1184]: super(Connection, > > > self).__init__(*args, **kwargs2) > > > Oct 29 17:42:28 centos7 rb-site[1184]: > > > django.db.utils.OperationalError: (2002, "Can't connect to local MySQL > > > server through socket '...k' (2)") > > > Oct 29 17:42:28 centos7 systemd[1]: httpd.service: control process > > > exited, code=exited status=1 > > > Oct 29 17:42:28 centos7 systemd[1]: Failed to start The Apache HTTP > > > Server. > > > Oct 29 17:42:28 centos7 systemd[1]: Unit httpd.service entered failed > > > state. > > > Hint: Some lines were ellipsized, use -l to show in full. > > > ========== > > > > > > I can manually start httpd as mariadb is now running by the time I've > > > logged in. > > > > > > If I remove the /etc/reviewboard/sites file, the issue goes away. If > > > I restore the file, the issue comes back. > > > > > > It looks like rb-site upgrade is being run before the database is > > > available. Should systemd be using socket activation to start mariadb > > > once a connection attempt is made? I believe > > > the /etc/reviewboard/sites facility is unique to Fedora/EPEL, so this > > > is could be a distro issue rather than ReviewBoard. > > > > > > MariaDB does not currently support socket-activation. What you need to > > do as a workaround right now is to add the following lines > > to /usr/lib/systemd/system/httpd.service.d/reviewboard-sites.conf: > > > > > > > > [Unit] > > After=postgresql.service mariadb.service mysql.service > > > > > > > > I'll roll this into the Fedora and EPEL packages. I hadn't thought of it > > previously. (Note: it's safe to list all of them on the After= line as > > this only controls ordering; it doesn't cause any of them to be started > > that would not already have been). > > > > Now I just have to hope that Apache never grows a dependency on a > > database... :) > > > > Fedora 21: > > https://admin.fedoraproject.org/updates/FEDORA-2014-13850/ReviewBoard-2.0.11-2.fc21 > > > EPEL 7: > https://admin.fedoraproject.org/updates/ReviewBoard-2.0.11-2.el7 > > -- Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/ --- Sign up for Review Board hosting at RBCommons: https://rbcommons.com/ --- Happy user? Let us know at http://www.reviewboard.org/users/ --- You received this message because you are subscribed to the Google Groups "reviewboard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
