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

Exit Code: 2 (Misuse of shell builtins) #33

Open
anacona16 opened this issue Aug 11, 2017 · 6 comments
Open

Exit Code: 2 (Misuse of shell builtins) #33

anacona16 opened this issue Aug 11, 2017 · 6 comments

Comments

@anacona16
Copy link

anacona16 commented Aug 11, 2017

Using PHP 7.1.7

This is my config file

use EasyCorp\Bundle\EasyDeployBundle\Deployer\DefaultDeployer;

return new class extends DefaultDeployer
{
    public function configure()
    {
        return $this->getConfigBuilder()
            ->server('user@host')
            ->deployDir('/var/www/vhosts/domain_deploy/')
            ->repositoryUrl('git@bitbucket.org:anacona16/repo.git')
            ->repositoryBranch('master')
            ->useSshAgentForwarding(false)
            ->sharedFilesAndDirs(['var/logs/', 'var/cache/', 'public/uploads/'])
            ->remoteComposerBinaryPath('/usr/bin/composer')
            ->configDir('config/')
            ->templatesDir('templates/')
            ->webDir('public/')
            ->resetOpCacheFor('http://www.domain.com')
        ;
    }
};

I got this error:

Initializing configuration
Starting the deployment
Updating app code
Preparing app
[ERROR] Cancelling the deployment and reverting the changes
A log file with all the error details has been generated in /var/www/vhosts/domain/var/logs/deploy_prod.log

14:53:30 ERROR     [console] Error thrown while running command "deploy -c 'config/deploy_prod.php'".

[Symfony\Component\Process\Exception\ProcessFailedException]                                                                                    
  The command "ssh user@host '(export SYMFONY_ENV=prod; cd /var/www/vhosts/domain_deploy/releases/20170811145246 && /usr/bin/composer  
   install --no-dev --prefer-dist --no-interaction --quiet)'" failed.                                                                             
  Exit Code: 2(Misuse of shell builtins)                                                                                                          
  Working directory: /var/www/vhosts/domain                                                                                                     
  Output:                                                                                                                                         
  ================                                                                                                                                
  Error Output:                                                                                                                                   
  ================   
@jesse-s
Copy link

jesse-s commented Oct 19, 2017

Have the same issue. @anacona16 ever found a solution?

@anacona16
Copy link
Author

@jesse-s not yet

@The-Don-Himself
Copy link

Just wanted to add my voice to this. Also facing the same deployment issues.

@jesse-s
Copy link

jesse-s commented Nov 8, 2017

There was an error in my configuration or something wrong with permissions on my server if I remember correctly. After fixing that it worked. Try executing the command where it fails manually and make sure error reporting is on.

@The-Don-Himself
Copy link

Thanks @jesse-s , I also managed to solve this and indeed it was my own mistake, I had a set of ips for some VPSes and one of them was no longer configured for Symfony but still had active ssh and stuff hence this error. I must have forgotten about it. I guess perhaps the logs could be a bit better but how exactly I'm not sure because there are some many different reasons for failure.

@Turtlesfr
Copy link

I'm stuck here as well, with the same error

[Symfony\Component\Process\Exception\ProcessFailedException]                                     
  The command "ssh -A goldgrcsr@project.com -p 60405 '(export SYMFONY_ENV=prod; cd /home/goldgrcsr/pub  
  lic_html/project/releases/20171229095432 && /opt/cpanel/composer/bin/composer install --no-dev   
  --prefer-dist --no-interaction --quiet)'" failed.                                                
  Exit Code: 2(Misuse of shell builtins)                                                              
  Working directory: /var/www/html/project                                                                                
  Output:                                                                                          
  ================                                                                                      
  Error Output:                                                                                    
  ================                                                                                 
  Your requirements could not be resolved to an installable set of packages.

I'm quite a noob with all this especially with server permissions and debugging. Do you have any idea where should I start ?

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

4 participants