babolivier / cozy-archlinux

Old Archlinux packaging for Cozy v2
4 stars 0 forks source link

No access to my Cozy since CouchDB 2.0 upgrade #14

Closed ArchangeGabriel closed 7 years ago

ArchangeGabriel commented 7 years ago

Hi there,

On ArchLinux, CouchDB has been upgraded to 2.0. Since, when going to my cozy in a web browser, I’m presented with the registration page. How can I fix this?

Thanks!

ArchangeGabriel commented 7 years ago

OK, so for any one stumbling upon this, I’ve finally fixed it. Also ping @nono (not sure if that works, but eh), since we discussed this issue at the Cozy Meetup and he might have interesting things to say about sharding.

What I did: disabled couchdb sharding, because Cozy seems to not support it at the moment, and at least couchdb doesn’t find /var/lib/couchdb/cozy.couch after upgrade because it does only look in /var/lib/couchdb/shards/ subfolders; then restarted the whole thing and replaced the newly created db.

  1. Stop couchdb, supervisord. Backup /var/lib/couchdb/cozy.couch somewhere else and remove everything under /var/lib/couchdb (don’t do this if you happen to use couchdb for anything else than Cozy!).
  2. Edit /etc/couchdb/local.ini and add the following:
[cluster]
q=1
n=1
  1. Start couchdb, supervisord. At this point, you should have files under /var/lib/couchdb again, and especially /var/lib/couchdb/shards/00000000-ffffffff/cozy.<unixtimeofcreation>.couch.
  2. Stop couchdb, supervisord again, copy (don’t move, rather be safe) your backup’d cozy.couch to /var/lib/couchdb/shards/00000000-ffffffff/cozy.<unixtimeofcreation>.couch.
  3. Start couchdb, supervisord. Now, everything should be working.
Zykino commented 7 years ago

Nice someone looks to have fixed the problem with couchdb 2.0 Just to be sure : you are keeping the 2.0 version (not downgraded to 1.6) ?

I'll try it this weekend :)

ArchangeGabriel commented 7 years ago

Sorry, didn’t took time to answer before. Yes, this is with CouchDB 2.0, else you wouldn’t have shards. ;)

Partial upgrade are not supported and they are good reasons for this, so downgrading to 1.6 wasn’t an option. Also, since I had to take a bit of time to merge /etc/couchdb/local.ini{,.pacnew} on upgrade, I wasn’t wanting to go backward.

babolivier commented 7 years ago

Hi @ArchangeGabriel,

Much sorry for the lack of reply, been quite busy lately. Thanks so much for your update. I added it to the ArchWiki page I just created, following the discussion in https://github.com/babolivier/cozy-archlinux/issues/11 (I also created cozy-deps).

If I misscopied anything (or you want to credit yourself in the page, or any error you might find on it), feel free to edit it!

ArchangeGabriel commented 7 years ago

@babolivier Very nice. Everything seems fine regarding couchdb, I’ll probably just add a note for the case people have other things using couchdb. I’ll take a look at ee right now.

Zykino commented 7 years ago

Just reinstalled from scratch my cozy thank's to cozy-deps and the ArchWiki page. Maybe we can close the issue now.

ArchangeGabriel commented 7 years ago

Yes, we can. ;)