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

Remote config import throws exception #799

Closed
bobbygryzynger opened this issue Dec 15, 2016 · 4 comments
Closed

Remote config import throws exception #799

bobbygryzynger opened this issue Dec 15, 2016 · 4 comments
Labels
Support A support request

Comments

@bobbygryzynger
Copy link
Contributor

My system information:

  • Operating system type: Ubuntu
  • Operating system version: 12.04.5
  • BLT version: 8.x-dev

Output of blt doctor:

blt > doctor:

sh: 1: composer: not found
+----------------------+----------------------------------------------------------------------------------+
| Property             | Value                                                                            |
+----------------------+----------------------------------------------------------------------------------+
| %paths               |                                                                                  |
|  - %root             | /mnt/www/html/[redacted]dev/docroot                                                |
|  - %site             | sites/default                                                                    |
|  - %modules          | modules                                                                          |
|  - %themes           | themes                                                                           |
|  - %config-sync      | /mnt/www/html/[redacted]dev/docroot/sites/default/files/config_4bf1f02d5081baa3a95 |
|                      | acaf7465bd63b0efb82ed/sync                                                       |
|  - %config-vcs       | /mnt/www/html/[redacted]dev/docroot/../config/default                              |
|  - %files            | sites/default/files                                                              |
|  - %private          | /mnt/files/[redacted].dev/files-private                                            |
|  - %temp             | /mnt/tmp/[redacted]dev                                                             |
| admin-theme          | seven                                                                            |
| blt-version          | 8.x-dev                                                                          |
| bootstrap            | Successful                                                                       |
| config-sync          | /mnt/www/html/[redacted]dev/docroot/sites/default/files/config_4bf1f02d5081baa3a95 |
|                      | acaf7465bd63b0efb82ed/sync                                                       |
| config-vcs           | /mnt/www/html/[redacted]dev/docroot/../config/default                              |
| db-driver            | mysql                                                                            |
| db-hostname          | [redacted]                                                                    |
| db-name              | [redacted]dev                                                                      |
| db-password          | [redacted]                                                                  |
| db-port              | 3306                                                                             |
| db-status            | Connected                                                                        |
| db-username          | [redacted]                                                                           |
| drupal-settings-file | sites/default/settings.php                                                       |
| drupal-version       | 8.2.4                                                                            |
| drush-alias-files    | /mnt/drush/[redacted]//[redacted].aliases.drushrc.php                                |
|                      | /mnt/www/html/[redacted]dev/docroot/../drush/site-aliases/aliases.drushrc.php      |
| drush-conf           | /mnt/www/html/[redacted]dev/drush/drushrc.php                                      |
|                      | /etc/drush/drushrc.php                                                           |
| drush-script         | /mnt/www/html/[redacted]dev/vendor/drush/drush/drush.php                           |
| drush-temp           | /mnt/tmp/[redacted]dev                                                             |
| drush-version        | 8.1.8                                                                            |
| files                | sites/default/files                                                              |
| install-profile      | standard                                                                         |
| modules              | modules                                                                          |
| php-bin              | /usr/local/php5.6/bin/php                                                        |
| php-conf             | /usr/local/php5.6/etc/cli/php.ini                                                |
| php-os               | Linux                                                                            |
| private              | /mnt/files/[redacted].dev/files-private                                            |
| root                 | /mnt/www/html/[redacted]dev/docroot                                                |
| site                 | sites/default                                                                    |
| temp                 | /mnt/tmp/[redacted]dev                                                             |
| theme                | meyers                                                                           |
| themes               | themes                                                                           |
| uri                  | http://default                                                                   |
| user                 |                                                                                  |
+----------------------+----------------------------------------------------------------------------------+
+--------------------------+---------------------------------------------------------------------------------+
| Check                    | Outcome                                                                         |
+--------------------------+---------------------------------------------------------------------------------+
| checkDocrootExists       | Found docroot.                                                                  |
| checkCoreExists          | Drupal core exists                                                              |
| checkSettingsFile        | BLT settings are included in settings file.                                     |
| checkLocalSettingsFile   | Could not find local settings file.                                             |
|                          | Your local settings file should exist at                                        |
|                          | /mnt/www/html/[redacted]dev/docroot/sites/default/settings/local.settings.php.    |
| checkLocalDrushFile      | Local drushrc file does not exist.                                              |
|                          | Create /mnt/www/html/[redacted]dev/docroot/sites/default/local.drushrc.php.       |
|                          | Run `blt setup:drush:settings` to generate it automatically, or run `blt setup` |
|                          | to run the entire setup process.                                                |
| checkFileSystem:%files   | Public files directory is writable.                                             |
| checkFileSystem:%private | Private files directory is writable.                                            |
| checkFileSystem:%temp    | Temporary files directory is writable.                                          |
| checkDbConnection        | Connected to database.                                                          |
| checkDrupalBootstrapped  | Bootstrapped Drupal via drush.                                                  |
| checkDrupalInstalled     | Drupal is installed.                                                            |
| checkCaching:page        | Drupal cache is disabled.                                                       |
| checkCaching:css         | CSS preprocessing is disabled.                                                  |
| checkCaching:js          | JS preprocessing is disabled.                                                   |
| checkNvmExists           | NVM does not exist.                                                             |
|                          |                                                                                 |
|                          | It is recommended that you use NVM to manage multiple versions of NodeJS on one |
|                          | machine.                                                                        |
|                          | Instructions for installing NVM can be found at:                                |
|                          |   https://github.com/creationix/nvm#installation                                |
| checkComposer:require    | acquia/blt is in composer.json's require object.                                |
| checkComposer:plugins    | hirak/prestissimo plugin for composer is not installed.                         |
|                          |   Run `composer global require hirak/prestissimo:^0.3` to install it.           |
|                          |   This will improve composer install/update performance by parallelizing the    |
|                          | download of dependency information.                                             |
| checkBehat:exists        | tests/behat/local.yml is missing!                                               |
|                          |   Run `blt setup:behat` to generate it from example.local.yml.                  |
| checkProjectYml:keys     | project.yml has no deprecated keys.                                             |
| checkAcsfConfig          | BLT settings are included in your pre-settings-php include.                     |
| checkPhpDateTimezone     | PHP setting for date.timezone is correctly set                                  |
+--------------------------+---------------------------------------------------------------------------------+

BUILD FINISHED

Total time: 3.2329 seconds

When I run this command (on remote environment):

blt setup:config-import 

I get the following output:

blt > deploy:update:


blt > setup:config-import:

     [echo] Importing configuration...

Fatal error: Uncaught exception 'Symfony\Component\HttpKernel\Exception\BadRequestHttpException' in /mnt/www/html/[redacted]/docroot/core/lib/Drupal/Core/DrupalKernel.php:361
Stack trace:
#0 /mnt/www/html/[redacted]/vendor/drush/drush/lib/Drush/Boot/DrupalBoot8.php(68): Drupal\Core\DrupalKernel::findSitePath(Object(Symfony\Component\HttpFoundation\Request), true)
#1 /mnt/www/html/[redacted]/vendor/drush/drush/lib/Drush/Boot/DrupalBoot.php(391): Drush\Boot\DrupalBoot8->conf_path(true, true)
#2 /mnt/www/html/[redacted]/vendor/drush/drush/lib/Drush/Boot/DrupalBoot.php(333): Drush\Boot\DrupalBoot->bootstrap_drupal_site_validate_settings_present()
#3 /mnt/www/html/[redacted]/vendor/drush/drush/includes/bootstrap.inc(430): Drush\Boot\DrupalBoot->bootstrap_drupal_site_validate()
#4 /mnt/www/html/[redacted]/vendor/drush/drush/includes/bootstrap.inc(471): drush_bootstrap_validate(2)
#5 /mnt/www/html/[redacted]/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(59): drush_bootstrap_to_phase(6)
#6 /mnt/www/html/[redacted]/vendor/drush/drush/includes/pr in /mnt/www/html/[redacted]/docroot/core/lib/Drupal/Core/DrupalKernel.php on line 361
Drush command terminated abnormally due to an unrecoverable error.       [error]
Error: Uncaught exception
'Symfony\Component\HttpKernel\Exception\BadRequestHttpException' in
/mnt/www/html/[redacted]/docroot/core/lib/Drupal/Core/DrupalKernel.php:361
Stack trace:
#0
/mnt/www/html/[redacted]/vendor/drush/drush/lib/Drush/Boot/DrupalBoot8.php(68):
Drupal\Core\DrupalKernel::findSitePath(Object(Symfony\Component\HttpFoundation\Request),
true)
#1
/mnt/www/html/[redacted]/vendor/drush/drush/lib/Drush/Boot/DrupalBoot.php(391):
Drush\Boot\DrupalBoot8->conf_path(true, true)
#2
/mnt/www/html/[redacted]/vendor/drush/drush/lib/Drush/Boot/DrupalBoot.php(333):
Drush\Boot\DrupalBoot->bootstrap_drupal_site_validate_settings_present()
#3
/mnt/www/html/[redacted]/vendor/drush/drush/includes/bootstrap.inc(430):
Drush\Boot\DrupalBoot->bootstrap_drupal_site_validate()
#4
/mnt/www/html/[redacted]/vendor/drush/drush/includes/bootstrap.inc(471):
drush_bootstrap_validate(2)
#5
/mnt/www/html/[redacted]/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(59):
drush_bootstrap_to_phase(6)
#6 /mnt/www/html/[redacted]/vendor/drush/drush/includes/pr in
/mnt/www/html/[redacted]/docroot/core/lib/Drupal/Core/DrupalKernel.php,
line 361
[phingcall] /var/www/html/[redacted].prod/vendor/acquia/blt/phing/tasks/setup.xml:198:32: Drush exited with code 255

BUILD FAILED
/var/www/html/[redacted].prod/vendor/acquia/blt/phing/tasks/deploy.xml:163:22: Execution of the target buildfile failed. Aborting.

Total time: 0.4797 seconds

Update errored.

And I expected this to happen: No errors to occur.

@grasmash
Copy link
Contributor

This typically is caused by drush having the wrong URL for your local site. The URL should be defined in local.drushrc.php.

@grasmash grasmash added the Support A support request label Dec 15, 2016
@bobbygryzynger
Copy link
Contributor Author

@grasmash this is occurring remotely, so local.drushrc.php isn't present in the artifact. Would you recommend defining this info in drushrc.php or elsewhere?

@bobbygryzynger
Copy link
Contributor Author

@grasmash - I should add here this is occurring in the context of a multisite. This is probably contributing to the issue:

    <!-- Re-extract value of $options['uri'] in case it was not yet set. -->
    <!-- @todo Add multisite support. -->
    <phpVariable file="${repo.root}/drush/drushrc.php" variable="options[uri]" outputProperty="local_url" />

It seems like the multisite array may not be sufficient for defining all relevant multisite info, especially if uris differ between local and production environments.

Would you be open to a PR that attempts to define multisites along the lines of the following?

multisite:
    - name: default
      uri:
          local: mysite.default.local
          remote: mysite.com

@bobbygryzynger
Copy link
Contributor Author

Closing this as it's largely addressed by #1092.

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

No branches or pull requests

2 participants