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

The command "./vendor/bin/blt recipes:cloud-hooks:init" failed. #3762

Closed
Sushant-verma opened this issue Jul 19, 2019 · 5 comments
Closed

The command "./vendor/bin/blt recipes:cloud-hooks:init" failed. #3762

Sushant-verma opened this issue Jul 19, 2019 · 5 comments
Labels
Support A support request

Comments

@Sushant-verma
Copy link

Describe the bug
I am trying to update acquia BLT from version 8.9 to 10.2.0

To Reproduce
Steps to reproduce the behavior, ideally starting from a fresh install of BLT:

  1. Run composer update acquia/blt --with-all-dependencies
  2. It will update all dependencies
  3. when it try to run blt update, it`s try to update hook_update_n
  4. See error
`update_9001000: Add deployment_identifier to .gitignore, fix ci.blt.yml. 
- update_9001001: Adjust Drush 9 Composer contrib directory. 
- update_9002000: Factory Hooks Drush 9 fixes for db-update. 
- update_10000000: 10.x Updates.
- update_10000001: Move Drupal modules to project composer.json.
- update_10000002: Regenerate cloud hooks if necessary. 
- update_10001000: Remove composer autoload optimizations.   
Would you like to perform the listed updates? (y/n) y 
Executing updates...
-> update_9001000: Add deployment_identifier to .gitignore, fix ci.blt.yml.                                                                                                                                                                                                                                                                                .gitignore has been updated. Review it for any custom changes that may have been overwritten.                                                                                                                                                                                                                                                                                                                                                                                                                                          blt/ci.blt.yml has been updated. Review it for any custom changes that may have been overwritten. 
Updated /var/www/bayer-content-hub/composer.json. Review changes, then re-run composer update. 
-> update_9001001: Adjust Drush 9 Composer contrib directory.  
Your composer.json file has been modified to be compatible with Drush 9. 
You must execute `composer update --lock` to update your lock file. 
-> update_9002000: Factory Hooks Drush 9 fixes for db-update.    
-> update_10000000: 10.x Updates.
[error]  The command "./vendor/bin/blt recipes:cloud-hooks:init" failed.   
Exit Code: 126(Invoked command cannot execute)    
Working directory: /var/www/bayer-content-hub     
Output:  
================    
Error Output:   
================                                                                                                                                                             sh: 1: ./vendor/bin/blt: Permission denied
--`

Expected behavior
Expecting update successfully

System information

  • Operating system type: window 10 ( drupal VM)
  • Operating system version: window 10 ( drupal VM - ubuntu)
  • BLT version: trying to update 10.2.0 from 8.9
@Sushant-verma Sushant-verma added the Bug Something isn't working label Jul 19, 2019
@danepowell
Copy link
Contributor

You cannot upgrade directly from 8.9.x to 10.x. You'll need to at least update to 9.2.x first (9.2.8 is the latest release there.)

In general if you encounter problems like this while upgrading, it's best to only upgrade one major version at a time to see if the problem goes away, or at least isolate it to a specific update.

@danepowell danepowell added Awaiting response Maintainer needs more info Support A support request and removed Bug Something isn't working labels Jul 22, 2019
@Sushant-verma
Copy link
Author

Thanks @danepowell ,

I tried to Upgrade blt version to 9.2.8, but getting same error. all hooks are ran successfully. But the hook that contain ./vendor/bin/blt recipes:cloud-hooks:init not running successfully.


-> update_9002000: Factory Hooks Drush 9 bug fixes and enhancements for db-update. 
-> update_9002004: Regenerate Pipelines file if it exists.  
sh: 1: ./vendor/bin/blt: Permission denied 
[error]  The command "./vendor/bin/blt recipes:cloud-hooks:init" failed.    
Exit Code: 126(Invoked command cannot execute)  
Working directory: /var/www/site-name   
Output:      
================ 
Error Output:  
================   
sh: 1: ./vendor/bin/blt: Permission denied
--

I am running blt update command in vagrant ssh. Look like there is some permission issue in /bin/blt file.

@no-response no-response bot removed the Awaiting response Maintainer needs more info label Jul 24, 2019
@danepowell
Copy link
Contributor

You shouldn't need to run blt update manually. Run composer update on the host machine, and blt updates should run automatically. If not try running them on the host. Doing any sort of heavy file I/O in a VM is begging for trouble.

Additionally, you should check why the blt bin cannot be accessed. Does it not exist? Owned by root? No exec permission? etc...

@danepowell danepowell added the Awaiting response Maintainer needs more info label Jul 24, 2019
@Sushant-verma
Copy link
Author

Thanks @danepowell , I upgraded blt to 9.2.8 as per your suggestion , and also its working , but After upgrading I am not able to sync DB.

Getting Below Error

`                                                                              
  [Symfony\Component\Process\Exception\ProcessFailedException]                 
  The command "ssh -o PasswordAuthentication=no site.dev@staging-2814  
  7.prod.hosting.acquia.com 'drush9 sql-dump --create-db --target-dump=/tmp/t  
  mp.target.sql.gz --ansi --no-interaction --structure-tables-key=lightweight  
   --strict=0 --gzip --result-file=auto --backend=json --uri=-  
  dev. --root=/var/www/html/.dev/docroot'" failed  
  .                                                                            
                                                                               
  Exit Code: 1(General error)                                                  
                                                                               
  Working directory:                                                           
                                                                               
  Output:                                                                      
  ================                                                             
  \DRUSH_BACKEND_OUTPUT_START>>>{"output":"","object":[],"error_status":1,"lo  
  g":[{"type":"preflight","message":"Drush preflight prepare loaded autoloade  
  r at \/mnt\/www\/html\/dev\/vendor\/autoload.php","timestamp":1  
  564394500.5909491,"memory":4482680,"error":null},{"type":"preflight","messa  
  ge":"Starting Drush preflight.","timestamp":1564394500.593462,"memory":4483  
  160,"error":null},{"type":"bootstrap","message":"Loading drushrc \"\/etc\/d  
  rush\/drushrc.php\" into \"system\" scope.","timestamp":1564394500.5956609,  
  "memory":4699472,"error":null},{"type":"debug","message":"Cache HIT cid: 8.  
  1.16-commandfiles-0-50f0624f427ab31ec5f3231572f2e13c","timestamp":156439450  
  0.606519,"memory":4749728,"error":null},{"type":"bootstrap","message":"Load  
  ing drushrc \"\/mnt\/www\/html\/dev\/drush\/drushrc.php\" into   
  \"drupal\" scope.","timestamp":1564394500.6295259,"memory":7230064,"error":  
  null},{"type":"debugnotify","message":"Scanning into \/etc\/drush for \/.*a  
  liases\\.drush(8|)rc\\.php$\/","timestamp":1564394500.6610811,"memory":9301  
  752,"error":null},{"type":"debugnotify","message":"Scanning into \/etc\/dru  
  sh for \/self\\.alias\\.drush(8|)rc\\.php$\/","timestamp":1564394500.661192  
  9,"memory":9302400,"error":null},{"type":"debugnotify","message":"Scanning   
  into \/mnt\/www\/html\/dev\/vendor\/drush\/drush\/includes\/..   
  for \/.*aliases\\.drush(8|)rc\\.php$\/","timestamp":1564394500.661258,"memo  
  ry":9303032,"error":null},{"type":"debugnotify","message":"Scanning into \/  
  mnt\/www\/html\/bayercorpcomdev\/vendor\/drush\/drush\/includes\/.. for \/s  
  elf\\.alias\\.drush(8|)rc\\.php$\/","timestamp":1564394500.6631291,"memory"  
  :9304040,"error":null},{"type":"debugnotify","message":"Scanning into \/hom  
  e\/bayercorpcom\/.drush for \/.*aliases\\.drush(8|)rc\\.php$\/","timestamp"  
  :1564394500.664762,"memory":9304992,"error":null},{"type":"debugnotify","me  
  ssage":"Scanning into \/home\/bayercorpcom\/.drush for \/self\\.alias\\.dru  
  sh(8|)rc\\.php$\/","timestamp":1564394500.665354,"memory":9305576,"error":n  
  ull},{"type":"debugnotify","message":"Scanning into \/mnt\/drush\/bayercorp  
  com for \/.*aliases\\.drush(8|)rc\\.php$\/","timestamp":1564394500.6658189,  
  "memory":9306208,"error":null},{"type":"debugnotify","message":"Scanning in  
  to \/mnt\/drush\/bayercorpcom for \/self\\.alias\\.drush(8|)rc\\.php$\/","t  
  imestamp":1564394500.6659081,"memory":9307272,"error":null},{"type":"debugn  
  otify","message":"Scanning into \/mnt\/www\/html\/bayercorpcomdev\/docroot\  
  /..\/drush\/site-aliases for \/.*aliases\\.drush(8|)rc\\.php$\/","timestamp  
  ":1564394500.665966,"memory":9307904,"error":null},{"type":"debugnotify","m  
  essage":"Scanning into \/mnt\/www\/html\/bayercorpcomdev\/docroot\/..\/drus  
  h\/site-aliases for \/self\\.alias\\.drush(8|)rc\\.php$\/","timestamp":1564  
  394500.666003,"memory":9308680,"error":null},{"type":"debugnotify","message  
  ":"Scanning into \/mnt\/www\/html\/bayercorpcomdev\/docroot\/drush for \/.*  
  aliases\\.drush(8|)rc\\.php$\/","timestamp":1564394500.6660309,"memory":930  
  9312,"error":null},{"type":"debugnotify","message":"Scanning into \/mnt\/ww  
  w\/html\/bayercorpcomdev\/docroot\/drush for \/self\\.alias\\.drush(8|)rc\\  
  .php$\/","timestamp":1564394500.666044,"memory":9309944,"error":null},{"typ  
  e":"debugnotify","message":"Scanning into \/mnt\/www\/html\/bayercorpcomdev  
  \/docroot\/sites\/all\/drush for \/.*aliases\\.drush(8|)rc\\.php$\/","times  
  tamp":1564394500.6660571,"memory":9311216,"error":null},{"type":"debugnotif  
  y","message":"Scanning into \/mnt\/www\/html\/bayercorpcomdev\/docroot\/sit  
  es\/all\/drush for \/self\\.alias\\.drush(8|)rc\\.php$\/","timestamp":15643  
  94500.66607,"memory":9311848,"error":null},{"type":"debugnotify","message":  
  "Scanning into \/mnt\/www\/html\/bayercorpcomdev\/docroot\/sites\/canwelive  
  better-dev.mirum.technology for \/.*aliases\\.drush(8|)rc\\.php$\/","timest  
  amp":1564394500.6660819,"memory":9312480,"error":null},{"type":"debugnotify  
  ","message":"Scanning into \/mnt\/www\/html\/bayercorpcomdev\/docroot\/site  
  s\/c for \/self\\.alias\\.drush(8|)rc\\.  
  php$\/","timestamp":1564394500.6660941,"memory":9313112,"error":null},{"typ  
  e":"bootstrap","message":"Bootstrap to phase 0.","timestamp":1564394500.671  
  0479,"memory":9321408,"error":null},{"type":"bootstrap","message":"Bootstra  
  p to phase -1.","timestamp":1564394500.6713231,"memory":9324848,"error":nul  
  l},{"type":"bootstrap","message":"Found command: sql-dump (commandfile=sql)  
  ","timestamp":1564394500.671392,"memory":9325504,"error":null},{"type":"deb  
  ug","message":"Calling hook drush_sql_dump","timestamp":1564394500.6744959,  
  "memory":9515416,"error":null},{"type":"bootstrap","message":"Drush bootstr  
  ap phase : bootstrap_drupal_root()","timestamp":1564394500.676424,"memory":  
  9717040,"error":null},{"type":"bootstrap","message":"Loading drushrc \"\/mn  
  t\/www\/html\/bayercorpcomdev\/drush\/drushrc.php\" into \"drupal\" scope."  
  ,"timestamp":1564394500.6765001,"memory":9718360,"error":null},{"type":"boo  
  tstrap","message":"Initialized Drupal 8.7.2 root directory at \/mnt\/www\/h  
  tml\/bayercorpcomdev\/docroot","timestamp":1564394500.6797709,"memory":9724  
  192,"error":null},{"type":"debug","message":"Find command files for phase 1  
   (max=3)","timestamp":1564394500.6807699,"memory":8477832,"error":null},{"t  
  ype":"debug","message":"Cache HIT cid: 8.1.16-commandfiles-1-a25cf870c81ad7  
  8af6c52f327c931beb","timestamp":1564394500.6817441,"memory":8480464,"error"  
  :null},{"type":"debug","message":"Cache HIT cid: 8.1.16-annotationfiles-1-8  
  9c7339a6b7b5f23ec5e8e3f2a2b0c94","timestamp":1564394500.6834431,"memory":85  
  53512,"error":null},{"type":"bootstrap","message":"Drush bootstrap phase :   
  bootstrap_drupal_site()","timestamp":1564394500.690423,"memory":9100704,"er  
  ror":null},{"type":"bootstrap","message":"Initialized Drupal site canwelive  
  better-dev.mirum.technology at sites\/default","timestamp":1564394500.69049  
  81,"memory":9101408,"error":null},{"type":"debug","message":"Find command f  
  iles for phase 2 (max=3)","timestamp":1564394500.6943209,"memory":9103320,"  
  error":null},{"type":"debug","message":"Cache HIT cid: 8.1.16-install_profi  
  le-66ecfeb9791a023150773849f1550c5d","timestamp":1564394500.695226,"memory"  
  :9105112,"error":null},{"type":"debug","message":"Cache HIT cid: 8.1.16-com  
  mandfiles-2-c7498ca50f943bb481cba34d3c189113","timestamp":1564394500.696074  
  ,"memory":9108672,"error":null},{"type":"bootstrap","message":"Drush bootst  
  rap phase : bootstrap_drupal_configuration()","timestamp":1564394500.701224  
  1,"memory":9589280,"error":null},{"type":"debug","message":"Create from req  
  uest","timestamp":1564394500.7013979,"memory":9602448,"error":null},{"type"  
  :"debug","message":"add service modifier","timestamp":1564394500.7116809,"m  
  emory":10115216,"error":null},{"type":"debug","message":"Find command files  
   for phase 3 (max=3)","timestamp":1564394500.7117269,"memory":10116512,"err  
  or":null},{"type":"debug","message":"Returned from hook drush_sql_dump","ti  
  mestamp":1564394500.7424331,"memory":10207288,"error":null},{"type":"notice  
  ","message":"Command dispatch complete","timestamp":1564394500.74259,"memor  
  y":10146736,"error":null}],"error_log":{"DRUSH_SQL_DUMP_FAIL":["Database du  
  mp failed"]},"self":{"root":"\/mnt\/www\/html\/bayercorpcomdev\/docroot","u  
  ri":"canwelivebetter-dev.mirum.technology","path-aliases":{"%root":"\/mnt\/  
  www\/html\/bayercorpcomdev\/docroot"}},"context":{"alias-path":["\/mnt\/dru  
  sh\/bayercorpcom","\/home\/bayercorpcom\/.drush"],"config-file":"\/mnt\/www  
  \/html\/bayercorpcomdev\/drush\/drushrc.php","context-path":"\/mnt\/www\/ht  
  ml\/bayercorpcomdev\/drush\/drushrc.php","config":["\/mnt\/www\/html\/bayer  
  corpcomdev\/vendor\/acquia\/blt\/drush\/drushrc.php"],"php":"\/usr\/local\/  
  php7.1\/bin\/php","php-options":"","create-db":true,"target-dump":"\/tmp\/t  
  mp.target.sql.gz","ansi":true,"no-interaction":true,"structure-tables-key":  
  "lightweight","strict":"0","gzip":true,"result-file":"auto","backend":"json  
  ","uri":"canwelivebetter-dev.mirum.technology","root":"\/var\/www\/html\/ba  
  yercorpcom.dev\/docroot"}}<<<DRUSH_BACKEND_OUTPUT_END                        
                                                                               
  Error Output:                                                                
  ================                                                             
  \DRUSH_BACKEND:{"type":"bootstrap","message":"Bootstrap to phase 0.","times  
  tamp":1564394500.6710479,"memory":9321408,"error":null,"packet":"log"}       
  \\DRUSH_BACKEND:{"type":"bootstrap","message":"Bootstrap to phase -1.","tim  
  estamp":1564394500.6713231,"memory":9324848,"error":null,"packet":"log"}     
  \\DRUSH_BACKEND:{"type":"bootstrap","message":"Found command: sql-dump (com  
  mandfile=sql)","timestamp":1564394500.671392,"memory":9325504,"error":null,  
  "packet":"log"}                                                              
  \\DRUSH_BACKEND:{"type":"debug","message":"Calling hook drush_sql_dump","ti  
  mestamp":1564394500.6744959,"memory":9515416,"error":null,"packet":"log"}    
  \\DRUSH_BACKEND:{"type":"bootstrap","message":"Drush bootstrap phase : boot  
  strap_drupal_root()","timestamp":1564394500.676424,"memory":9717040,"error"  ;49m
  :null,"packet":"log"}                                                        
  \\DRUSH_BACKEND:{"type":"bootstrap","message":"Loading drushrc \"\/mnt\/www  
  \/html\/bayercorpcomdev\/drush\/drushrc.php\" into \"drupal\" scope.","time  
  stamp":1564394500.6765001,"memory":9718360,"error":null,"packet":"log"}      
  \\DRUSH_BACKEND:{"type":"bootstrap","message":"Initialized Drupal 8.7.2 roo  
  t directory at \/mnt\/www\/html\/bayercorpcomdev\/docroot","timestamp":1564  
  394500.6797709,"memory":9724192,"error":null,"packet":"log"}                 
  \\DRUSH_BACKEND:{"type":"debug","message":"Find command files for phase 1 (  
  max=3)","timestamp":1564394500.6807699,"memory":8477832,"error":null,"packe  
  t":"log"}                                                                    
  \\DRUSH_BACKEND:{"type":"debug","message":"Cache HIT cid: 8.1.16-commandfil  
  es-1-a25cf870c81ad78af6c52f327c931beb","timestamp":1564394500.6817441,"memo  
  ry":8480464,"error":null,"packet":"log"}                                     
  \\DRUSH_BACKEND:{"type":"debug","message":"Cache HIT cid: 8.1.16-annotation  
  files-1-89c7339a6b7b5f23ec5e8e3f2a2b0c94","timestamp":1564394500.6834431,"m  
  emory":8553512,"error":null,"packet":"log"}                                  
  \\DRUSH_BACKEND:{"type":"bootstrap","message":"Drush bootstrap phase : boot  
  strap_drupal_site()","timestamp":1564394500.690423,"memory":9100704,"error"  
  :null,"packet":"log"}                                                        
  \\DRUSH_BACKEND:{"type":"bootstrap","message":"Initialized Drupal site canw  
  elivebetter-dev.mirum.technology at sites\/default","timestamp":1564394500.  
  6904981,"memory":9101408,"error":null,"packet":"log"}                        
  \\DRUSH_BACKEND:{"type":"debug","message":"Find command files for phase 2 (  
  max=3)","timestamp":1564394500.6943209,"memory":9103320,"error":null,"packe  
  t":"log"}                                                                    
  \\DRUSH_BACKEND:{"type":"debug","message":"Cache HIT cid: 8.1.16-install_pr  
  ofile-66ecfeb9791a023150773849f1550c5d","timestamp":1564394500.695226,"memo  
  ry":9105112,"error":null,"packet":"log"}                                     
  \\DRUSH_BACKEND:{"type":"debug","message":"Cache HIT cid: 8.1.16-commandfil  
  es-2-c7498ca50f943bb481cba34d3c189113","timestamp":1564394500.696074,"memor  
  y":9108672,"error":null,"packet":"log"}                                      
  \\DRUSH_BACKEND:{"type":"bootstrap","message":"Drush bootstrap phase : boot  
  strap_drupal_configuration()","timestamp":1564394500.7012241,"memory":95892  
  80,"error":null,"packet":"log"}                                              
37;41m  \\DRUSH_BACKEND:{"type":"debug","message":"Create from request","timestamp"  
  :1564394500.7013979,"memory":9602448,"error":null,"packet":"log"}            
  \\DRUSH_BACKEND:{"type":"debug","message":"add service modifier","timestamp  
  ":1564394500.7116809,"memory":10115216,"error":null,"packet":"log"}          
  \\DRUSH_BACKEND:{"type":"debug","message":"Find command files for phase 3 (  
  max=3)","timestamp":1564394500.7117269,"memory":10116512,"error":null,"pack  
  et":"log"}                                                                   
  \sh: 1: cannot create auto.gz: Permission denied                             
  mysqldump: Got errno 32 on write                                             
  \DRUSH_BACKEND:{"error":"DRUSH_SQL_DUMP_FAIL","message":"Database dump fail  
  ed","packet":"set_error"}                                                    
  \\DRUSH_BACKEND:{"type":"debug","message":"Returned from hook drush_sql_dum  
  p","timestamp":1564394500.7424331,"memory":10207288,"error":null,"packet":"  
  log"}                                                                        
  \\DRUSH_BACKEND:{"type":"notice","message":"Command dispatch complete","tim  
  estamp":1564394500.74259,"memory":10146736,"error":null,"packet":"log"}      
  \\DRUSH_BACKEND:{"type":"debug","message":"Cache MISS cid: 8.1.16-alias-pat  
1m  h--24bd429f34a9d7b63a8367f2ba6e80b6","timestamp":1564394500.7447081,"memory  
  ":10346416,"error":null,"packet":"log"}`

@no-response no-response bot removed the Awaiting response Maintainer needs more info label Jul 29, 2019
@danepowell
Copy link
Contributor

Did you do anything to try to debug the issue? If you simply google the error "cannot create auto.gz" the first result is another BLT issue with a lot of helpful debugging info: #2641

Specifically, you probably need to deploy a newer version of Drush to your remote environment.

We are getting very far from the original issue here so I'm going to close this. If you continue to have problems please open new issues so we can keep the discussion linear and organized. Thanks.

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