drush-ops / drush

Drush is a command-line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those who spend their working hours hacking away at the command prompt.
https://www.drush.org
2.34k stars 1.08k forks source link

pm-update refuse to work on a multi-site Drupal 8 setup. #1989

Closed xmacinfo closed 8 years ago

xmacinfo commented 8 years ago

Using any of those commands will still give a needs a higher bootstrap error message.

Command pm-update needs a higher bootstrap level to run - you will need to invoke drush from a more functional Drupal environment to run this command.

We have a multi-site setup and other drush commands are working correctly, including cache-rebuild.

Using: Drupal 8.0.0. and Drush 8.0.3

luketaverne commented 8 years ago

Also having this issue on a single site setup, fresh install (using DigitalOcean droplet with Drupal 8). Tried updating to the latest version of drush (8.0.3), still nothing.

weitzman commented 8 years ago

Please post output of drush --uri=http://example.com status --debug and the failing one drush --uri=http://example.com pm-update --debug. Replace your full domain where it says example.com.

Also post contents of your sites/sites.php file

xmacinfo commented 8 years ago

Here is the Status output:

✗ drush --uri=local.agov8 status --debug                   
Phar detected. Proceeding to drush_main().Loading drushrc "/Users/jacquesblier/.drush/drushrc.php" into "home.drush" scope. [0.02 sec, 2.93 MB]                                                     [bootstrap]
Cache HIT cid: 8.0.3-commandfiles-0-b94ead6db45ab33bd8a60bb4bf1e4fc7 [0.02 sec, 2.99 MB]                                                                      [debug]
Bootstrap to phase 0. [0.18 sec, 7.26 MB]                                                                                                                 [bootstrap]
Trying to bootstrap as far as we can. [0.18 sec, 7.27 MB]                                                                                                     [debug]
Drush bootstrap phase : bootstrap_drupal_root() [0.35 sec, 7.87 MB]                                                                                       [bootstrap]
Initialized Drupal 8.0.0 root directory at /Users/jacquesblier/projets/tests/halifax/application [0.36 sec, 7.87 MB]                                      [bootstrap]
Find command files for phase 1 (max=7) [0.36 sec, 5.7 MB]                                                                                                     [debug]
Cache HIT cid: 8.0.3-commandfiles-1-7c7cccb04b4d08f4be7e37a3452f1c66 [0.36 sec, 5.71 MB]                                                                      [debug]
Drush bootstrap phase : bootstrap_drupal_site() [0.48 sec, 6.55 MB]                                                                                       [bootstrap]
Initialized Drupal site local.agov8 at sites/local.agov8 [0.48 sec, 6.56 MB]                                                                              [bootstrap]
Find command files for phase 2 (max=7) [0.49 sec, 6.56 MB]                                                                                                    [debug]
Drush bootstrap phase : bootstrap_drupal_configuration() [0.49 sec, 6.56 MB]                                                                              [bootstrap]
Find command files for phase 3 (max=7) [0.58 sec, 6.75 MB]                                                                                                    [debug]
sql-query: SELECT 1; [0.59 sec, 6.87 MB]                                                                                                                     [notice]
Executing: mysql --defaults-extra-file=/private/tmp/drush_KWSAAa --database=dev.halifax --host=localhost --port=3306 --silent  < /private/tmp/drush_vayEPz
  sh: mysql: command not found
Bootstrap phase bootstrap_drupal_database() failed to validate; continuing at bootstrap_drupal_configuration(). [0.6 sec, 6.87 MB]                            [debug]
Found command: core-status (commandfile=core) [0.6 sec, 6.87 MB]                                                                                          [bootstrap]
Loading outputformat engine. [0.69 sec, 9.21 MB]                                                                                                             [notice]
Calling hook drush_core_status [0.7 sec, 9.26 MB]                                                                                                             [debug]
Returned from hook drush_core_status [0.75 sec, 9.29 MB]                                                                                                      [debug]
 Drupal version         :  8.0.0                                                                                                      
 Site URI               :  local.agov8                                                                                                
 Database driver        :  mysql                                                                                                      
 Database hostname      :  localhost                                                                                                  
 Database port          :  3306                                                                                                       
 Database username      :  root                                                                                                       
 Database name          :  dev.halifax                                                                                                
 PHP configuration      :  /Applications/MAMP/bin/php/php5.6.10/conf/php.ini                                                          
 PHP OS                 :  Darwin                                                                                                     
 Drush script           :  /usr/local/bin/drush                                                                                       
 Drush version          :  8.0.3                                                                                                      
 Drush temp directory   :  /tmp                                                                                                       
 Drush configuration    :                                                                                                             
 Drush alias files      :  /Users/jacquesblier/.drush/evaluation.aliases.drushrc.php                                                  
 Drupal root            :  /Users/jacquesblier/projets/tests/halifax/application                                                      
 Drupal Settings File   :  sites/local.agov8/settings.php                                                                             
 Site path              :  sites/local.agov8                                                                                          
 Sync config path       :  sites/default/files/config_vXLxocRj8GXhZj62NakpnAFymRFa5V0imuuDd36fnLX01coVjGcfd1YyYHRTCp_3PbLxJ9T--A/sync 

Command dispatch complete [0.77 sec, 9.42 MB]                                                                                                                [notice]
xmacinfo commented 8 years ago

Here is the Pm-update output:

drush --uri=local.agov8 pm-update --debug
Phar detected. Proceeding to drush_main().Loading drushrc "/Users/jacquesblier/.drush/drushrc.php" into "home.drush" scope. [0.02 sec, 2.93 MB]                                                     [bootstrap]
Cache HIT cid: 8.0.3-commandfiles-0-b94ead6db45ab33bd8a60bb4bf1e4fc7 [0.03 sec, 2.99 MB]                                                                      [debug]
Bootstrap to phase 0. [0.18 sec, 7.26 MB]                                                                                                                 [bootstrap]
Bootstrap to phase 6. [0.19 sec, 7.27 MB]                                                                                                                 [bootstrap]
Drush bootstrap phase : bootstrap_drupal_root() [0.2 sec, 7.87 MB]                                                                                        [bootstrap]
Initialized Drupal 8.0.0 root directory at /Users/jacquesblier/projets/tests/halifax/application [0.21 sec, 7.87 MB]                                      [bootstrap]
Find command files for phase 1 (max=6) [0.21 sec, 5.67 MB]                                                                                                    [debug]
Cache HIT cid: 8.0.3-commandfiles-1-7c7cccb04b4d08f4be7e37a3452f1c66 [0.21 sec, 5.68 MB]                                                                      [debug]
Drush bootstrap phase : bootstrap_drupal_site() [0.22 sec, 6.52 MB]                                                                                       [bootstrap]
Initialized Drupal site local.agov8 at sites/local.agov8 [0.22 sec, 6.53 MB]                                                                              [bootstrap]
Find command files for phase 2 (max=6) [0.23 sec, 6.53 MB]                                                                                                    [debug]
Drush bootstrap phase : bootstrap_drupal_configuration() [0.23 sec, 6.53 MB]                                                                              [bootstrap]
Find command files for phase 3 (max=6) [0.23 sec, 6.73 MB]                                                                                                    [debug]
sql-query: SELECT 1; [0.24 sec, 6.84 MB]                                                                                                                     [notice]
Executing: mysql --defaults-extra-file=/private/tmp/drush_0FKtKY --database=dev.halifax --host=localhost --port=3306 --silent  < /private/tmp/drush_TNclsk
  sh: mysql: command not found
Bootstrap to phase 1. [0.25 sec, 6.84 MB]                                                                                                                 [bootstrap]
Bootstrap to phase 6. [0.35 sec, 9.17 MB]                                                                                                                 [bootstrap]
Bootstrap to phase 5. [0.35 sec, 9.17 MB]                                                                                                                 [bootstrap]
Command pm-update needs a higher bootstrap level to run - you will need to invoke drush from a more functional Drupal environment to run this command.    [error]
[0.35 sec, 9.17 MB]
The drush command 'pm-update' could not be executed. [0.35 sec, 9.17 MB]                                                                                  [error]
Drush was not able to start (bootstrap) the Drupal database.                                                                                              [error]
Hint: This may occur when Drush is trying to:
 * bootstrap a site that has not been installed or does not have a configured database. In this case you can select another site with a working database
setup by specifying the URI to use with the --uri parameter on the command line. See `drush topic docs-aliases` for details.
 * connect the database through a socket. The socket file may be wrong or the php-cli may have no access to it in a jailed shell. See
http://drupal.org/node/1428638 for details.

Drush was attempting to connect to: 
 Drupal version         :  8.0.0                                                                                                      
 Site URI               :  local.agov8                                                                                                
 Database driver        :  mysql                                                                                                      
 Database hostname      :  localhost                                                                                                  
 Database port          :  3306                                                                                                       
 Database username      :  root                                                                                                       
 Database name          :  dev.halifax                                                                                                
 PHP configuration      :  /Applications/MAMP/bin/php/php5.6.10/conf/php.ini                                                          
 PHP OS                 :  Darwin                                                                                                     
 Drush script           :  /usr/local/bin/drush                                                                                       
 Drush version          :  8.0.3                                                                                                      
 Drush temp directory   :  /tmp                                                                                                       
 Drush configuration    :                                                                                                             
 Drush alias files      :  /Users/jacquesblier/.drush/evaluation.aliases.drushrc.php                                                  
 Drupal root            :  /Users/jacquesblier/projets/tests/halifax/application                                                      
 Drupal Settings File   :  sites/local.agov8/settings.php                                                                             
 Site path              :  sites/local.agov8                                                                                          
 Sync config path       :  sites/default/files/config_vXLxocRj8GXhZj62NakpnAFymRFa5V0imuuDd36fnLX01coVjGcfd1YyYHRTCp_3PbLxJ9T--A/sync 

 [0.43 sec, 9.38 MB]
xmacinfo commented 8 years ago

And sites.php file:


$sites['local.agov8'] = 'local.agov8';
$sites['agov8.cgi-web.ca'] = 'agov8.cgi-web.ca';
weitzman commented 8 years ago

You are missing a MySQL client program.

sh: mysql: command not found

xmacinfo commented 8 years ago

I am using 'zsh' and for unknown reason it did not find 'mysql' in its path. I added “:/Applications/MAMP/Library/bin/” and 'mysql' now works from the command-line and Drush.

Here is a part of the status I now get:

$ drush st
… 
Database driver                 :  mysql                                                     
 Database hostname               :  localhost                                                 
 Database port                   :  3306                                                      
 Database username               :  root                                                      
 Database name                   :  cgi_20140404                                              
 Drupal bootstrap                :  **Successful**              
…

Drush 8.0.3 shows the success of a boostrap right in the status output.

Can I close this issue?

zaphod-42 commented 8 years ago

I'm running into the same error in the same scenario, but I do have mysql functioning

output of status debug:

Using the Drush script found at /root/.composer/vendor/drush/drush/drush.launcher using pcntl_exec
Drush preflight prepare loaded autoloader at                         [preflight]
/root/.composer/vendor/autoload.php [0 sec, 2.18 MB]
Starting Drush preflight. [0 sec, 2.18 MB]                                                                                                                                                                             [preflight]
Cache HIT cid: 8.1-dev-commandfiles-0-44315a93102271f0c2ab44c3410379af [0.01 sec, 2.22 MB]                                                                                                                                 [debug]
Scanning into /etc/drush for /.*aliases\.drush(8|)rc\.php$/ [0.02 sec, 4.28 MB]                                                                                                                                            [debug]
Scanning into /etc/drush for /self\.alias\.drush(8|)rc\.php$/ [0.02 sec, 4.28 MB]                                                                                                                                          [debug]
Scanning into /root/.composer/vendor/drush/drush/includes/.. for /.*aliases\.drush(8|)rc\.php$/ [0.02 sec, 4.28 MB]                                                                                                        [debug]
Scanning into /root/.composer/vendor/drush/drush/includes/.. for /self\.alias\.drush(8|)rc\.php$/ [0.02 sec, 4.28 MB]                                                                                                      [debug]
Scanning into /root/.drush for /.*aliases\.drush(8|)rc\.php$/ [0.02 sec, 4.28 MB]                                                                                                                                          [debug]
Scanning into /root/.drush for /self\.alias\.drush(8|)rc\.php$/ [0.02 sec, 4.28 MB]                                                                                                                                        [debug]
Scanning into /var/www/html/../drush for /.*aliases\.drush(8|)rc\.php$/ [0.03 sec, 4.28 MB]                                                                                                                                [debug]
Scanning into /var/www/html/../drush for /self\.alias\.drush(8|)rc\.php$/ [0.03 sec, 4.28 MB]                                                                                                                              [debug]
Scanning into /var/www/html/drush for /.*aliases\.drush(8|)rc\.php$/ [0.03 sec, 4.28 MB]                                                                                                                                   [debug]
Scanning into /var/www/html/drush for /self\.alias\.drush(8|)rc\.php$/ [0.03 sec, 4.28 MB]                                                                                                                                 [debug]
Scanning into /var/www/html/sites/all/drush for /.*aliases\.drush(8|)rc\.php$/ [0.03 sec, 4.29 MB]                                                                                                                         [debug]
Scanning into /var/www/html/sites/all/drush for /self\.alias\.drush(8|)rc\.php$/ [0.03 sec, 4.29 MB]                                                                                                                       [debug]
Scanning into /var/www/html/sites/controlanything for /.*aliases\.drush(8|)rc\.php$/ [0.03 sec, 4.29 MB]                                                                                                                   [debug]
Scanning into /var/www/html/sites/controlanything for /self\.alias\.drush(8|)rc\.php$/ [0.03 sec, 4.29 MB]                                                                                                                 [debug]
Bootstrap to phase 0. [0.04 sec, 5.42 MB]                                                                                                                                                                              [bootstrap]
Drush bootstrap phase : bootstrap_drupal_root() [0.05 sec, 5.97 MB]                                                                                                                                                    [bootstrap]
Initialized Drupal 8.0.3 root directory at /var/www/html [0.05 sec, 5.97 MB]                                                                                                                                           [bootstrap]
Find command files for phase 1 (max=7) [0.05 sec, 4.85 MB]                                                                                                                                                                 [debug]
Cache HIT cid: 8.1-dev-commandfiles-1-dd4ed153a09b7c7628c44e321f0adf90 [0.05 sec, 4.86 MB]                                                                                                                                 [debug]
Drush bootstrap phase : bootstrap_drupal_site() [0.06 sec, 5.41 MB]                                                                                                                                                    [bootstrap]
Initialized Drupal site controlanything at sites/controlanything [0.06 sec, 5.41 MB]                                                                                                                                   [bootstrap]
Find command files for phase 2 (max=7) [0.06 sec, 5.41 MB]                                                                                                                                                                 [debug]
Drush bootstrap phase : bootstrap_drupal_configuration() [0.06 sec, 5.41 MB]                                                                                                                                           [bootstrap]
Find command files for phase 3 (max=7) [0.06 sec, 5.77 MB]                                                                                                                                                                 [debug]
sql-query: SELECT 1; [0.06 sec, 5.88 MB]                                                                                                                                                                                  [notice]
Executing: mysql --defaults-extra-file=/tmp/drush_VUSscP --database=ca_d8 --host=localhost --port=3306 --silent  < /tmp/drush_QzSig2
  1
sql-query: SHOW TABLES; [0.07 sec, 5.89 MB]                                                                                                                                                                               [notice]
Executing: mysql --defaults-extra-file=/tmp/drush_eJ9l6o --database=ca_d8 --host=localhost --port=3306 --silent  < /tmp/drush_Su6o9B
  batch
  block_content
  block_content__body
  block_content_field_data
  block_content_field_revision
  block_content_revision
  block_content_revision__body
  cache_bootstrap
  cache_config
  cache_container
  cache_data
  cache_default
  cache_discovery
  cache_dynamic_page_cache
  cache_entity
  cache_menu
  cache_migrate
  cache_render
  cache_toolbar
  cachetags
  comment
  comment__comment_body
  comment_entity_statistics
  comment_field_data
  config
  file__field_image_alt_text
  file__field_image_title_text
  file_managed
  file_metadata
  file_usage
  flood
  history
  key_value
  key_value_expire
  menu_link_content
  menu_link_content_data
  menu_tree
  node
  node__body
  node__comment
  node__field_image
  node__field_tags
  node_access
  node_field_data
  node_field_revision
  node_revision
  node_revision__body
  node_revision__comment
  node_revision__field_image
  node_revision__field_tags
  queue
  router
  s3fs_file
  search_dataset
  search_index
  search_total
  semaphore
  sequences
  sessions
  shortcut
  shortcut_field_data
  shortcut_set_users
  taxonomy_index
  taxonomy_term__field_at_a_glance_items
  taxonomy_term__field_main_media
  taxonomy_term_data
  taxonomy_term_field_data
  taxonomy_term_hierarchy
  url_alias
  user__roles
  user__user_picture
  users
  users_data
  users_field_data
  watchdog
Found command: core-status (commandfile=core) [0.07 sec, 5.89 MB]                                                                                                                                                      [bootstrap]
Loading outputformat engine. [0.08 sec, 7.09 MB]                                                                                                                                                                          [notice]
Calling hook drush_core_status [0.09 sec, 7.16 MB]                                                                                                                                                                         [debug]
Scanning into /etc/drush for /.*aliases\.drush(8|)rc\.php$/ [0.09 sec, 7.16 MB]                                                                                                                                            [debug]
Scanning into /etc/drush for /.*\.alias\.drush(8|)rc\.php$/ [0.09 sec, 7.16 MB]                                                                                                                                            [debug]
Scanning into /root/.composer/vendor/drush/drush/includes/.. for /.*aliases\.drush(8|)rc\.php$/ [0.09 sec, 7.16 MB]                                                                                                        [debug]
Scanning into /root/.composer/vendor/drush/drush/includes/.. for /.*\.alias\.drush(8|)rc\.php$/ [0.09 sec, 7.16 MB]                                                                                                        [debug]
Scanning into /root/.drush for /.*aliases\.drush(8|)rc\.php$/ [0.09 sec, 7.17 MB]                                                                                                                                          [debug]
Scanning into /root/.drush for /.*\.alias\.drush(8|)rc\.php$/ [0.09 sec, 7.17 MB]                                                                                                                                          [debug]
Scanning into /var/www/html/drush for /.*aliases\.drush(8|)rc\.php$/ [0.09 sec, 7.17 MB]                                                                                                                                   [debug]
Scanning into /var/www/html/drush for /.*\.alias\.drush(8|)rc\.php$/ [0.09 sec, 7.17 MB]                                                                                                                                   [debug]
Scanning into /var/www/html/sites/all/drush for /.*aliases\.drush(8|)rc\.php$/ [0.09 sec, 7.17 MB]                                                                                                                         [debug]
Scanning into /var/www/html/sites/all/drush for /.*\.alias\.drush(8|)rc\.php$/ [0.09 sec, 7.17 MB]                                                                                                                         [debug]
Scanning into /var/www/html/sites/controlanything for /.*aliases\.drush(8|)rc\.php$/ [0.09 sec, 7.17 MB]                                                                                                                   [debug]
Scanning into /var/www/html/sites/controlanything for /.*\.alias\.drush(8|)rc\.php$/ [0.09 sec, 7.17 MB]                                                                                                                   [debug]
Scanning into /var/www/html/../drush for /.*aliases\.drush(8|)rc\.php$/ [0.09 sec, 7.17 MB]                                                                                                                                [debug]
Scanning into /var/www/html/../drush for /.*\.alias\.drush(8|)rc\.php$/ [0.09 sec, 7.17 MB]                                                                                                                                [debug]
Returned from hook drush_core_status [0.09 sec, 7.17 MB]                                                                                                                                                                   [debug]
 Drupal version         :  8.0.3                                                                                                              
 Site URI               :  controlanything                                                                                                    
 Database driver        :  mysql                                                                                                              
 Database hostname      :  localhost                                                                                                          
 Database port          :  3306                                                                                                               
 Database username      :  ca_d8                                                                                                              
 Database name          :  ca_d8                                                                                                              
 PHP executable         :  /usr/bin/php                                                                                                       
 PHP configuration      :  /usr/local/php7/etc/php.ini                                                                                        
 PHP OS                 :  Linux                                                                                                              
 Drush script           :  /root/.composer/vendor/drush/drush/drush.php                                                                       
 Drush version          :  8.1-dev                                                                                                            
 Drush temp directory   :  /tmp                                                                                                               
 Drush configuration    :                                                                                                                     
 Drush alias files      :                                                                                                                     
 Drupal root            :  /var/www/html                                                                                                      
 Site path              :  sites/controlanything                                                                                              
 Sync config path       :  sites/controlanything/files/config_FmrIRb7ryZ-HZo9lmh2Z_UFPKUiEOTfd2sxpFpgM38Ccm8vQpoXMM2LUQvZpv4EvGNc4jNavCQ/sync 

pm-update debug:

Using the Drush script found at /root/.composer/vendor/drush/drush/drush.launcher using pcntl_exec
Drush preflight prepare loaded autoloader at                         [preflight]
/root/.composer/vendor/autoload.php [0 sec, 2.18 MB]
Starting Drush preflight. [0 sec, 2.18 MB]                                                                                                                                                                             [preflight]
Cache HIT cid: 8.1-dev-commandfiles-0-44315a93102271f0c2ab44c3410379af [0.01 sec, 2.22 MB]                                                                                                                                 [debug]
Scanning into /etc/drush for /.*aliases\.drush(8|)rc\.php$/ [0.02 sec, 4.28 MB]                                                                                                                                            [debug]
Scanning into /etc/drush for /self\.alias\.drush(8|)rc\.php$/ [0.02 sec, 4.28 MB]                                                                                                                                          [debug]
Scanning into /root/.composer/vendor/drush/drush/includes/.. for /.*aliases\.drush(8|)rc\.php$/ [0.02 sec, 4.28 MB]                                                                                                        [debug]
Scanning into /root/.composer/vendor/drush/drush/includes/.. for /self\.alias\.drush(8|)rc\.php$/ [0.02 sec, 4.28 MB]                                                                                                      [debug]
Scanning into /root/.drush for /.*aliases\.drush(8|)rc\.php$/ [0.02 sec, 4.28 MB]                                                                                                                                          [debug]
Scanning into /root/.drush for /self\.alias\.drush(8|)rc\.php$/ [0.02 sec, 4.28 MB]                                                                                                                                        [debug]
Scanning into /var/www/html/../drush for /.*aliases\.drush(8|)rc\.php$/ [0.03 sec, 4.28 MB]                                                                                                                                [debug]
Scanning into /var/www/html/../drush for /self\.alias\.drush(8|)rc\.php$/ [0.03 sec, 4.28 MB]                                                                                                                              [debug]
Scanning into /var/www/html/drush for /.*aliases\.drush(8|)rc\.php$/ [0.03 sec, 4.28 MB]                                                                                                                                   [debug]
Scanning into /var/www/html/drush for /self\.alias\.drush(8|)rc\.php$/ [0.03 sec, 4.28 MB]                                                                                                                                 [debug]
Scanning into /var/www/html/sites/all/drush for /.*aliases\.drush(8|)rc\.php$/ [0.03 sec, 4.29 MB]                                                                                                                         [debug]
Scanning into /var/www/html/sites/all/drush for /self\.alias\.drush(8|)rc\.php$/ [0.03 sec, 4.29 MB]                                                                                                                       [debug]
Scanning into /var/www/html/sites/controlanything for /.*aliases\.drush(8|)rc\.php$/ [0.03 sec, 4.29 MB]                                                                                                                   [debug]
Scanning into /var/www/html/sites/controlanything for /self\.alias\.drush(8|)rc\.php$/ [0.03 sec, 4.29 MB]                                                                                                                 [debug]
Bootstrap to phase 0. [0.04 sec, 5.42 MB]                                                                                                                                                                              [bootstrap]
Bootstrap to phase 6. [0.04 sec, 5.42 MB]                                                                                                                                                                              [bootstrap]
Drush bootstrap phase : bootstrap_drupal_root() [0.05 sec, 5.97 MB]                                                                                                                                                    [bootstrap]
Initialized Drupal 8.0.3 root directory at /var/www/html [0.05 sec, 5.97 MB]                                                                                                                                           [bootstrap]
Find command files for phase 1 (max=6) [0.05 sec, 4.84 MB]                                                                                                                                                                 [debug]
Cache HIT cid: 8.1-dev-commandfiles-1-dd4ed153a09b7c7628c44e321f0adf90 [0.05 sec, 4.85 MB]                                                                                                                                 [debug]
Drush bootstrap phase : bootstrap_drupal_site() [0.05 sec, 5.4 MB]                                                                                                                                                     [bootstrap]
Initialized Drupal site controlanything at sites/controlanything [0.05 sec, 5.4 MB]                                                                                                                                    [bootstrap]
Find command files for phase 2 (max=6) [0.06 sec, 5.4 MB]                                                                                                                                                                  [debug]
Drush bootstrap phase : bootstrap_drupal_configuration() [0.06 sec, 5.4 MB]                                                                                                                                            [bootstrap]
Find command files for phase 3 (max=6) [0.06 sec, 5.76 MB]                                                                                                                                                                 [debug]
sql-query: SELECT 1; [0.06 sec, 5.87 MB]                                                                                                                                                                                  [notice]
Executing: mysql --defaults-extra-file=/tmp/drush_Bk1oWj --database=ca_d8 --host=localhost --port=3306 --silent  < /tmp/drush_dws6Iw
  1
sql-query: SHOW TABLES; [0.06 sec, 5.88 MB]                                                                                                                                                                               [notice]
Executing: mysql --defaults-extra-file=/tmp/drush_iKVAoU --database=ca_d8 --host=localhost --port=3306 --silent  < /tmp/drush_BAyua7
  batch
  block_content
  block_content__body
  block_content_field_data
  block_content_field_revision
  block_content_revision
  block_content_revision__body
  cache_bootstrap
  cache_config
  cache_container
  cache_data
  cache_default
  cache_discovery
  cache_dynamic_page_cache
  cache_entity
  cache_menu
  cache_migrate
  cache_render
  cache_toolbar
  cachetags
  comment
  comment__comment_body
  comment_entity_statistics
  comment_field_data
  config
  file__field_image_alt_text
  file__field_image_title_text
  file_managed
  file_metadata
  file_usage
  flood
  history
  key_value
  key_value_expire
  menu_link_content
  menu_link_content_data
  menu_tree
  node
  node__body
  node__comment
  node__field_image
  node__field_tags
  node_access
  node_field_data
  node_field_revision
  node_revision
  node_revision__body
  node_revision__comment
  node_revision__field_image
  node_revision__field_tags
  queue
  router
  s3fs_file
  search_dataset
  search_index
  search_total
  semaphore
  sequences
  sessions
  shortcut
  shortcut_field_data
  shortcut_set_users
  taxonomy_index
  taxonomy_term__field_at_a_glance_items
  taxonomy_term__field_main_media
  taxonomy_term_data
  taxonomy_term_field_data
  taxonomy_term_hierarchy
  url_alias
  user__roles
  user__user_picture
  users
  users_data
  users_field_data
  watchdog
Bootstrap to phase 1. [0.07 sec, 5.89 MB]                                                                                                                                                                              [bootstrap]
Bootstrap to phase 6. [0.08 sec, 7.08 MB]                                                                                                                                                                              [bootstrap]
Bootstrap to phase 5. [0.08 sec, 7.08 MB]                                                                                                                                                                              [bootstrap]
Command pm-update needs a higher bootstrap level to run - you will need to invoke drush from a more functional Drupal environment to run this command. [0.08 sec, 7.08 MB]                                             [error]
The drush command 'pm-update' could not be executed. [0.08 sec, 7.08 MB] 

sites.php

$sites = array(
        'ce.example.com' => 'controleverything',
        'ca.example.com' => 'controlanything'
);
xmacinfo commented 8 years ago

Does your Drish Status shows “Successful” message? Look for “ Drupal bootstrap: Successful

Example:

drush status

 Drupal version                  :  8.0.0                                                                                                      
 Site URI                        :  http://default                                                                                             
 Database driver                 :  mysql                                                                                                      
 Database hostname               :  localhost                                                                                                  
 Database port                   :  3306                                                                                                       
 Database username               :  root                                                                                                       
 Database name                   :  dev.halifax                                                                                                
 Drupal bootstrap                :  Successful                                                                                                 
 Drupal user                     :                                                                                                             
 Default theme                   :  agov_base                                                                                                  
 Administration theme            :  seven                                                                                                      
 PHP configuration               :  /Applications/MAMP/bin/php/php5.6.10/conf/php.ini                                                          
 PHP OS                          :  Darwin                                                                                                     
 Drush script                    :  /usr/local/bin/drush                                                                                       
 Drush version                   :  8.0.3
ETC.

I do not have any errors on my side with a multi-site setup.

zaphod-42 commented 8 years ago

If I run "drush status" I get successful, if I run with any site or @sites I don't show a Drupal rootstrap row on any but the default site

xmacinfo commented 8 years ago

I did run this command:

drush @sites status

And I get a Successful message for the sites that the settings.php is configured to a real database/user and no Drupal bootstrap message when there is no settings.php or real database/user working for that settings.php file.

For example, when running that command, I have default and one alias that show the Successful line and a second alias that do not have the boostrap successful message.

In my case this is normal because that last alias is configured for production, so it will fail on my local.

Make sure you have a valid settings.php file with the correct database credentials.

zaphod-42 commented 8 years ago

I have settings.php files in both sites folders, connected to different databases with different users. I can load drupal from the subdomains and get the appropriate site. The only strangeness that I can think of is I use some shared tables between the sites so I can share user data. So I have some prefix settings:

'default' => 'ca_d8.',
'users' => 'ncd_d8.',
'users_field_data' => 'ncd_d8.',
'sessions' => 'ncd_d8.',

but again, this all works fine on the actual Drupal installations themselves, Drush is the only thing having a problem

weitzman commented 8 years ago

zaphod - please post the exact commands you are using when you post those debug logs. i'm not sure if you are passing --uri and what the value is.

Also, please try pm-updatestatus and then pm-updatecode. pm-updatestatus does no redispatching whereas pm-updatecode does dispatch to pm-updatestatus and I think thats where Drush's confusion starts. Don't use pm-update for now and focus on the above two commands (those are part of pm-update, along with updatedb). Thanks.

zaphod-42 commented 8 years ago

Sorry about that, the commands I ran:

drush -l controlanything status --debug
drush -l controlanything pm-update --debug

I also missed the alias file, which I opened and found about 100 lines of arrays defining $aliases['self'] to various sites, I fixed it by trimming it to the 3 for my 3 sites (default and 2 others) and settings the keys accordingly.

This all seems to have helped, at the least I can clear caches on all of the sites now via drush @sites cr, but when I try to run drush @sites ws or drush @controlanything ws I get:

Drupal\Core\DependencyInjection\ContainerNotInitializedException: \Drupal::$container is not initialized yet. \Drupal::setContainer() must be called with a real container. in /var/www/html/core/lib/Drupal.php

I'll work on debugging this since it's obviously not the problem I started with. Thank you

zaphod-42 commented 8 years ago

I was apparently wrong, only the ws command gives me that warning, trying pm-update or pm-updatestatus continue to give the bootstrap error:

Command pm-updatestatus needs a higher bootstrap level to run - you will need to invoke drush from a more functional Drupal environment to run this command.
anabrownee commented 7 years ago

@zaphod-42 how did you fix it? Have you fixed it?