Skip to content
This repository has been archived by the owner on Jul 31, 2018. It is now read-only.

cozy update crash on data-system update #213

Closed
19emtuck opened this issue Mar 11, 2016 · 7 comments
Closed

cozy update crash on data-system update #213

19emtuck opened this issue Mar 11, 2016 · 7 comments

Comments

@19emtuck
Copy link

I just update recently my coz cloud and get stuck after data-system has been updated.
I checked logs (cat /usr/local/var/log/cozy/data-system.log-backup)

And it seems to be a dependency problem, then I checked americano and cozy-americano.
Both packages seems to be installed (also check them with an npm install -g)

so I'm stuck on it :(

Error: Cannot find module 'americano'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at module.exports (/usr/local/cozy/apps/data-system/build/server.js:6:15)
at Object. (/usr/local/cozy/apps/data-system/build/server.js:26:3)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)


You'll also find below cozy-controller logs start

[2016-03-11 00:02:52:361] info - lib:autostart | ### AUTOSTART ###
[2016-03-11 00:02:52:512] info - lib:autostart | couchDB: started
[2016-03-11 00:02:52:592] info - lib:autostart | data-system: starting ...
[2016-03-11 00:02:52:781] info - lib:spawner | data-system: start with pid 15929
[2016-03-11 00:02:53:752] info - lib:spawner | data-system: restart with pid 15949
[2016-03-11 00:02:54:735] info - lib:spawner | data-system: restart with pid 15964
[2016-03-11 00:02:55:668] info - lib:spawner | data-system: restart with pid 15976
[2016-03-11 00:02:56:521] info - lib:spawner | data-system: restart with pid 15981
[2016-03-11 00:02:57:450] error - lib:spawner | Callback on Exit
[2016-03-11 00:02:57:456] error - lib:spawner | Callback on Exit
[2016-03-11 00:02:57:465] error - lib:autostart | data-system didn't start
[2016-03-11 00:02:57:468] error - lib:autostart | data-system didn't start
[2016-03-11 00:02:57:520] error - lib:autostart | Error: data-system CANT START
at onExit (/usr/local/lib/node_modules/cozy-controller/build/server/lib/spawner.js:251:26)
at listener (/usr/local/lib/node_modules/cozy-controller/node_modules/cozy-forever-monitor/node_modules/broadway/node_modules/eventemitter2/lib/eventemitter2.js:251:10)
at EventEmitter.emit (/usr/local/lib/node_modules/cozy-controller/node_modules/cozy-forever-monitor/node_modules/broadway/node_modules/eventemitter2/lib/eventemitter2.js:339:22)
at letChildDie (/usr/local/lib/node_modules/cozy-controller/node_modules/cozy-forever-monitor/lib/forever-monitor/monitor.js:199:12)
at ChildProcess. (/usr/local/lib/node_modules/cozy-controller/node_modules/cozy-forever-monitor/lib/forever-monitor/monitor.js:213:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at Process.ChildProcess._handle.onexit (child_process.js:797:12)
[2016-03-11 00:02:57:544] error - lib:autostart | Error: data-system CANT START
at onExit (/usr/local/lib/node_modules/cozy-controller/build/server/lib/spawner.js:251:26)
at listener (/usr/local/lib/node_modules/cozy-controller/node_modules/cozy-forever-monitor/node_modules/broadway/node_modules/eventemitter2/lib/eventemitter2.js:251:10)
at EventEmitter.emit (/usr/local/lib/node_modules/cozy-controller/node_modules/cozy-forever-monitor/node_modules/broadway/node_modules/eventemitter2/lib/eventemitter2.js:339:22)
at letChildDie (/usr/local/lib/node_modules/cozy-controller/node_modules/cozy-forever-monitor/lib/forever-monitor/monitor.js:199:12)
at ChildProcess. (/usr/local/lib/node_modules/cozy-controller/node_modules/cozy-forever-monitor/lib/forever-monitor/monitor.js:213:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at Process.ChildProcess._handle.onexit (child_process.js:797:12)
[2016-03-11 00:02:57:549] error - server | Error during autostart:
[2016-03-11 00:02:57:561] error - server | Error during autostart:
[Error: data-system didn't start]

@aenario
Copy link
Contributor

aenario commented Mar 11, 2016

Hi, americano should be installed as a dependency of the datas-sytem, so in /usr/local/cozy/apps/data-system/node_modules/americano

To install it,

cd /usr/local/cozy/apps/data-system/
sudo -u cozy-data-system npm install

Note that it is different from npm install americano -g, which will install it the dependency in $(npm config get prefix)/node_modules/americano

Not sure about why it wasn't installed by the controller in the first place : could be a temporary failure of npm's server or there maybe something wrong with permissions. Do you have a particular setup or do you use the debian package ?

@19emtuck
Copy link
Author

ok got strange errors after executing this command line
/usr/local/cozy/apps/data-system$ sudo -u cozy-data-system npm install > /tmp/error_npm_install.txt 2>&1

BTW : I'm hosting my cozy cloud on cubietruck from the beginning of the project (as soon as I get cozy aware), at that time there wasn't any package.

npm ERR! Error: Attempt to unlock gm@1.21.1, which hasn't been locked
npm ERR! at unlock (/opt/node/lib/node_modules/npm/lib/cache.js:1304:11)
npm ERR! at cb (/opt/node/lib/node_modules/npm/lib/cache.js:646:5)
npm ERR! at /opt/node/lib/node_modules/npm/lib/cache.js:655:20
npm ERR! at /opt/node/lib/node_modules/npm/lib/cache.js:1290:7
npm ERR! at /opt/node/lib/node_modules/npm/node_modules/lockfile/lockfile.js:167:38
npm ERR! at OpenReq.Req.done (/opt/node/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:144:5)
npm ERR! at OpenReq.done (/opt/node/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:64:22)
npm ERR! at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR! http://github.com/npm/npm/issues

npm ERR! System Linux 3.4.61+
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! cwd /usr/local/cozy/apps/data-system
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! Error: Attempt to unlock coffee-coverage@0.4.2, which hasn't been locked
npm ERR! at unlock (/opt/node/lib/node_modules/npm/lib/cache.js:1304:11)
npm ERR! at cb (/opt/node/lib/node_modules/npm/lib/cache.js:646:5)
npm ERR! at /opt/node/lib/node_modules/npm/lib/cache.js:655:20
npm ERR! at /opt/node/lib/node_modules/npm/lib/cache.js:1290:7
npm ERR! at /opt/node/lib/node_modules/npm/node_modules/lockfile/lockfile.js:167:38
npm ERR! at OpenReq.Req.done (/opt/node/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:144:5)
npm ERR! at OpenReq.done (/opt/node/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:64:22)
npm ERR! at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR! http://github.com/npm/npm/issues

npm ERR! System Linux 3.4.61+
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! cwd /usr/local/cozy/apps/data-system
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! Error: Attempt to unlock http-proxy@1.12.0, which hasn't been locked
npm ERR! at unlock (/opt/node/lib/node_modules/npm/lib/cache.js:1304:11)
npm ERR! at cb (/opt/node/lib/node_modules/npm/lib/cache.js:646:5)
npm ERR! at /opt/node/lib/node_modules/npm/lib/cache.js:655:20
npm ERR! at /opt/node/lib/node_modules/npm/lib/cache.js:1290:7
npm ERR! at /opt/node/lib/node_modules/npm/node_modules/lockfile/lockfile.js:167:38
npm ERR! at OpenReq.Req.done (/opt/node/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:144:5)
npm ERR! at OpenReq.done (/opt/node/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:64:22)
npm ERR! at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR! http://github.com/npm/npm/issues

npm ERR! System Linux 3.4.61+
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! cwd /usr/local/cozy/apps/data-system
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! Error: Attempt to unlock coffee-jshint@0.2.3, which hasn't been locked
npm ERR! at unlock (/opt/node/lib/node_modules/npm/lib/cache.js:1304:11)
npm ERR! at cb (/opt/node/lib/node_modules/npm/lib/cache.js:646:5)
npm ERR! at /opt/node/lib/node_modules/npm/lib/cache.js:655:20
npm ERR! at /opt/node/lib/node_modules/npm/lib/cache.js:1290:7
npm ERR! at /opt/node/lib/node_modules/npm/node_modules/lockfile/lockfile.js:167:38
npm ERR! at OpenReq.Req.done (/opt/node/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:144:5)
npm ERR! at OpenReq.done (/opt/node/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:64:22)
npm ERR! at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR! http://github.com/npm/npm/issues

@19emtuck
Copy link
Author

Ok, I finally give up to fix this installation and decide to reinstall cozy from scratch
(backup first these files : _replicator.couch _users.couch cozy.couch)

----- purge

supervisorctl stop cozy-controller
supervisorctl stop cozy-indexer
service stop couchdb
rm -rf /usr/local/var/cozy-indexer
rm -f /etc/supervisor/conf.d/cozy-controller.conf
rm -f /etc/supervisor/conf.d/cozy-indexer.conf
rm -rf /usr/local/cozy
rm -rf /etc/cozy
rm -rf /usr/local/var/cozy/

----- install

sudo fab -H pi@127.0.0.1 install

and get error on installing home application

it won't be installed,

sudo cozy-monitor install home
info - Install started for home...
error - An error occured:
error - An error occured:
error - Install failed for home.
error - Install failed for home.
[Error: Install failed for home.
Default git repo https://github.com/cozy/cozy-home.git doesn't exist.
You can use option -r to use a specific repo.]

I've got 115Mo inside /usr/local/cozy/apps/home

it's a bit slow to repeat it, because after git clone, npm downloads lots of packages. So
I don't know what's up with that app, especially because cozy-home exist :-D

@frankrousseau
Copy link
Contributor

It looks like the Cozy controller is no more started. Can you run:

ps -ef | grep cozy-controller

?

@19emtuck
Copy link
Author

Finally I fully re-installed cozy. On IRC channel, they told me to update node especially to aim node 4.0. I had other weird and side effects after node installation has been completed. For instance every application has to be installed manually, cozy says it was already installed. Which means :

  • git clone
  • cd
  • npm install
  • cd ..
  • chown

So I did it, replace everything and reinstall fully cozy. It works actually :) so this issue should be closed.
So thx you and thx you guys on IRC channel.

@19emtuck
Copy link
Author

finally I can say : cozy works on cubietruck with node 4.0

@frankrousseau
Copy link
Contributor

Thank you @19emtuck for your patience and for testing Cozy + Node 4 on Cubietruck!

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

No branches or pull requests

3 participants