We are currently facing an issue with my CouchDB migration process, and I’m seeking some assistance to resolve it. Here are the details of the problem, whenever, I run the migration scripts.
Error Message: An unexpected error occurred: Failed to connect to CouchDb. Please verify that the COUCH_URL provided is reachable through the Docker network.
I’ve set the COUCH_URL accordingly: export COUCH_URL=https://medic:password@172.18.0.3:5984
Despite ensuring that the COUCH_URL is correctly configured, atleast from where I stand, the issue persists. I have verified that all these executions are happening within the Docker network context. However, it seems like something else might be missing.
@mrjones - Thank you for your prompt response. Here are the details regarding the CouchDB migration issue:
What CHT Core version are you one, and which version are you trying to go to?
I am currently on version 3.17.2 and attempting to upgrade to version 4.0.0.
Is this an in-place upgrade or are you moving from an server with CHT older version to a server with CHT newer version ?
I am using a single-node CouchDB setup.
Can you link to the documentation you’re following and specify the last step you followed before seeing the error?
I am following the migration guide provided in the documentation here. The migration process fails at this step: docker-compose run couch-migration pre-index-views 4.0.0, where pre-indexing of views in preparation for the upgrade happens.
Thanks for the details! This is really helpful. While I’ll need to ask some other teammates for help on the specific trouble shooting, I do recommend going to at least 4.0.1 as it has important fixes we on top of 4.0.0.
Checking your COUCH_URL, have you verified that this URL is indeed accessible? You should be able to curl it. My suspicion is that CouchDb is not available through https and you’d need to change the URL to: