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

Setup task randomly fails #3798

Open
AntoineAresu opened this issue Mar 29, 2024 · 2 comments
Open

Setup task randomly fails #3798

AntoineAresu opened this issue Mar 29, 2024 · 2 comments

Comments

@AntoineAresu
Copy link

Situation:

On a symfony project, I use proxy jump to reach target server through a bastion.
I'm migrating deploy tool from an easycorp/easydeploybundle fork, which works well, but is no longer maintained.

Issue:

Even if i'm sometime able to deploy, the setup task randomly fails.

Config :
Symfony : 6.3
Deployer : 7.3.3

// ssh config
Host hostname
	User user
	Hostname bastionurl
	ForwardAgent yes
	ProxyJump  www-data@address
// host configuration
host('hostname')
    ->setForwardAgent(true)
    ->set('config_file', '~/.ssh/config')
    ->set('deploy_path', '~/www')
    ->setSshMultiplexing(true)
    ->set('http_user', 'user');

Output :

task deploy:info
[hostname] /usr/bin/php8.2 /home/user/Work/vault/vendor/deployer/deployer/dep worker --port 41007 --task deploy:info --host hostname --decorated -vvv
[hostname] info deploying development
done on hostname
done deploy:info 122ms
task deploy:setup
[hostname] /usr/bin/php8.2 /home/user/Work/vault/vendor/deployer/deployer/dep worker --port 41007 --task deploy:setup --host hostname --decorated -vvv
[hostname] ssh '-F' '/home/user/.ssh/config' '-A' '-o' 'ControlMaster=auto' '-o' 'ControlPersist=60' '-o' 'ControlPath=~/.ssh/hostname' 'hostname ': 369f170a5680d20ec1ea; bash -ls'
[vault-pp] run [ -d ~/www ] || mkdir -p ~/www;
cd ~/www;
[ -d .dep ] || mkdir .dep;
[ -d releases ] || mkdir releases;
[ -d shared ] || mkdir shared;
[hostname]  error  in setup.php on line 6:
[hostname] exit code -1 (Unknown error)
done deploy:setup 2s 158ms
ERROR: Task deploy:setup failed!
task deploy:failed
[hostname] /usr/bin/php8.2 /home/user/Work/vault/vendor/deployer/deployer/dep worker --port 41007 --task deploy:failed --host hostname --decorated -vvv
done on hostname
done deploy:failed 90ms
task deploy:unlock
[hostname] /usr/bin/php8.2 /home/user/Work/vault/vendor/deployer/deployer/dep worker --port 41007 --task deploy:unlock --host hostname --decorated -vvv
[hostname ssh '-F' '/home/user/.ssh/config' '-A' '-o' 'ControlMaster=auto' '-o' 'ControlPersist=60' '-o' 'ControlPath=~/.ssh/hostname' 'hostname' ': c818b48aa46313af89da; bash -ls'
[hostname] run rm -f ~/www/.dep/deploy.lock
[hostname] 
[hostname] Echec de la connexion à la cible secondaire
[hostname]  error  in lock.php on line 21:
[hostname] exit code -1 (Unknown error)
done deploy:unlock 2s 644ms
ERROR: Task deploy:unlock failed!
@AntoineAresu AntoineAresu changed the title Setup Setup task randomly fails Mar 29, 2024
@tcheymol
Copy link

tcheymol commented Mar 29, 2024

I get the same problem here, my host is a bastion server that connects to a secondary target. The bastion is IP whitelisted, this explains the proxy jump

@gbobts
Copy link
Contributor

gbobts commented Apr 2, 2024

You might try this configuration : #3558 (comment)

It might help to determine whether the issue is related to deployer, or your environment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants