Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Install problem on Ubuntu - Fails on "Generate Drupal project with composer package" #741

Closed
alesrebec opened this issue Jun 16, 2016 · 7 comments

Comments

@alesrebec
Copy link

alesrebec commented Jun 16, 2016

I have no issues installing Drupal VM 3.1.1+ with OSX, but with the same code I have issues that are reproducible on multiple Ubuntu machines and versions (15.04 and 16.04).

Vagrant 1.8.1
Ansible 2.1.0.0
VirtualBox 5.0.20

This is the error I get:

TASK [Generate Drupal project with composer package.] **************************
fatal: [drupalvm]: FAILED! => {"changed": true, "cmd": ["/usr/bin/composer", "create-project", "drupal-composer/drupal-project:8.x-dev", "/var/www/drupalvm/drupal", "--prefer-dist", "--stability", "dev", "--no-interaction"], "delta": "0:14:36.709410", "end": "2016-06-15 15:59:04.109542", "failed": true, "rc": 1, "start": "2016-06-15 15:44:27.400132", "stderr": "    1/5:\thttp://packagist.org/p/provider-latest$e55cafb55fa99a3d6d5662404f33e5840f2a5d8c217e121bed641b670a28bcec.json\n    2/5:\thttp://packagist.org/p/provider-2015-10$83e35b1f12a02fe17b4781a4278667be2541c80b91918677c6745be7807370b7.json\n    3/5:\thttp://packagist.org/p/provider-2015$8afa73b64e7f04b5bef2a60a729d7e59c3ea877160e7f74ba6c1089428d00310.json\n    4/5:\thttp://packagist.org/p/provider-2016-01$ac4713597cd91d168a299dd3479fcceed12e6ad1531f4c92833423adad855e23.json\n    5/5:\thttp://packagist.org/p/provider-2016-04$8d69f5ce80c08c23f80df6ee4b8807f203fec2ff7348936a076d63fb00f736df.json\n    Finished: success: 5, skipped: 0, failure: 0, total: 5\nInstalling drupal-composer/drupal-project (8.x-dev 544ba79cd95cb4fca599cba586498aaf0faf2885)\n  - Installing drupal-composer/drupal-project (8.x-dev 544ba79)\n    Loading from cache\n\nCreated project in /var/www/drupalvm/drupal\n    1/3:\thttps://packagist.drupal-composer.org/p/provider-latest$400a7121518735c03f7d633e72874de965d7722549f4a6c364aedf68bf0c381c.json\n    2/3:\thttps://packagist.drupal-composer.org/p/provider-2016-04$dc8a2f3b7210fd1c3d363f68bdec948b19740c57020214c2298e9a4f77e61531.json\n    3/3:\thttps://packagist.drupal-composer.org/p/provider-2016-01$829ca62402acddf5d6bbf3c7efc468f4627bfce9a1ec9416e820173c56c2c2fc.json\n    Finished: success: 3, skipped: 0, failure: 0, total: 3\nLoading composer repositories with package information\nUpdating dependencies (including require-dev)\n  - Installing drupal-composer/drupal-scaffold (2.0.1)\n    Loading from cache\n\n  - Installing cweagans/composer-patches (1.5.0)\n    Loading from cache\n\n  - Installing composer/installers (v1.0.25)\n    Loading from cache\n\n  - Installing psr/http-message (1.0)\n    Loading from cache\n\n  - Installing guzzlehttp/psr7 (1.3.0)\n    Loading from cache\n\n  - Installing guzzlehttp/promises (1.2.0)\n    Loading from cache\n\n  - Installing guzzlehttp/guzzle (6.2.0)\n    Loading from cache\n\n  - Installing jcalderonzumba/gastonjs (v1.0.3)\n    Loading from cache\n\n  - Installing twig/twig (v1.24.1)\n    Loading from cache\n\n  - Installing symfony/polyfill-mbstring (v1.2.0)\n    Loading from cache\n\n  - Installing symfony/css-selector (v2.8.7)\n    Loading from cache\n\n  - Installing behat/mink (v1.7.1)\n    Loading from cache\n\n  - Installing jcalderonzumba/mink-phantomjs-driver (v0.3.1)\n    Loading from cache\n\n  - Installing paragonie/random_compat (v1.4.1)\n    Loading from cache\n\n  - Installing composer/semver (1.4.1)\n    Loading from cache\n\n  - Installing zendframework/zend-diactoros (1.3.5)\n    Loading from cache\n\n  - Installing ircmaxell/password-compat (v1.0.4)\n    Loading from cache\n\n  - Installing symfony/polyfill-php55 (v1.2.0)\n    Loading from cache\n\n  - Installing symfony/polyfill-php54 (v1.2.0)\n    Loading from cache\n\n  - Installing symfony/http-foundation (v2.8.7)\n    Loading from cache\n\n  - Installing symfony/psr-http-message-bridge (v0.2)\n    Loading from cache\n\n  - Installing masterminds/html5 (2.2.1)\n    Loading from cache\n\n  - Installing doctrine/lexer (v1.0.1)\n    Loading from cache\n\n  - Installing egulias/email-validator (1.2.12)\n    Loading from cache\n\n  - Installing psr/log (1.0.0)\n    Loading from cache\n\n  - Installing symfony/debug (v2.8.7)\n    Loading from cache\n\n  - Installing symfony/event-dispatcher (v2.8.7)\n    Loading from cache\n\n  - Installing symfony/http-kernel (v2.8.7)\n    Loading from cache\n\n  - Installing stack/builder (v1.0.4)\n    Loading from cache\n\n  - Installing zendframework/zend-stdlib (3.0.1)\n    Loading from cache\n\n  - Installing zendframework/zend-escaper (2.5.1)\n    Loading from cache\n\n  - Installing zendframework/zend-feed (2.7.0)\n    Loading from cache\n\n  - Installing easyrdf/easyrdf (0.9.1)\n    Loading from cache\n\n  - Installing symfony/routing (v2.8.7)\n    Loading from cache\n\n  - Installing symfony-cmf/routing (1.3.0)\n    Loading from cache\n\n  - Installing doctrine/annotations (v1.2.7)\n    Loading from cache\n\n  - Installing doctrine/inflector (v1.1.0)\n    Loading from cache\n\n  - Installing doctrine/collections (v1.3.0)\n    Loading from cache\n\n  - Installing doctrine/cache (v1.6.0)\n    Loading from cache\n\n  - Installing doctrine/common (v2.5.3)\n    Loading from cache\n\n  - Installing symfony/yaml (v2.8.7)\n    Loading from cache\n\n  - Installing symfony/polyfill-iconv (v1.2.0)\n    Loading from cache\n\n  - Installing symfony/process (v2.8.7)\n    Loading from cache\n\n  - Installing symfony/translation (v2.8.7)\n    Loading from cache\n\n  - Installing symfony/validator (v2.8.7)\n    Loading from cache\n\n  - Installing symfony/serializer (v2.8.7)\n    Loading from cache\n\n  - Installing symfony/dependency-injection (v2.8.7)\n    Loading from cache\n\n  - Installing symfony/console (v2.8.7)\n    Loading from cache\n\n  - Installing symfony/polyfill-apcu (v1.2.0)\n    Loading from cache\n\n  - Installing symfony/class-loader (v2.8.7)\n    Loading from cache\n\n  - Installing drupal/core (8.1.2)\n    Loading from cache\n    Failed to download drupal/core from dist: Failed to execute unzip 'web/core/a5ce6c5881c8146864f37a950995b8fc' -d '/var/www/drupalvm/drupal/vendor/composer/e8a3f7ea' && chmod -R u+w '/var/www/drupalvm/drupal/vendor/composer/e8a3f7ea'\n\nThe process \"unzip 'web/core/a5ce6c5881c8146864f37a950995b8fc' -d '/var/www/drupalvm/drupal/vendor/composer/e8a3f7ea' && chmod -R u+w '/var/www/drupalvm/drupal/vendor/composer/e8a3f7ea'\" exceeded the timeout of 300 seconds.\n    Now trying to download from source\n  - Installing drupal/core (8.1.2)\n    Cloning a5d3f14db87ef953d227fb411489bada1afbb0a8\n\n                                                                                                                                                                                                                                                                     \n  [Symfony\\Component\\Process\\Exception\\ProcessTimedOutException]                                                                                                                                                                                                     \n  The process \"git clone --no-checkout 'https://github.com/drupal-composer/drupal-core.git' 'web/core' && cd 'web/core' && git remote add composer 'https://github.com/drupal-composer/drupal-core.git' && git fetch composer\" exceeded the timeout of 300 seconds.  \n                                                                                                                                                                                                                                                                     \n\ncreate-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>] [<version>]", "stdout": "", "stdout_lines": [], "warnings": []}

This is the fail part in error message: "Failed to download drupal/core from dist: Failed to execute unzip 'web/core/a5ce6c5881c8146864f37a950995b8fc'"

@Xilis
Copy link

Xilis commented Jun 16, 2016

Ubunbu 16.04
Vagrant 1.8.1
Ansible 2.1.0
VirtualBox 5.0.20

composer create-project fails on

Finished: success: 45, skipped: 0, failure: 0, total: 45
  - Installing drupal/core (8.1.3)
    Failed to download drupal/core from dist: Could not delete web/core/.nfs0000000000160bea00000003: 
    Now trying to download from source
  - Installing drupal/core (8.1.3)


  [RuntimeException]                                        
  Could not delete web/core/.nfs0000000000160bea00000003:
vagrant@drupalvm:/var/www/drupalvm/drupal/web/core$ ls -la
total 15592
drwxrwxr-x 2 1000 admin     4096 Jun 16 08:42 .
drwxrwxr-x 3 1000 admin     4096 Jun 15 22:06 ..
-rw-rw-r-- 1 1000 admin 15956904 Jun 16 08:32 .nfs0000000000160bea00000004
vagrant@drupalvm:/var/www/drupalvm/drupal/web/core$ lsof +D ./
COMMAND  PID    USER   FD   TYPE DEVICE SIZE/OFF    NODE NAME
bash    6339 vagrant  cwd    DIR   0,45     4096 1444841 .
bash    6586 vagrant  cwd    DIR   0,45     4096 1444841 .
unzip   6887 vagrant    3r   REG   0,45 15956904 1444842 ./.nfs0000000000160bea00000004
lsof    6959 vagrant  cwd    DIR   0,45     4096 1444841 .
lsof    6960 vagrant  cwd    DIR   0,45     4096 1444841 .

I added the timeout config at the end of drupal/composer.json (not sure if it is the right place), will see if it goes through like this.

    },
    "extra": {
        "installer-paths": {
            "web/core": ["type:drupal-core"],
            "web/modules/contrib/{$name}": ["type:drupal-module"],
            "web/profiles/contrib/{$name}": ["type:drupal-profile"],
            "web/themes/contrib/{$name}": ["type:drupal-theme"],
            "drush/contrib/{$name}": ["type:drupal-drush"]
        }
    },
        "config":{
                "process-timeout":      1200
        }
}

@Xilis
Copy link

Xilis commented Jun 16, 2016

I killed the unzipping of drupal/core from cache, and now (after 15+ minutes) it's going through the next steps.

    Finished: success: 45, skipped: 0, failure: 0, total: 45
  - Installing drupal/core (8.1.3)
    Loading from cache
    Failed to download drupal/core from dist: Failed to execute unzip 'web/core/44de5dee03679b5f4f6dd787b5cf843f' -d '/var/www/drupalvm/drupal/vendor/composer/e6176f39' && chmod -R u+w '/var/www/drupalvm/drupal/vendor/composer/e6176f39'


    Now trying to download from source
  - Installing drupal/core (8.1.3)
    Cloning ac94c29c14d85c8e77f5cb1d0ab38036f5f25c9c

  - Installing gabordemooij/redbean (v4.3.2)
    Loading from cache

  - Installing padraic/humbug_get_contents (1.0.4)
    Loading from cache

  - Installing padraic/phar-updater (1.0.3)
    Loading from cache

  - Installing symfony/finder (v2.8.7)
    Loading from cache

  - Installing stecman/symfony-console-completion (0.5.1)
    Loading from cache

  - Installing phpseclib/phpseclib (2.0.2)
    Loading from cache

  - Installing symfony/filesystem (v2.8.7)
    Loading from cache

  - Installing symfony/dom-crawler (v2.8.7)
    Loading from cache

  - Installing symfony/config (v2.8.7)
    Loading from cache

  - Installing alchemy/zippy (0.3.5)
    Loading from cache

  - Installing drupal/console (0.11.3)
    Loading from cache

@Xilis
Copy link

Xilis commented Jun 16, 2016

For me it finished with everything, so adding the timeout in the config was what solved it for me.

@geerlingguy
Copy link
Owner

This looks related to #733.

@geerlingguy geerlingguy changed the title Install problem on Ubuntu - Dails on "Generate Drupal project with composer package" Install problem on Ubuntu - Fails on "Generate Drupal project with composer package" Jun 16, 2016
@geerlingguy
Copy link
Owner

I've updated a few things (including the default timeout) for tag 3.1.2; please try that or master and see if everything is working now.

@oxyc also mentioned a potential way of increasing performance further if you want to use Drupal VM's built-in composer file—basically move the vendor directory outside of a synced folder, since even NFS is a lot slower than native directories: #733 (comment)

@prateekvarma
Copy link

@Xilis , how did you do this? - "I killed the unzipping of drupal/core from cache, and now (after 15+ minutes) it's going through the next steps." Thanks!

@Xilis
Copy link

Xilis commented Aug 10, 2017

@prateekvarma, killed the unzip process while it was in that step, so it didn't waste time.

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

No branches or pull requests

4 participants