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:
Hello @Diana,- sorry for the delay in providing feedback. we managed to overcome the previous hurdle, and it turned out that the issue was related to the URL itself. Thanks to the valuable insights provided here, we’ve successfully navigated through several migration steps as outlined in the documentation.
However, we’ve encountered a new challenge at the step labeled f) Change metadata to match the new CouchDb node. I once again reach out to this community in the hope of receiving guidance on how to address this particular step.
@diana, having same issues with COUCH_URL, tried using the current password on docker-compose file but can’t connect using curl, thus can’t run the command docker-compose run couch-migration pre-index-views .
Have tried to change the password from
/srv/settings/medic-core/couchdb/local.ini for the user medic and still not working, any other options of getting the correct password for couchDB?
Running supervisor-inspect returns couchDB up as below:
I get the error
`An unexpected error occurred Error: Failed to connect to CouchDb. Please verify that the COUCH_URL provided is reachable through docker network.`
Would appreciate your insights
@yuv, we had a session with Josh and managed to migrate to CHT 4.9, we used the CHT 3.17 CouchDB login details as the CouchURL, but without the port number and we followed the documentation to completion, we are now good, and the current version supports repeat groups and related functions, so our app works as expected, always appreciate the support.