I have a multisite enviroment and I'm trying to run drush updb
and drush cim
for the multisites using aliases.
To achieve this i created a wildcarded alias file like this in drush/sites:
alias.site.yml
# Command example: drush @alias.dev status
'*':
host: my.host.com
user: myuser
root: repo/docroot/sites/${env-name}.my.host.com
uri: https://${env-name}.my.host.com/
ssh:
options: '-o PasswordAuthentication=no -i ~/.ssh/ssh_file -p 19900'
If I rundrush @alias.dev cim
it is working properly.
If I run drush @alias.dev update:status
it is showing the pending entity updates.
However if i try to run drush @alias.dev updb
I get
The command "ssh -t -o PasswordAuthentication=no -i ~/.ssh/ssh_file -p 19900 myuser@my.host.com 'drush updb --uri=https ://dev.my.host.com/ --root=repo/docroot/sites/dev.my.host.com'" failed.
Exit Code: 1(General error)
Working directory:
Output:
Error Output:
--debug
tag gives me this:
Exception trace: at /home/myuser/repo/vendor/symfony/process/Process.php:235 Symfony\Component\Process\Process->mustRun() at /home/myuser/repo/vendor/drush/drush/src/Runtime/RedispatchHook.php:106 Drush\Runtime\RedispatchHook->redispatch() at /home/myuser/repo/vendor/drush/drush/src/Runtime/RedispatchHook.php:74 Drush\Runtime\RedispatchHook->redispatchIfRemote() at /home/myuser/repo/vendor/drush/drush/src/Runtime/RedispatchHook.php:60 Drush\Runtime\RedispatchHook->initialize() at /home/myuser/repo/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php:34 Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->callInitializeHook() at /home/myuser/repo/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php:27 Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->initialize() at /home/myuser/repo/vendor/consolidation/annotated-command/src/CommandProcessor.php:145 Consolidation\AnnotatedCommand\CommandProcessor->initializeHook() at /home/myuser/repo/vendor/consolidation/annotated-command/src/AnnotatedCommand.php:289 Consolidation\AnnotatedCommand\AnnotatedCommand->initialize() at /home/myuser/repo/vendor/symfony/console/Command/Command.php:221 Symfony\Component\Console\Command\Command->run() at /home/myuser/repo/vendor/symfony/console/Application.php:1005 Symfony\Component\Console\Application->doRunCommand() at /home/myuser/repo/vendor/symfony/console/Application.php:255 Symfony\Component\Console\Application->doRun() at /home/myuser/repo/vendor/symfony/console/Application.php:148 Symfony\Component\Console\Application->run() at /home/myuser/repo/vendor/drush/drush/src/Runtime/Runtime.php:118 Drush\Runtime\Runtime->doRun() at /home/myuser/repo/vendor/drush/drush/src/Runtime/Runtime.php:49 Drush\Runtime\Runtime->run() at /home/myuser/repo/vendor/drush/drush/drush.php:72 require() at /home/myuser/repo/vendor/drush/drush/includes/preflight.inc:18 drush_main() at phar:///usr/local/bin/drush/bin/drush.php:141 require() at /usr/local/bin/drush:10
As a workound it works like this:
drush updb --uri=https://dev.my.host.com
The Drush version is 9.7.1 and Drupal version is 8.8.1
options
key? ` - options: '-o PasswordAuthentication=no -i ~/.ssh/ssh_file -p 19900'` – Beau May 4 '20 at 18:21