Upgrade to Ubuntu 22.04 couch service error after couchdb restoration

Hello good people,

After following the upgrade I happen to have run into some problems which I think someone can assist me with:

  1. Postgres restoration following plain (pg_basebackup) without S3
    When following the exact step I get permission errors so used root user to do the process and restored the access privilege's and ownerships just wanted to know if I am missing something.

  2. Couchdb Restoration following Restoring CouchDB backups (on a single node cluster) this runs sucessfully using elevated privilege's because it seems that couchdb does not have privileges to access /opt/data/backups and after restoring successfully


    we are getting the attached error on couch service

Hello Fredrick,

For 1, if you were able to restore the data correctly and the Postgres is running fine, then that should be fine.

For 2, the next thing you can check to see what's wrong with the CouchDB is to examine the couchdb service status and its logs to see why exactly it's erroring. The couchdb log directory should be at /usr/local/couchdb2/couchdb/var/log/ if you are on Ubuntu 18.04 else at /opt/couchdb/var/log/.

Please let us know if you need further assistance.

Thanks
Sravan

Hello Sravan,

Thank you for the reply checking my couchdb logs it seems the service is not able to find some dbs please refer to the attached screenshot.

Looking forward to your advice.

Thanks Fredrick

Hello Fredrick,

The error message (not_found, no_db_file) indicates that the couchdb may not have been restored correctly from the backup. Have you made sure that the CouchDB is restored correctly. Here are the relevant docs Backup and Restore — CommCareHQ Deployment documentation

Thank you very much Sravan. I have when through the process again for several times. When I try to access the couchdb database using the curl command it's giving the the error:

{"error":"internal_server_error","reason":"No DB shards could be opened.","ref":3096826546}.

I might still be missing something in the process but I have followed it to the letter.

Kindly advise.
Fredrick

Hello Sravan,

Got my problem sorted out. I was not able to use the restore instructions in the documentation it still were ending me up in the same situation. I managed to sort it out by using couchdb-dump to backup and restore into the new instance it worked like a charm. Thank you very much for your support really appreciate.

Fredrick

@fchiyenda which couchdb-dump did you use? I see there are a few online.
I have found this: GitHub - danielebailo/couchdb-dump: Bash command line scripts to dump &restore a couchdb database
There's also: GitHub - aphexcreations/couchdbdump: CouchDB Dump
and GitHub - zebooka/couchdb-dump: Ultimate Dump and Restore php scripts tools for CouchDB

Thanks!

Hello Ed,

Sorry for the late reply.

We used the first link GitHub - danielebailo/couchdb-dump: Bash command line scripts to dump &restore a couchdb database

Fredrick

1 Like