Issue with CouchDB Migration: Failed to Connect

Hello Community,

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.

Thank you,
George

@gk0harris - sorry to hear your having issues with your migration - that sounds frustrating!

Can you give some more details about your setup?

  1. What CHT Core version are you one, and which version are you trying to go to?
  2. Is this an in-place upgrade or are you moving from an server with CHT older version to a server with CHT newer version ?
  3. Is this single or multi-node CouchDB?
  4. Can you link to the documentation you’re following and specify the last step you followed before seeing the error?

Thanks!

1 Like

@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.

Thank you,
George.

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.

Otherwise, @henok or @diana or @hareet or @Lorena_Rodriguez - when you get a sec can you suggest a next step for George to take? Thanks!

1 Like

Hi @gk0harris

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:

export COUCH_URL=http://medic:password@172.18.0.3:5984

In any case, the URL that you pass as this environment variable should be accessible and you can easily check this via curl or in your browser.

Please let us know when you make progress on this!