cozy / cozy-data-system

Deprecated - Data Layer for Cozy V2 Platform
https://cozy.io
GNU Affero General Public License v3.0
24 stars 21 forks source link

crapy update then crapy re-install, crash on data-system step #150

Closed 19emtuck closed 9 years ago

19emtuck commented 9 years ago

I'm stuck on data-system install

test@cubietruck:~$ sudo cozy-monitor install data-system info - Install started for data-system... error - An error occured: error - Install failed for data-system. [Error: data-system CANT START]

Is there a workaround ? I cannot use prepared system image, 've got other dependencies already installed and configured :(

What I did

backup my datas try normal update using web interface which (fail) try normal update using command line tool which (fail) decide to remove everything an re-install cozy using fabric script (fail) try to add package repo, but didn't get cubietruck arch package (fail)

additional informations :

platform : cubietruck test@cubietruck:~$ lsb_release -c Codename: trusty

poupotte commented 9 years ago

Hi @19emtuck,

Can you give me logs in /usr/local/var/log/cozy/data-system.log or /usr/local/cozy/data-system.log-backup ?

19emtuck commented 9 years ago

test@cubietruck:~$ cat /usr/local/var/log/cozy/data-system.log-backup [2015-07-06 08:26:30:843] info - lib/db | Database cozy on localhost:5984 doesn't exist. [2015-07-06 08:26:30:923] info - lib/db | Error on database creation : [2015-07-06 08:26:30:927] info - lib/db | {"name":"CouchError","message":"unauthorized: Name or password is incorrect.","error":"unauthorized","reason":"Name or password is incorrect.","headers":{"server":"CouchDB/1.6.0 (Erlang OTP/R16B03)","date":"Mon, 06 Jul 2015 06:26:30 GMT","content-type":"text/plain; charset=utf-8","content-length":"67","cache-control":"must-revalidate","status":401}} [2015-07-06 08:26:36:5] info - lib/db | Database cozy on localhost:5984 doesn't exist. [2015-07-06 08:26:36:103] info - lib/db | Error on database creation : [2015-07-06 08:26:36:105] info - lib/db | {"name":"CouchError","message":"unauthorized: Name or password is incorrect.","error":"unauthorized","reason":"Name or password is incorrect.","headers":{"server":"CouchDB/1.6.0 (Erlang OTP/R16B03)","date":"Mon, 06 Jul 2015 06:26:36 GMT","content-type":"text/plain; charset=utf-8","content-length":"67","cache-control":"must-revalidate","status":401}} [2015-07-06 08:26:41:289] info - lib/db | Database cozy on localhost:5984 doesn't exist. [2015-07-06 08:26:41:419] info - lib/db | Error on database creation : [2015-07-06 08:26:41:421] info - lib/db | {"name":"CouchError","message":"unauthorized: Name or password is incorrect.","error":"unauthorized","reason":"Name or password is incorrect.","headers":{"server":"CouchDB/1.6.0 (Erlang OTP/R16B03)","date":"Mon, 06 Jul 2015 06:26:41 GMT","content-type":"text/plain; charset=utf-8","content-length":"67","cache-control":"must-revalidate","status":401}} [2015-07-06 08:26:46:421] info - lib/db | Database cozy on localhost:5984 doesn't exist. [2015-07-06 08:26:46:504] info - lib/db | Error on database creation : [2015-07-06 08:26:46:506] info - lib/db | {"name":"CouchError","message":"unauthorized: Name or password is incorrect.","error":"unauthorized","reason":"Name or password is incorrect.","headers":{"server":"CouchDB/1.6.0 (Erlang OTP/R16B03)","date":"Mon, 06 Jul 2015 06:26:46 GMT","content-type":"text/plain; charset=utf-8","content-length":"67","cache-control":"must-revalidate","status":401}} [2015-07-06 08:26:51:761] info - lib/db | Database cozy on localhost:5984 doesn't exist. [2015-07-06 08:26:51:873] info - lib/db | Error on database creation : [2015-07-06 08:26:51:875] info - lib/db | {"name":"CouchError","message":"unauthorized: Name or password is incorrect.","error":"unauthorized","reason":"Name or password is incorrect.","headers":{"server":"CouchDB/1.6.0 (Erlang OTP/R16B03)","date":"Mon, 06 Jul 2015 06:26:51 GMT","content-type":"text/plain; charset=utf-8","content-length":"67","cache-control":"must-revalidate","status":401}}

poupotte commented 9 years ago

Thanks @19emtuck ,

your problem is a difference between login stored in /etc/cozy/couchdb.login and couchdb admin.

To solve this problem, we can :

19emtuck commented 9 years ago

documentation says : "rm -rf /etc/cozy" so it might explain password differences :( In the mean time I removed /usr/local/var/lib/couchdb and restart from scratch install. the path has been correctly recreated with some db files like _users.couch db

and "sudo fab -H pi@localhost install" is still stuck on data-sytem step

right now :

test@cubietruck:~$ sudo ls -al /usr/local/var/lib/couchdb/ total 28 drwxrwx--- 3 couchdb couchdb 4096 juil. 6 13:22 . drwxr-xr-x 3 root root 4096 juil. 6 13:22 .. drwxr-xr-x 2 couchdb couchdb 4096 juil. 6 13:22 .delete -rw-r--r-- 1 couchdb couchdb 4194 juil. 6 13:22 _replicator.couch -rw-r--r-- 1 couchdb couchdb 4194 juil. 6 13:22 _users.couch

remark : I don't have /etc/couchdb/local.init file

last but not least : what shall I miss to restart install from scratch (don't forget, that fab script install most in /usr/local)

19emtuck commented 9 years ago

ok find my local.ini file /usr/local/etc/couchdb/local.ini

gonna try your fix

19emtuck commented 9 years ago

ok thx for the tip ! it works. how can I restore my datas from an other couchdb instance ? (I backup couchdb files and also backup my data with another couchdb instance, but if I loose my password I'm stuck)

poupotte commented 9 years ago

You can use the same tip :

To restore, you can use command reverse-backup from cozy-monitor : sudo cozy-monitor reverse-backup <backup_url> <usernameBackup> <passwordBackup>

poupotte commented 9 years ago

@clochix , I think, we can close this issue.

clochix commented 9 years ago

Ok, thanks :-)