Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest BLT causes local:refresh to fail #1284

Closed
geerlingguy opened this issue Apr 2, 2017 · 0 comments
Closed

Latest BLT causes local:refresh to fail #1284

geerlingguy opened this issue Apr 2, 2017 · 0 comments

Comments

@geerlingguy
Copy link
Contributor

My system information:

  • Operating system type: macOS
  • Operating system version: 10.12.4
  • BLT version: 8.x (latest HEAD)

When I run this command:

blt local:refresh

I get the following output:

...
blt > local:sync:db:
'drush' cache was cleared.                                                                                   [success]
Do you really want to drop all tables in the database drupal? (y/n): y
You will destroy data in local.eejgeerling.com/drupal and replace with data from staging-9173.prod.hosting.acquia.com/eejgeerlingstg.
Do you really want to continue? (y/n): y
Starting to create database on Destination.                                                                  [ok]
Creating database drupal. Any possible existing database will be dropped!
Do you really want to continue? (y/n): y
Starting to dump database on Source.                                                                         [ok]
Database dump saved to                                                                                       [success]
/home/eejgeerling/drush-backups/eejgeerlingstg/20170402170654/eejgeerlingstg_20170402_170654.sql.gz
Starting to discover temporary files directory on Destination.                                               [ok]
You will delete files in [email protected]:/tmp/eejgeerlingstg_20170402_170654.sql.gz and replace with data from [email protected]:/home/eejgeerling/drush-backups/eejgeerlingstg/20170402170654/eejgeerlingstg_20170402_170654.sql.gz
Do you really want to continue? (y/n): y
You will delete files in /tmp/drush_tmp_1491152816_58e12fb051381 and replace with data from [email protected]:/home/eejgeerling/drush-backups/eejgeerlingstg/20170402170654/eejgeerlingstg_20170402_170654.sql.gz
Do you really want to continue? (y/n): y
You will delete files in [email protected]:/tmp/eejgeerlingstg_20170402_170654.sql.gz and replace with data from /tmp/drush_tmp_1491152816_58e12fb051381/eejgeerlingstg_20170402_170654.sql.gz
Do you really want to continue? (y/n): y
Copying dump file from Source to Destination.                                                                [ok]
Starting to import dump file onto Destination database.                                                      [ok]

Starting to sanitize target database on Destination.                                                         [ok]

The following operations will be done on the target database:
 * Reset passwords and email addresses in users_field_data table
 * Truncate Drupal's sessions table

Do you really want to sanitize the current database? (y/n): y
'drush' cache was cleared.                                                                                   [success]
PDOException: SQLSTATE[HY000] [2002] Connection refused in                                                   [error]
/Users/jgeerling/Sites/acquia/eejgeerling/docroot/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php:142
Stack trace:
#0
/Users/jgeerling/Sites/acquia/eejgeerling/docroot/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php(142):
PDO->__construct('mysql:host=127....', 'drupal', 'drupal', Array)
#1 /Users/jgeerling/Sites/acquia/eejgeerling/docroot/core/lib/Drupal/Core/Database/Database.php(376):
Drupal\Core\Database\Driver\mysql\Connection::open(Array)
...

And I expected this to happen:

The database should be pulled down and the local:refresh should complete correctly.

Fix

It looks like the additional cache-rebuild in the local:sync:db target is not respecting the configured local drush alias.

PR incoming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant