I'm working on updating the web cluster module in Aegir 3.x, and came upon this odd error when trying to install a site on a platform deployed to a remote web server or web cluster.

Dummy connection failed to fail. Either your MySQL permissions are too lax, or the response was not understood. See http://is.gd/Y6i4FO for more information. ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Sites install just fine on local platforms. I guess I should check that mysql is configured to accept remote connections... If that's really the nature of the issue, we should try to provide a more useful error message.

Comments

ergonlogic’s picture

I can connect from the command line from the remote web server to the database server on the master (after creating a user). So that doesn't appear to be it. I'll have to check on that bit of code more closely. I wonder if this could be related to removing IP addresses as part of SNI?

  • ergonlogic committed 4a22d63 on 7.x-3.x
    Issue #2475527: Catch additional DB connection failures, and provide...
ergonlogic’s picture

Component: HTTP Service » DB Service
Status: Active » Fixed

I pushed a fix to provide more useful error messages for a couple more failure modes when connecting to mysql.

In the end, this is related to #2184451: Don't create 2 servers by default on installation, or more specifically, that the db server is named 'localhost' by default. As a result, the remote server was trying to connect to mysql on 'localhost', and thus through a socket. Since no db server was running, this obviously failed.

Changing the db server's name to one that could resolve remotely, and ensuring that the remote server could resolve it (added to /etc/hosts, in this case), fixed the issue, and allowed the site to install.

  • ergonlogic committed 4a22d63 on 7.x-4.x
    Issue #2475527: Catch additional DB connection failures, and provide...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.