Skip to content

Instantly share code, notes, and snippets.

@wkhayrattee
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wkhayrattee/5161f607ac116cddeb5f to your computer and use it in GitHub Desktop.
Save wkhayrattee/5161f607ac116cddeb5f to your computer and use it in GitHub Desktop.
Composer Hanging after extracting symfony/http-kernel (v2.7.0)
root@e2c2b31affb9:/var/www/khayrattee/sample_project# composer.phar -o -vvv update -v
Reading ./composer.json
Loading config file ./composer.json
Executing command (CWD): git describe --exact-match --tags
Executing command (CWD): git branch --no-color --no-abbrev -v
Executing command (CWD): hg branch
Executing command (CWD): svn info --xml
Failed to initialize global composer: Composer could not find the config file: /root/.composer/composer.json
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
Loading composer repositories with package information
Downloading https://packagist.org/packages.json
Writing /root/.composer/cache/repo/https---packagist.org/packages.json into cache
Updating dependencies (including require-dev)
Downloading https://packagist.org/p/provider-2013$955d6103cd902fe6a153417659e8815657024a216bf35cfd5349907be2f1b975.json
Writing /root/.composer/cache/repo/https---packagist.org/p-provider-2013.json into cache
Downloading https://packagist.org/p/provider-2014-07$291b16afff8a0bda8f85a7c7697ff3c3684f1376e75918d72065781cb8855f63.json
Writing /root/.composer/cache/repo/https---packagist.org/p-provider-2014-07.json into cache
Downloading https://packagist.org/p/provider-2014-10$5f0bd333f88ad5c628063c132af1dcea872b51748407a4fcc832ed3915588797.json
Writing /root/.composer/cache/repo/https---packagist.org/p-provider-2014-10.json into cache
Downloading https://packagist.org/p/provider-2015-01$c58a0b57801d58dc58680c5786a8af84aa6290435af784912dbffee5c58d1027.json
Writing /root/.composer/cache/repo/https---packagist.org/p-provider-2015-01.json into cache
Downloading https://packagist.org/p/provider-2015-04$b1d6038c45473ec68e078b145f69bf9eea5d98b380a2ce69b516406fcc0cb45b.json
Writing /root/.composer/cache/repo/https---packagist.org/p-provider-2015-04.json into cache
Downloading https://packagist.org/p/provider-archived$dfa1d92d2697fc375a1d522ab573634ee18807646f4abc322b6933157a07b829.json
Writing /root/.composer/cache/repo/https---packagist.org/p-provider-archived.json into cache
Downloading https://packagist.org/p/provider-latest$b9cd611768d2cd0b58917181b9a8291c52614b6f8e0e94ee2ba886fcb6157b6f.json
Writing /root/.composer/cache/repo/https---packagist.org/p-provider-latest.json into cache
Downloading http://packagist.org/p/symfony/http-foundation$dd6d1cb1d90f80ae85ff53d67673a9a6a42b9a9cb18b4bde45889d2c4f4dcfb4.json
Writing /root/.composer/cache/repo/https---packagist.org/provider-symfony$http-foundation.json into cache
Downloading http://packagist.org/p/symfony/http-kernel$e93658dc84ee2029593fec1423e96f0f562091d2efdeb88ee980427e9bf166da.json
Writing /root/.composer/cache/repo/https---packagist.org/provider-symfony$http-kernel.json into cache
Downloading http://packagist.org/p/symfony/event-dispatcher$e2aa9670df4073a236393d77dabed3c88ce1d26311bf3ebd512153be27ec636b.json
Writing /root/.composer/cache/repo/https---packagist.org/provider-symfony$event-dispatcher.json into cache
Downloading http://packagist.org/p/symfony/debug$26867dab1f250f56ba69197aaca4f2bf89d7497470f00c5e3c53e9b53f27e8d8.json
Writing /root/.composer/cache/repo/https---packagist.org/provider-symfony$debug.json into cache
Downloading http://packagist.org/p/psr/log$4df006588c370a8f6cb8cdf9ab8dc324637e778096d19df40448b7d62a310726.json
Writing /root/.composer/cache/repo/https---packagist.org/provider-psr$log.json into cache
Downloading http://packagist.org/p/league/route$7e2fce0b099bdca487b49d50f968c95a64e28c69d04202f0529380dd672c0391.json
Writing /root/.composer/cache/repo/https---packagist.org/provider-league$route.json into cache
Downloading http://packagist.org/p/league/container$d2d59450ee76720e7b06e513510e35b02b83309951f73028670e6717607da0ee.json
Writing /root/.composer/cache/repo/https---packagist.org/provider-league$container.json into cache
Downloading http://packagist.org/p/nikic/fast-route$a45fcba35b5fe5f68b6864d62c44330547f519dce71308d4d8a0952417277a8b.json
Writing /root/.composer/cache/repo/https---packagist.org/provider-nikic$fast-route.json into cache
Downloading http://packagist.org/p/league/plates$3c5519678309a6c189e34c95a28c75ad46d8e82faaf89b2947d98e89cd640a6f.json
Writing /root/.composer/cache/repo/https---packagist.org/provider-league$plates.json into cache
Downloading http://packagist.org/p/symfony/config$02bb3418b6e44ca67aa869c63b48248f640a267536f552901764633acb43523e.json
Writing /root/.composer/cache/repo/https---packagist.org/provider-symfony$config.json into cache
Downloading http://packagist.org/p/orno/route$85b1dcdc9c6d0863973b50f5a33663941a98bd4657c73c885068fb22342e0161.json
Writing /root/.composer/cache/repo/https---packagist.org/provider-orno$route.json into cache
Downloading http://packagist.org/p/orno/http$fe3062af0ceae06486b7813967c00bc05a994dd664f106ec1197ffc9561d81be.json
Writing /root/.composer/cache/repo/https---packagist.org/provider-orno$http.json into cache
Downloading http://packagist.org/p/orno/di$c11cffe565f1c55e06c6868476b18e9376df4d01bc445ed98b1a24618d5244c4.json
Writing /root/.composer/cache/repo/https---packagist.org/provider-orno$di.json into cache
- Installing psr/log (1.0.0)
Downloading https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b
Downloading: 100%
Writing /root/.composer/cache/files/psr/log/fe0936ee26643249e916849d48e3a51d5f5e278b.zip into cache
Extracting archive
Executing command (CWD): unzip '/var/www/khayrattee/sample_project/vendor/psr/log/5804a4cc663b6e1e7eacd8facc29ed5a' -d '/var/www/khayrattee/sample_project/vendor/composer/de016da9' && chmod -R u+w '/var/www/khayrattee/sample_project/vendor/composer/de016da9'
REASON: symfony/http-kernel v2.7.0 requires psr/log ~1.0 -> satisfiable by psr/log[1.0.0].
- Installing symfony/debug (v2.7.0)
Downloading https://api.github.com/repos/symfony/Debug/zipball/1df2971b27a6ff73dae4ea622f42802000ec332d
Downloading: 100%
Writing /root/.composer/cache/files/symfony/debug/1df2971b27a6ff73dae4ea622f42802000ec332d.zip into cache
Extracting archive
Executing command (CWD): unzip '/var/www/khayrattee/sample_project/vendor/symfony/debug/cf9840fc1b3c8ba74e71918193ae094f' -d '/var/www/khayrattee/sample_project/vendor/composer/6c13282e' && chmod -R u+w '/var/www/khayrattee/sample_project/vendor/composer/6c13282e'
REASON: symfony/http-kernel v2.7.0 requires symfony/debug ~2.6,>=2.6.2 -> satisfiable by symfony/debug[v2.6.2, v2.6.3, v2.6.4, v2.6.5, v2.6.6, v2.6.7, v2.6.8, v2.6.9, v2.7.0].
- Installing symfony/http-foundation (v2.7.0)
Downloading https://api.github.com/repos/symfony/HttpFoundation/zipball/729de183da037c125c5f6366bd4f0631ba1a1abb
Downloading: 100%
Writing /root/.composer/cache/files/symfony/http-foundation/729de183da037c125c5f6366bd4f0631ba1a1abb.zip into cache
Extracting archive
Executing command (CWD): unzip '/var/www/khayrattee/sample_project/vendor/symfony/http-foundation/07af9a738499405187325599214697d3' -d '/var/www/khayrattee/sample_project/vendor/composer/7dc9e32e' && chmod -R u+w '/var/www/khayrattee/sample_project/vendor/composer/7dc9e32e'
REASON: Required by root: Install command rule (install symfony/http-foundation v2.7.0)
- Installing symfony/event-dispatcher (v2.7.0)
Downloading https://api.github.com/repos/symfony/EventDispatcher/zipball/687039686d0e923429ba6e958d0baa920cd5d458
Downloading: 100%
Writing /root/.composer/cache/files/symfony/event-dispatcher/687039686d0e923429ba6e958d0baa920cd5d458.zip into cache
Extracting archive
Executing command (CWD): unzip '/var/www/khayrattee/sample_project/vendor/symfony/event-dispatcher/7f8fd4f34d4cb52982e3646efd97b8bb' -d '/var/www/khayrattee/sample_project/vendor/composer/fa9f294f' && chmod -R u+w '/var/www/khayrattee/sample_project/vendor/composer/fa9f294f'
REASON: symfony/http-kernel v2.7.0 requires symfony/event-dispatcher ~2.5.9|~2.6,>=2.6.2 -> satisfiable by symfony/event-dispatcher[v2.5.10, v2.5.11, v2.5.12, v2.5.9, v2.6.2, v2.6.3, v2.6.4, v2.6.5, v2.6.6, v2.6.7, v2.6.8, v2.6.9, v2.7.0].
- Installing symfony/http-kernel (v2.7.0)
Downloading https://api.github.com/repos/symfony/HttpKernel/zipball/74acbb7ef9c4aae0620d3250b9b990d2fff28d16
Downloading: 100%
Writing /root/.composer/cache/files/symfony/http-kernel/74acbb7ef9c4aae0620d3250b9b990d2fff28d16.zip into cache
Extracting archive
Executing command (CWD): unzip '/var/www/khayrattee/sample_project/vendor/symfony/http-kernel/0529f6e5c097d23296e6f8dd2226bb53' -d '/var/www/khayrattee/sample_project/vendor/composer/4715c172' && chmod -R u+w '/var/www/khayrattee/sample_project/vendor/composer/4715c172'
@wkhayrattee
Copy link
Author

OS: a dockerized Ubuntu 14.04.2 Trusty

@weaverryan
Copy link

It looks (but could be deceiving) like it's freezing in the unzip, but that zip file is tiny - 256kb. I'm also able to download it locally and unzip no problem. If you stop at this point, and manually use unzip on this file, does it work?

I admit, I've never seen anything like this :). It's also possible it's freezing on the next step, but it hasn't printed anything from that step yet.

I might also try to isolate by only updating one thing at a time - e.g. composer update symfony/http-kernel. Also, remove the -o, just in case that's causing some issue.

Wish I could be more help - but this is indeed odd!

@wkhayrattee
Copy link
Author

Hi Ryan,
thanks alot for the reply.

I have been able to observe something:

  • I use docker on my mac, so that on my docker (lamp) box, I share my mac's www folder with my docker box(es)
  • On the docker box, if I go to /tmp/ and from there I do the composer update, everything works fine.
  • But if I do on the shared folder and do a composer update on ANY folder, I get the composer hanging.
    I suspect permission issue, but on my mac, I tried to do permission 777, but still in vain.

So right now, what I'm doing is just going to my tmp folder, do composer and mv back to /var/www

I don't understand why this is happening though as I was not having that issue previously

@wkhayrattee
Copy link
Author

@wkhayrattee
Copy link
Author

UPDATED:
I have been able to solve this issue by adding the spefic UID and GID of my host to my Docker box
REF: this answer here: http://stackoverflow.com/a/24986166

The composer now works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment