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

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

Closed
19emtuck opened this issue Jul 6, 2015 · 9 comments
Closed

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

19emtuck opened this issue Jul 6, 2015 · 9 comments
Labels

Comments

@19emtuck
Copy link

19emtuck commented Jul 6, 2015

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
Copy link
Contributor

poupotte commented Jul 6, 2015

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
Copy link
Author

19emtuck commented Jul 6, 2015

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
Copy link
Contributor

poupotte commented Jul 6, 2015

Thanks @19emtuck ,

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

To solve this problem, we can :

  • Remove couchDB admin : remove lines in part [admin] in file /etc/couchdb/local.ini (end of file).
  • Restart couchDB.
  • Remove file /etc/cozy/couchdb.login
  • Execute command config_couchdb from fabfile.py
  • Restart cozy-controller : sudo supervisorctl restart cozy-controller

@19emtuck
Copy link
Author

19emtuck commented Jul 6, 2015

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
Copy link
Author

19emtuck commented Jul 6, 2015

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

gonna try your fix

@19emtuck
Copy link
Author

19emtuck commented Jul 6, 2015

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
Copy link
Contributor

poupotte commented Jul 6, 2015

You can use the same tip :

  • Remove admin in file configuration
  • Restart couchDB.
  • Create new admin for couchDB

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

@poupotte
Copy link
Contributor

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

@clochix
Copy link
Contributor

clochix commented Aug 12, 2015

Ok, thanks :-)

@clochix clochix closed this as completed Aug 12, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants