-
Notifications
You must be signed in to change notification settings - Fork 394
Travis CI Drupal site install failing (as of today) #720
Comments
I'm wondering if this is related to recent changes in the Drush 9.x branch—I know there were a few small changes that started breaking people's builds on Drupal VM... maybe there's something similar going on here. Locally I have 9.0.0-alpha1 (released March 9), and installs succeed. |
+1 seeing the same, also have drush 9.0.0-alpha1 locally and clean installs are fine. |
I'm going to try downgrading with:
|
Note, I also see a version difference of ubuntu between old passing builds and new failing ones in Travis. May be unrelated, but I'll see if there's any way to roll it back (cant find an obvious way). Passing: Ubuntu 14.04.4 LTS |
Maybe Drush is no longer able to connect to the database? See drush-ops/drush#511 and Add detail to AlreadyInstalledException I know Ubuntu 14.04 had some issues with ufw at some point or another, maybe there's some internal access control blocking Drush? I am in debug mode on Travis, connected via SSH, and if I run |
Drush status seems to say otherwise:
And |
For the time being add to your travis.yml and it will work. |
I'm using: <?php
try {
$dbh = new PDO("mysql:host=127.0.0.1:3306;dbname=drupal", 'root', 'root');
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
echo 'Connected to Database';
$dbh = null;
}
catch (PDOException $e) {
echo $e->getMessage();
}
print "\r\n"; Running from within Travis, and I get the error:
(if I have no password) and the error:
(if I use the password Also, I can connect using cli Something has definitely changed in the default MySQL install on Travis! |
Thanks @arknoll, that works for me |
Summary:
|
Root cause identified. Temporary workaround, add the following to bottom of settings.php: if (getenv('TRAVIS')) {
$databases['default']['default']['hostname'] = '127.0.0.1';
} This will be the new default value in the next release of BLT. |
Testing the temporary workaround now... seems to still hit the install failure for me :/ |
Seems like you may also need to create a new MySQL user with a password, grant access to the drupal db, and then use those credentials. |
Okay, trying with adding the following to .travis.yml after the MySQL - mysql -u root -e "CREATE USER 'blt'@'localhost' IDENTIFIED BY 'blt';"
- mysql -u root -e "GRANT ALL ON drupal.* TO 'blt'@'localhost';" And then adding the following at the bottom of // Temporary workaround for https://github.com/acquia/blt/issues/720
if (getenv('TRAVIS') && file_exists(__DIR__ . '/travis.settings.php')) {
$databases['default']['default']['hostname'] = '127.0.0.1';
$databases['default']['default']['username'] = 'blt';
$databases['default']['default']['password'] = 'blt';
} Hopefully it works! |
This didn't seem to work for me, but I don't have time for further debugging right now—I'm going to switch to the For those wondering, stick that directive in the initial metadata at the top of the Travis file, e.g.: sudo: required
group: deprecated
language: php
dist: trusty
... |
FWIW, that did work for us, @geerlingguy . The build also updates the version of jdk_switcher and we had to define the version to use in order for selenium to run properly too:
|
I found that removing the distro resolves the issue for BLT -v 8.5.2 sudo: required
group: deprecated
language: php |
Here's our (lightning's) complete diff that got our builds passing on travis again if it helps. Lots of similarities/overlap: acquia/lightning@8415ec4 |
My system information:
When I run this command:
I get the following output:
And I expected this to happen:
This seemed to start happening today, and I can't get a successful build anymore.
The text was updated successfully, but these errors were encountered: