deployer: Deploy freezes

Q A
Issue Type Question
Deployer Version 6.0.3
Local Machine OS macOS 10.13.1 (High Sierra)
Remote Machine OS Debian Jessie 8.5

Description

Deployer is stucked during deploy:prepare command. I have tried multiplexing and forwardAgent combination true or false with no effect.

Steps to reproduce

dep deploy

Content of deploy.php

<?php
namespace Deployer;

require 'recipe/symfony3.php';

// Project name
set('application', 'hourglass');

// Project repository
set('repository', 'git@gitlab.com:xxx/hourglass.git');

// [Optional] Allocate tty for git clone. Default value is false.
set('git_tty', true); 

// Shared files/dirs between deploys 
add('shared_files', []);
add('shared_dirs', []);

// Writable dirs by web server 
add('writable_dirs', []);

// Hosts
host('access.snackhost.eu')
    ->user('xxx')
    ->configFile('~/.ssh/config')
    ->identityFile('~/.ssh/id_rsa')
//    ->multiplexing(true)
//    ->forwardAgent(false)
    ->port(22)
    ->set('deploy_path', '/home/xxx/deploys/hourglass');
    
// Tasks

task('build', function () {
    run('cd {{release_path}} && build');
});

// [Optional] if deploy fails automatically unlock.
after('deploy:failed', 'deploy:unlock');

// Migrate database before symlink new release.

before('deploy:symlink', 'database:migrate');

Output log

dep deploy -vvv
[localhost] > export SYMFONY_ENV='prod'; git rev-parse --abbrev-ref HEAD
[localhost] < master
✈︎ Deploying master on access.snackhost.eu
• done on [access.snackhost.eu]
➤ Executing task deploy:prepare
[access.snackhost.eu] > export SYMFONY_ENV='prod'; echo $0
[access.snackhost.eu] < bash

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 18 (9 by maintainers)

Most upvoted comments

@antonmedv thanks, i will try with increased timeout. Additionally, I’ll debug with --log deploy.log. I just learned about this awesome option…

@stefax set global timeout:

set('default_timeout', 3400);

@antonmedv, I change timeout to 2s, this is what I get:

[Symfony\Component\Process\Exception\ProcessTimedOutException]                                                                                  
The process "ssh -A -p 22 -i ~/.ssh/deploy -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no sepiasofteu@access.snackhost.eu  'bash -s; printf "[exit_code:%s]" $?;'" exceeded the timeout of 2 seconds.

When I try to run this command directly from CLI I get connected.