| Q | A
| ----------------- | ---
| Issue Type | Bug
| Deployer Version | 4.3.0
| Local Machine OS | Ubuntu 16.04
| Remote Machine OS | Ubuntu 16.04
Description
Deployment up until deploy:vendors is successful. When I run the ssh command shown in the exception output, I receive the same error output with a blinking cursor
Warning: Permanently added '162.13.127.83' (ECDSA) to the list of known hosts.
Steps to reproduce
Content of deploy.php
<?php
namespace Deployer;
require 'recipe/common.php';
// Configuration
set('ssh_type', 'native');
set('ssh_multiplexing', false);
set('repository', '[email protected]:daykinstorey/blizzard-2017.git');
set('shared_files', []);
set('shared_dirs', []);
set('writable_dirs', []);
// Servers
server('production', '162.13.127.83')
->forwardAgent()
// ->identityFile('/home/vagrant/.ssh/blizzard.pub', '/home/vagrant/.ssh/blizzard')
->set('deploy_path', '~/webapps/theblizzardtest');
// Tasks
desc('Restart PHP-FPM service');
task('php-fpm:restart', function () {
// The user must have rights for restart service
// /etc/sudoers: username ALL=NOPASSWD:/bin/systemctl restart php-fpm.service
run('sudo systemctl restart php71rc-fpm.service');
});
after('deploy:symlink', 'php-fpm:restart');
desc('Deploy your project');
task('deploy', [
'deploy:prepare',
'deploy:lock',
'deploy:release',
'deploy:update_code',
'deploy:shared',
'deploy:writable',
'deploy:vendors',
'deploy:clear_paths',
'deploy:symlink',
'deploy:unlock',
'cleanup',
'success'
]);
// [Optional] if deploy fails automatically unlock.
after('deploy:failed', 'deploy:unlock');
Output log
agrant@blizzard-dev:~/blizzard-dev$ vendor/bin/dep deploy production -vvv
➤ Executing task deploy:prepare
echo $0[production] > echo $0
[production] < bash
if [ ! -d ~/webapps/theblizzardtest ]; then mkdir -p ~/webapps/theblizzardtest; fi[production] > if [ ! -d ~/webapps/theblizzardtest ]; then mkdir -p ~/webapps/theblizzardtest; fi
if [ ! -L ~/webapps/theblizzardtest/current ] && [ -d ~/webapps/theblizzardtest/current ]; then echo true; fi[production] > if [ ! -L ~/webapps/theblizzardtest/current ] && [ -d ~/webapps/theblizzardtest/current ]; then echo true; fi
cd ~/webapps/theblizzardtest && if [ ! -d .dep ]; then mkdir .dep; fi[production] > cd ~/webapps/theblizzardtest && if [ ! -d .dep ]; then mkdir .dep; fi
cd ~/webapps/theblizzardtest && if [ ! -d releases ]; then mkdir releases; fi[production] > cd ~/webapps/theblizzardtest && if [ ! -d releases ]; then mkdir releases; fi
cd ~/webapps/theblizzardtest && if [ ! -d shared ]; then mkdir shared; fi[production] > cd ~/webapps/theblizzardtest && if [ ! -d shared ]; then mkdir shared; fi
• done on [production]
✔ Ok [3s 890ms]
➤ Executing task deploy:lock
if [ -f ~/webapps/theblizzardtest/.dep/deploy.lock ]; then echo 'true'; fi[production] > if [ -f ~/webapps/theblizzardtest/.dep/deploy.lock ]; then echo 'true'; fi
touch ~/webapps/theblizzardtest/.dep/deploy.lock[production] > touch ~/webapps/theblizzardtest/.dep/deploy.lock
• done on [production]
✔ Ok [1s 188ms]
➤ Executing task deploy:release
if [ -h release ]; then echo 'true'; fi[production] > cd ~/webapps/theblizzardtest && (if [ -h release ]; then echo 'true'; fi)
[production] < true
rm -rf "$(readlink release)"[production] > cd ~/webapps/theblizzardtest && (rm -rf "$(readlink release)")
rm release[production] > cd ~/webapps/theblizzardtest && (rm release)
[ -d releases ] && [ "$(ls -A releases)" ] && echo "true" || echo "false"[production] > cd ~/webapps/theblizzardtest && ([ -d releases ] && [ "$(ls -A releases)" ] && echo "true" || echo "false")
[production] < true
cd releases && ls -t -1 -d */[production] > cd ~/webapps/theblizzardtest && (cd releases && ls -t -1 -d */)
[production] < 1/
if [ -f .dep/releases ]; then echo "true"; fi[production] > cd ~/webapps/theblizzardtest && (if [ -f .dep/releases ]; then echo "true"; fi)
[production] < true
tail -n 15 .dep/releases[production] > cd ~/webapps/theblizzardtest && (tail -n 15 .dep/releases)
[production] < 20170413155243,1
[production] < 20170413155711,1
[production] < 20170413155902,1
[production] < 20170413160049,1
[production] < 20170413160129,2
[production] < 20170413160422,2
[production] < 20170413160553,2
[production] < 20170413160955,2
[production] < 20170418080346,2
[production] < 20170418080839,2
[production] < 20170418082132,2
[production] < 20170418083340,2
[production] < 20170418083751,2
[production] < 20170418083842,2
[production] < 20170418091436,2
if [ -d ~/webapps/theblizzardtest/releases/2 ]; then echo 'true'; fi[production] > cd ~/webapps/theblizzardtest && (if [ -d ~/webapps/theblizzardtest/releases/2 ]; then echo 'true'; fi)
date +"%Y%m%d%H%M%S"[production] > cd ~/webapps/theblizzardtest && (date +"%Y%m%d%H%M%S")
[production] < 20170418092534
echo '20170418092534,2' >> .dep/releases[production] > cd ~/webapps/theblizzardtest && (echo '20170418092534,2' >> .dep/releases)
mkdir ~/webapps/theblizzardtest/releases/2[production] > cd ~/webapps/theblizzardtest && (mkdir ~/webapps/theblizzardtest/releases/2)
if [[ "$(man ln)" =~ "--relative" ]]; then echo "true"; fi[production] > cd ~/webapps/theblizzardtest && (if [[ "$(man ln)" =~ "--relative" ]]; then echo "true"; fi)
[production] < true
ln -nfs --relative ~/webapps/theblizzardtest/releases/2 ~/webapps/theblizzardtest/release[production] > cd ~/webapps/theblizzardtest && (ln -nfs --relative ~/webapps/theblizzardtest/releases/2 ~/webapps/theblizzardtest/release)
• done on [production]
✔ Ok [15s 592ms]
➤ Executing task deploy:update_code
which git[production] > which git
[production] < /usr/bin/git
/usr/bin/git version[production] > /usr/bin/git version
[production] < git version 2.7.4
if [ -h ~/webapps/theblizzardtest/release ]; then echo 'true'; fi[production] > if [ -h ~/webapps/theblizzardtest/release ]; then echo 'true'; fi
[production] < true
readlink ~/webapps/theblizzardtest/release[production] > readlink ~/webapps/theblizzardtest/release
[production] < releases/2
/usr/bin/git clone --recursive -q [email protected]:daykinstorey/blizzard-2017.git ~/webapps/theblizzardtest/releases/2 2>&1[production] > /usr/bin/git clone --recursive -q [email protected]:daykinstorey/blizzard-2017.git ~/webapps/theblizzardtest/releases/
2 2>&1
• done on [production]
✔ Ok [8s 63ms]
➤ Executing task deploy:shared
• done on [production]
✔ Ok [0ms]
➤ Executing task deploy:writable
• done on [production]
✔ Ok [0ms]
➤ Executing task deploy:vendors
if hash composer 2>/dev/null; then echo 'true'; fi[production] > if hash composer 2>/dev/null; then echo 'true'; fi
[production] < true
which composer[production] > which composer
[production] < /usr/sbin/composer
which php[production] > which php
➤ Executing task deploy:failed
• done on [production]
✔ Ok [2ms]
➤ Executing task deploy:unlock
rm -f ~/webapps/theblizzardtest/.dep/deploy.lock[production] > rm -f ~/webapps/theblizzardtest/.dep/deploy.lock
• done on [production]
✔ Ok [501ms]
[RuntimeException]
The command "ssh -A -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p '22' '162.13.127.83' bash -s" failed.
Exit Code: 1(General error)
Output:
================
Error Output:
================
Warning: Permanently added '1.13.127.83' (ECDSA) to the list of known hosts.
Exception trace:
() at /home/vagrant/blizzard-dev/vendor/deployer/deployer/src/Server/Remote/NativeSsh.php:103
Deployer\Server\Remote\NativeSsh->run() at /home/vagrant/blizzard-dev/vendor/deployer/deployer/src/functions.php:319
Deployer\run() at /home/vagrant/blizzard-dev/vendor/deployer/deployer/recipe/common.php:85
Deployer\{closure}() at n/a:n/a
call_user_func() at /home/vagrant/blizzard-dev/vendor/deployer/deployer/src/Server/Environment.php:125
Deployer\Server\Environment->get() at /home/vagrant/blizzard-dev/vendor/deployer/deployer/src/Server/Environment.php:175
Deployer\Server\Environment->parseCallback() at n/a:n/a
preg_replace_callback() at /home/vagrant/blizzard-dev/vendor/deployer/deployer/src/Server/Environment.php:161
Deployer\Server\Environment->parse() at /home/vagrant/blizzard-dev/vendor/deployer/deployer/src/Server/Environment.php:138
Deployer\Server\Environment->get() at /home/vagrant/blizzard-dev/vendor/deployer/deployer/src/Server/Environment.php:175
Deployer\Server\Environment->parseCallback() at n/a:n/a
preg_replace_callback() at /home/vagrant/blizzard-dev/vendor/deployer/deployer/src/Server/Environment.php:161
Deployer\Server\Environment->parse() at /home/vagrant/blizzard-dev/vendor/deployer/deployer/src/functions.php:752
Deployer\parse() at /home/vagrant/blizzard-dev/vendor/deployer/deployer/src/functions.php:294
Deployer\run() at /home/vagrant/blizzard-dev/vendor/deployer/deployer/recipe/deploy/vendors.php:12
Deployer\{closure}() at n/a:n/a
call_user_func() at /home/vagrant/blizzard-dev/vendor/deployer/deployer/src/Task/Task.php:85
Deployer\Task\Task->run() at /home/vagrant/blizzard-dev/vendor/deployer/deployer/src/Executor/SeriesExecutor.php:40
Deployer\Executor\SeriesExecutor->run() at /home/vagrant/blizzard-dev/vendor/deployer/deployer/src/Console/TaskCommand.php:103
Deployer\Console\TaskCommand->execute() at /home/vagrant/blizzard-dev/vendor/symfony/console/Command/Command.php:261
Symfony\Component\Console\Command\Command->run() at /home/vagrant/blizzard-dev/vendor/symfony/console/Application.php:843
Symfony\Component\Console\Application->doRunCommand() at /home/vagrant/blizzard-dev/vendor/deployer/deployer/src/Console/Application.php:123
Deployer\Console\Application->doRunCommand() at /home/vagrant/blizzard-dev/vendor/symfony/console/Application.php:189
Symfony\Component\Console\Application->doRun() at /home/vagrant/blizzard-dev/vendor/symfony/console/Application.php:120
Symfony\Component\Console\Application->run() at /home/vagrant/blizzard-dev/vendor/deployer/deployer/src/Deployer.php:190
Deployer\Deployer->run() at /home/vagrant/blizzard-dev/vendor/deployer/deployer/bin/dep:120
bug