deployer icon indicating copy to clipboard operation
deployer copied to clipboard

Setup task randomly fails

Open AntoineAresu opened this issue 1 year ago • 2 comments

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!

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

AntoineAresu avatar Mar 29 '24 13:03 AntoineAresu

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

tcheymol avatar Mar 29 '24 13:03 tcheymol

You might try this configuration : https://github.com/deployphp/deployer/issues/3558#issuecomment-2027081478

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

gbobts avatar Apr 02 '24 07:04 gbobts

This issue has been automatically closed. Please, open a discussion for bug reports and feature requests.

Read more: [https://github.com/deployphp/deployer/discussions/3888]

github-actions[bot] avatar Sep 09 '24 20:09 github-actions[bot]

This issue has been automatically closed. Please, open a discussion for bug reports and feature requests.

Read more: [https://github.com/deployphp/deployer/discussions/3888]

github-actions[bot] avatar Sep 09 '24 20:09 github-actions[bot]