cozy-labs / cozy-docker

Dockerfile to build an official Cozy image
44 stars 26 forks source link

error - Install failed for data-system. #3

Closed arthurlutz closed 9 years ago

arthurlutz commented 9 years ago
docker build .
[snip]
Step 15 : RUN su - couchdb -c 'couchdb -b'  && sleep 5  && while ! curl -s 127.0.0.1:5984; do sleep 5; done  && /usr/local/lib/node_modules/cozy-controller/bin/cozy-controller & sleep 5  && while ! curl -s 127.0.0.1:9002; do sleep 5; done  && cd /usr/local/cozy-indexer/cozy-data-indexer  && . ./virtualenv/bin/activate  && /usr/local/cozy-indexer/cozy-data-indexer/virtualenv/bin/python server.py & sleep 5  && while ! curl -s 127.0.0.1:9102; do sleep 5; done  && cozy-monitor install data-system  && cozy-monitor install home  && cozy-monitor install proxy
 ---> Running in 177806b2b3cc
Apache CouchDB has started, time to relax.
{"couchdb":"Welcome","uuid":"1636e42c6c3e5c89cd79475b15c5a7d7","version":"1.5.0","vendor":{"version":"14.04","name":"Ubuntu"}}
info - ### FILE INITIALIZATION ###
info - init: source directory
info - init: stack file
info - init : token file
info - ### AUTOSTART ###
info - couchDB: started
info - Stack isn't installed
info - ### Start Cozy Controller ###
[2015-03-25 14:24:23:646] info - americano | Routes loaded.
[2015-03-25 14:24:23:662] info - americano | Configuration for production loaded.
[2015-03-25 14:24:23:662] info - americano | controller server is listening on port 9002...
Cannot GET /
[Wed, 25 Mar 2015 14:24:25 GMT] - GET / - 404 - 11.340 ms -  -
[I 150325 14:24:26 server:15] Cozy Data Indexer started on port 9102.
[I 150325 14:24:30 web:1462] 200 GET / (127.0.0.1) 2.06ms
Cozy Data Indexer v1.0.0info - Install started for data-system...
error - Error: Cannot uninstall an application not installed
Error: Error: Cannot uninstall an application not installed
    at /usr/local/lib/node_modules/cozy-controller/build/server/controllers/applications.js:137:13
    at Object.module.exports.uninstall (/usr/local/lib/node_modules/cozy-controller/build/server/lib/controller.js:337:14)
    at Object.module.exports.uninstall [as handle] (/usr/local/lib/node_modules/cozy-controller/build/server/controllers/applications.js:134:21)
    at next_layer (/usr/local/lib/node_modules/cozy-controller/node_modules/americano/node_modules/express/lib/router/route.js:103:13)
    at Object.module.exports.check [as handle] (/usr/local/lib/node_modules/cozy-controller/build/server/middlewares/token.js:31:16)
    at next_layer (/usr/local/lib/node_modules/cozy-controller/node_modules/americano/node_modules/express/lib/router/route.js:103:13)
    at Route.dispatch (/usr/local/lib/node_modules/cozy-controller/node_modules/americano/node_modules/express/lib/router/route.js:107:5)
    at /usr/local/lib/node_modules/cozy-controller/node_modules/americano/node_modules/express/lib/router/index.js:213:24
    at param (/usr/local/lib/node_modules/cozy-controller/node_modules/americano/node_modules/express/lib/router/index.js:303:14)
    at param (/usr/local/lib/node_modules/cozy-controller/node_modules/americano/node_modules/express/lib/router/index.js:319:14)
[Wed, 25 Mar 2015 14:24:33 GMT] - POST /drones/data-system/clean - 400 - 34.836 ms -  11
info - data-system:git clone
info - data-system:npm install
warn - WARNING : 
{ [Error: spawn ENOENT] code: 'ENOENT', errno: 'ENOENT', syscall: 'spawn' }
Error: spawn ENOENT
    at errnoException (child_process.js:988:11)
    at Process.ChildProcess._handle.onexit (child_process.js:779:34)

[Wed, 25 Mar 2015 14:34:33 GMT] - POST /drones/data-system/start - - - - ms -  -
error - An error occured:
error - Install failed for data-system.
[Error: Error: socket hang up]
INFO[5988] The command [/bin/sh -c su - couchdb -c 'couchdb -b'  && sleep 5  && while ! curl -s 127.0.0.1:5984; do sleep 5; done  && /usr/local/lib/node_modules/cozy-controller/bin/cozy-controller & sleep 5  && while ! curl -s 127.0.0.1:9002; do sleep 5; done  && cd /usr/local/cozy-indexer/cozy-data-indexer  && . ./virtualenv/bin/activate  && /usr/local/cozy-indexer/cozy-data-indexer/virtualenv/bin/python server.py & sleep 5  && while ! curl -s 127.0.0.1:9102; do sleep 5; done  && cozy-monitor install data-system  && cozy-monitor install home  && cozy-monitor install proxy] returned a non-zero code: 1 
frankrousseau commented 9 years ago

Hello @arthurlutz,

Thank you for reporting. Could you give us more details about the distribution and the hardware on which you install Cozy?

arthurlutz commented 9 years ago
# cat /etc/debian_version 
7.8
# uname -a
Linux host 3.16.0-0.bpo.4-amd64 #1 SMP Debian 3.16.7-ckt2-1~bpo70+1 (2014-12-08) x86_64 GNU/Linux

is this enough ?

frankrousseau commented 9 years ago

Everything looks good. Can you try to install it again?

arthurlutz commented 9 years ago

This is in a Docker build, I can try again, but I have doubts it will give a different result (ok 3rd time the same). The Docker image base is my own built-from-scratch ubuntu:14.04 (see https://wiki.debian.org/Cloud/CreateDockerImage) so this might be the reason why the result is not the same as with the "official" ubuntu:14.04 (binary blob) image.

frankrousseau commented 9 years ago

I don't know @Kloadut who maintains this repository is not working until next week. It's hard for me to understand what's wrong because other users didn't look to face this problem.

I will give a try to build the image tomorrow or on Friday.

avignat commented 9 years ago

Same thing for me

frankrousseau commented 9 years ago

Sorry I didn't find time to look at the problem.

nledez commented 9 years ago

Hello @arthurlutz can you give us how you build the ubuntu image?

Thanks.

arthurlutz commented 9 years ago

@nledez as mentionned in the comment above : I'm using the mkimage.sh recommended by debian see https://github.com/docker/docker/blob/master/contrib/mkimage.sh , it uses debootstrap.

Kloadut commented 9 years ago

It may be related to the fact that ImageMagick is missing on your manually built image.

I will take a look

arthurlutz commented 9 years ago

@Kloadut any CMD command that I can add to try out this theory ?

Kloadut commented 9 years ago

I just saw that imagemagick is installed here https://github.com/cozy-labs/cozy-docker/blob/master/Dockerfile#L14

But I just pushed a new version of the Dockerfile that reset security tokens at container's launching. Maybe you can try out again.

I will try to build an Ubuntu container your way to test.

Kloadut commented 9 years ago

@arthurlutz I just tested with a manually boostraped ubuntu contrainer, made out of this command:

./mkimage.sh -t kload/ubuntu debootstrap --include=ubuntu-minimal --components=main,universe trusty

And everything went well :)

arthurlutz commented 9 years ago

Hey @Kloadut thanks for taking a look at this. I rebuild my base images with the same options as you and it worked. It seems there is something wrong with my previously built image (I think universe was missing but I added it as a source at the top of the Dockerfile...).

jcberthon commented 8 years ago

Sorry to wake up an old thread, but I stumble upon the same issue (same ENOENT error at the same stage of building the Docker image), but with different premice.

I've cloned locally the repository and changed in the Dockerfile the base image to be ubuntu:16.04 and replaced trusty by xenial line 6.

Restoring back ubuntu:14.04 solve the problem.

I guess this could be related to this issue on Cozy https://github.com/cozy/cozy-debian/issues/37 which state that Ubuntu 16.04 is on the roadmap but not yet supported.