Fresh installation commcare hq task migrate db error

hi every one i was Setting up a new CommCareHQ environment on a single machine, and steps i followed is based on the documentions http://dimagi.github.io/commcare-cloud/setup/new_environment.html. after progressing much more i have been able to hunge up on the task migartion db error ,
steps followed ,
step 1 , sudo -iu cchq
step 2 cd www/monolith/current
step 3 source python3.6/bin/activate
step 4 ./manage.py migrate_multi --noinput
after this steps the errors pops up please find below error
2020-12-09 15:31:35,341 INFO AXES: BEGIN LOG

The following databases will be migrated:

  • default
  • p1
  • p2
  • proxy
  • synclogs

The following databases will be skipped:

  • ucr

  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/urllib3/connection.py", line 160, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/urllib3/util/connection.py", line 84, in create_connection
    raise err
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/urllib3/util/connection.py", line 74, in create_connection
    sock.connect(sa)
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/gevent/_socket3.py", line 335, in connect
    raise error(err, strerror(err))
TimeoutError: [Errno 110] Connection timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/urllib3/connectionpool.py", line 677, in urlopen
    chunked=chunked,
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/urllib3/connectionpool.py", line 392, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python3.6/http/client.py", line 1281, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.6/http/client.py", line 1327, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.6/http/client.py", line 1276, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.6/http/client.py", line 1042, in _send_output
    self.send(msg)
  File "/usr/lib/python3.6/http/client.py", line 980, in send
    self.connect()
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/urllib3/connection.py", line 187, in connect
    conn = self._new_conn()
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/urllib3/connection.py", line 172, in _new_conn
    self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f1c353e8e80>: Failed to establish a new connection: [Errno 110] Connection timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/urllib3/connectionpool.py", line 727, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/urllib3/util/retry.py", line 439, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='123', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f1c353e8e80>: Failed to establish a new connection: [Errno 110] Connection timed out',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "src/gevent/greenlet.py", line 766, in gevent._greenlet.Greenlet.run
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/corehq/sql_db/management/commands/migrate_multi.py", line 41, in migrate_db
    call_command('migrate', *args, **call_options)
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/django/core/management/__init__.py", line 148, in call_command
    return command.execute(*args, **defaults)
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/django/core/management/base.py", line 364, in execute
    output = self.handle(*args, **options)
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/django/core/management/base.py", line 83, in wrapped
    res = handle_func(*args, **kwargs)
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/django/core/management/commands/migrate.py", line 193, in handle
    self.verbosity, self.interactive, connection.alias, apps=pre_migrate_apps, plan=plan,
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/django/core/management/sql.py", line 34, in emit_pre_migrate_signal
    **kwargs
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/django/dispatch/dispatcher.py", line 175, in send
    for receiver in self._live_receivers(sender)
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/django/dispatch/dispatcher.py", line 175, in <listcomp>
    for receiver in self._live_receivers(sender)
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/corehq/preindex/models.py", line 17, in catch_signal
    plugin.sync_design_docs()
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/corehq/preindex/preindex_plugins.py", line 45, in sync_design_docs
    for design in self.get_designs():
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/corehq/preindex/preindex_plugins.py", line 26, in get_designs
    for design in self._get_designs():
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/corehq/preindex/default_plugin.py", line 21, in _get_designs
    couch_config.get_db_uri_for_app_label(self.app_config.label), create=True)
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/couchdbkit/client.py", line 286, in __init__
    self.cloudant_database.create()
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/cloudant/database.py", line 421, in create
    if not throw_on_exists and self.exists():
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/cloudant/database.py", line 130, in exists
    resp = self.r_session.head(self.database_url)
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/requests/sessions.py", line 565, in head
    return self.request('HEAD', url, **kwargs)
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/cloudant/_client_session.py", line 131, in request
    method, url, auth=auth, **kwargs)
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/couchdbkit/logging.py", line 59, in request
    resp = real_request(self, method, url, **kwargs)
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/cloudant/_client_session.py", line 66, in request
    method, url, timeout=self._timeout, **kwargs)
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='123', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f1c353e8e80>: Failed to establish a new connection: [Errno 110] Connection timed out',))
2020-12-09T15:33:46Z <Greenlet at 0x7f1c35e66148: migrate_db('default')> failed with ConnectionError


======================= Error During Migration =======================
<Greenlet at 0x7f1c35e66148: migrate_db('default')>
Traceback (most recent call last):
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/urllib3/connection.py", line 160, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/urllib3/util/connection.py", line 84, in create_connection
    raise err
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/urllib3/util/connection.py", line 74, in create_connection
    sock.connect(sa)
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/gevent/_socket3.py", line 335, in connect
    raise error(err, strerror(err))
TimeoutError: [Errno 110] Connection timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/urllib3/connectionpool.py", line 677, in urlopen
    chunked=chunked,
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/urllib3/connectionpool.py", line 392, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python3.6/http/client.py", line 1281, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.6/http/client.py", line 1327, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.6/http/client.py", line 1276, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.6/http/client.py", line 1042, in _send_output
    self.send(msg)
  File "/usr/lib/python3.6/http/client.py", line 980, in send
    self.connect()
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/urllib3/connection.py", line 187, in connect
    conn = self._new_conn()
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/urllib3/connection.py", line 172, in _new_conn
    self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f1c353e8e80>: Failed to establish a new connection: [Errno 110] Connection timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/urllib3/connectionpool.py", line 727, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/urllib3/util/retry.py", line 439, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='123', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f1c353e8e80>: Failed to establish a new connection: [Errno 110] Connection timed out',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/corehq/sql_db/management/commands/migrate_multi.py", line 64, in handle
    job.get()
  File "src/gevent/greenlet.py", line 683, in gevent._greenlet.Greenlet.get
  File "src/gevent/greenlet.py", line 317, in gevent._greenlet.Greenlet._raise_exception
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/gevent/_compat.py", line 47, in reraise
    raise value.with_traceback(tb)
  File "src/gevent/greenlet.py", line 766, in gevent._greenlet.Greenlet.run
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/corehq/sql_db/management/commands/migrate_multi.py", line 41, in migrate_db
    call_command('migrate', *args, **call_options)
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/django/core/management/__init__.py", line 148, in call_command
    return command.execute(*args, **defaults)
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/django/core/management/base.py", line 364, in execute
    output = self.handle(*args, **options)
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/django/core/management/base.py", line 83, in wrapped
    res = handle_func(*args, **kwargs)
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/django/core/management/commands/migrate.py", line 193, in handle
    self.verbosity, self.interactive, connection.alias, apps=pre_migrate_apps, plan=plan,
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/django/core/management/sql.py", line 34, in emit_pre_migrate_signal
    **kwargs
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/django/dispatch/dispatcher.py", line 175, in send
    for receiver in self._live_receivers(sender)
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/django/dispatch/dispatcher.py", line 175, in <listcomp>
    for receiver in self._live_receivers(sender)
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/corehq/preindex/models.py", line 17, in catch_signal
    plugin.sync_design_docs()
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/corehq/preindex/preindex_plugins.py", line 45, in sync_design_docs
    for design in self.get_designs():
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/corehq/preindex/preindex_plugins.py", line 26, in get_designs
    for design in self._get_designs():
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/corehq/preindex/default_plugin.py", line 21, in _get_designs
    couch_config.get_db_uri_for_app_label(self.app_config.label), create=True)
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/couchdbkit/client.py", line 286, in __init__
    self.cloudant_database.create()
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/cloudant/database.py", line 421, in create
    if not throw_on_exists and self.exists():
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/cloudant/database.py", line 130, in exists
    resp = self.r_session.head(self.database_url)
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/requests/sessions.py", line 565, in head
    return self.request('HEAD', url, **kwargs)
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/cloudant/_client_session.py", line 131, in request
    method, url, auth=auth, **kwargs)
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/couchdbkit/logging.py", line 59, in request
    resp = real_request(self, method, url, **kwargs)
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/cloudant/_client_session.py", line 66, in request
    method, url, timeout=self._timeout, **kwargs)
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/home/cchq/www/monolith/releases/2020-12-09_17.31/python_env-3.6/lib/python3.6/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='123', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f1c353e8e80>: Failed to establish a new connection: [Errno 110] Connection timed out',))

if any body help me i would be happy

Hi,

What part of the setup instructions are you following? I don’t see migrate_multi on that page. Was there a failure in the main deploy-stack command and now you’re trying to run it in sections?

The error messages show timeouts and connection errors, and it looks like it’s dealing with couchdb, so I’d guess that the couchdb service either isn’t running or isn’t accessible at the configured port. It looks like it’s trying to connect a host at 123, port 80. I’d expect 123 to be a valid IP address or URL. Do you know where that came from? Could it be invalid placeholder values put in the inventory file or something similar?

hi @Ethan_Soergel there was failure on the deploy stack and i used the above steps .couch db is up and running i have been able to telnet couch db host and port and responds but the configured port is telnet 127.0.0.1 35984 and it respond ,i didn’t able to trace where host 123 come from not able find but i have checked the public yml file as well not such host is avalibale in the script …but the couchdb password is has a value of 123 . while updating the password if that is the case the system throws an error …do you have any idea on this ?