locked
[PHP][Web Apps] "Unable to kill the process" error with "php composer.phar install" (Symfony) RRS feed

  • Question

  • Hey there,

    I am trying to configure my Symfony with this guide

    http://symfony.com/doc/current/cookbook/deployment/azure-website.html#configure-the-symfony-application

    Unfortunately I get the error message "Unable to kill the process".
    I checked Google & the forums but cannot find anything on that :-(.

    Anybody has an idea what could cause this problem?
    The PHP extension is in place an visible in phpinfo.

    Here is console output:

    D:\home\site\wwwroot>php composer.phar install
     Loading composer repositories with package information
    
    Installing dependencies (including require-dev) from lock file
    
    Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
    
    Nothing to install or update
    
    Generating autoload files
    
    > Incenteev\ParameterHandler\ScriptHandler::buildParameters
    
    Updating the "app/config/parameters.yml" file
    
    > Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap
    
    > Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache
    
    Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-install-cmd event terminated with an exception
    
    
    
    
    
                                                              
    
      [Symfony\Component\Process\Exception\RuntimeException]  
    
      Unable to kill the process                              
    
                                                              
    
    
    
    
    
    install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [--ignore-platform-reqs] [packages1] ... [packagesN]
    
    
    
    
    
    
    Fatal error: Uncaught exception 'Symfony\Component\Process\Exception\RuntimeException' with message 'Unable to kill the process' in phar://D:/home/site/wwwroot/composer.phar/vendor/symfony/process/Symfony/Component/Process/Process.php:801
    Stack trace:
    #0 phar://D:/home/site/wwwroot/composer.phar/vendor/symfony/process/Symfony/Component/Process/Process.php(177): Symfony\Component\Process\Process->stop()
    #1 [internal function]: Symfony\Component\Process\Process->__destruct()
    #2 {main}
      thrown in phar://D:/home/site/wwwroot/composer.phar/vendor/symfony/process/Symfony/Component/Process/Process.php on line 801

    Thanks & Best Regards

    Marcus



    Monday, July 20, 2015 10:08 AM

All replies

  • Hello Marcus-R,

    Please ensure that you have configured to to use the latest version of PHP. You can change this setting from the Azure Management portal by opening the website and clicking on the Configure tab.

    It appears to me that it is failing to load the latest composer.json

    I suggest that you Add it manually to composer.json, then run by running the following command.

    composer update new/package

    Thanks,
    Syed Irfan Hussain

    • Proposed as answer by Syed Irfan Hussain Wednesday, July 22, 2015 9:55 AM
    • Marked as answer by Marcus-R Wednesday, July 22, 2015 11:01 AM
    • Unmarked as answer by Marcus-R Thursday, July 23, 2015 9:01 AM
    • Unproposed as answer by Syed Irfan Hussain Monday, August 10, 2015 8:09 AM
    Tuesday, July 21, 2015 8:50 AM
  • Hello Marcus-R,

    I see that you have unmarked the response as answer, please let me know the results so that we can look into the issue further.

    Thanks,
    Syed Irfan Hussain

    Thursday, July 23, 2015 10:11 AM
  • Hi Syed,

    sorry, I was interrupted while I was typing the answer.

    Unfortunately it didnt worked.

    We set the latest PHP version, increased the php timeout, increased the SCM_COMMAND_IDLE_TIMEOUT, but it is still not working.

    We also tried to run your update command, but also this was not working:

    D:\home\site\wwwroot>php composer.phar new/package 
                                                     [InvalidArgumentException]                 Command "new/package" is not defined.

    The SCM_COMMAND_IDLE_TIMEOUT we found here:

    https://github.com/SyntaxC4-MSFT/ComposerExtension/issues/1
    It is the same error we get.

    Do you have any other ideas?

    Thanks & Best Regards

    Marcus

    Thursday, July 23, 2015 12:12 PM
  • Hello Marcus-R,

    I am checking on this with our Operations Team and will get back to you shortly. Thank you for your patience.

    Syed Irfan Hussain

    Tuesday, July 28, 2015 8:47 AM
  • Hi Syed,

    have you already heard back from them?
    We cannot continue our work :-(.


    Best Regards
    Marcus

    Sunday, August 2, 2015 4:58 PM
  • Hello Marcus,

    Please let me know the name of your website, you can share the name of the website indirectly following the instructions in the link below:

    https://github.com/projectkudu/kudu/wiki/Reporting-your-site-name-without-posting-it-publicly

    Thanks,
    Syed Irfan Hussain

    Monday, August 3, 2015 5:25 AM
  • Hi Syed,

    thanks!
    Here I have a test website within the same instance: http://alxtest.azurewebsites.net/.

    The problem is regarding the development slot of the other web app.


    Thanks & Best Regards
    Marcus

    Monday, August 3, 2015 7:30 AM
  • Hi Syed,

    any news on our topic?
    We are already delayed with our project :-(.


    Best Regards
    Marcus

    Friday, August 7, 2015 9:33 AM
  • Hello Hello Marcus,

    I apologize for the delay, I am still working on this and trying to involve relevant team to look into this.
    In the meantime, I suggest that you follow the workaround suggested by Gary Liu in the Stackoverflow below:

    1. Create a Web app on Azure with a MySQL Database and set up deployment from git.1

    2. Create a new symfony 2.7 project at local by cmdlet:
    php -r "readfile('http://symfony.com/installer');" > symfony

    symfony new my_project

    then deploy the project on Web app.

    3. Switch back to online console of Kudu application, execute the following command:
    "cd site\wwwroot"

    "curl -sS https://getcomposer.org/installer | php"

    "php composer.phar install"

    4. Answer the prompted questions during composer install process

    Here is the link to the thread for your reference:

    http://stackoverflow.com/questions/31672051/unable-to-kill-the-process-error-with-php-composer-phar-install-on-azure

    Thanks,
    Syed Irfan Hussain

    • Proposed as answer by Syed Irfan Hussain Monday, August 10, 2015 8:09 AM
    • Unproposed as answer by Marcus-R Tuesday, August 11, 2015 9:09 AM
    Sunday, August 9, 2015 8:40 AM
  • Hello Marcus,

    Our Operation Team Suggests that you navigate to the Kudu console and open Composer.json and remove the following lines:

    "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
    "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",

    Then try to run the installation 'php composer.phar install'. You may add these lines later after it installs.

    Thanks,
    Syed Irfan Hussain

    Tuesday, August 11, 2015 9:05 AM
  • Hi Syed,

    thanks, but the stackoverflow thread is also not helping.

    The idea with clearCache & installAssets is also mentioned on Stackoverflow.

    There is no error when we remove it from composer.json.

    But when we add it again, the error is coming again.
    So that is not a solution. It is just a complex workarround as there are manual steps.

    Best Regards
    Marcus

    Tuesday, August 11, 2015 9:09 AM
  • Hello Marcus,

    You can also try to delete the composer.lock file and check if you can install.

    Thanks,
    Syed Irfan Hussain

    Tuesday, August 11, 2015 9:11 AM
  • Hi Syed,

    thanks, I tried it but we get the same error.

    Best Regards

    Marcus

    Tuesday, August 11, 2015 9:49 AM
  • Hello Marcus,

    You can download the source from Symfony official download site: https://symfony.com/doc/current/book/installation.html#installing-the-symfony-installer .
    Following the instruction for Windows, downloading can be done on Azure App, or at local PC then copy to Azure App.

    In the case that install failed on post-install*, move post-install to the end of installation. In Composer.json, the “script” section (including post-install-cmd, post-update-cmd) can be moved to the bottom of the file, so that it won’t stop the installation process in the middle.

    Thanks,
    Syed Irfan Hussain

    Wednesday, August 12, 2015 11:52 AM
  • Hi Syed,

    I am not sure what you mean.

    We have this block here in composer.json:

        "scripts": {
            "post-root-package-install": [
                "SymfonyStandard\\Composer::hookRootPackageInstall"
            ],
            "post-install-cmd": [
                "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
                "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
                "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
                "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
                "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
                "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles",
                "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
            ],
            "post-update-cmd": [
                "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
                "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
                "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
                "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
                "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
                "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles",
                "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
            ]
        },

    But it seems that the order of those points make sense. What should be removed with removeSymfonyStandardFiles when nothing is installed?

    There are not other tasks in the script block then this.

    Best Regards

    Marcus

    Wednesday, August 12, 2015 12:14 PM