Thanks! It worked well after redeploying on fresh VM. But now at the stage commcare-cloud cchq deploy
I've got a warning:
Are you sure you want to preindex and deploy to cchq? [y/N]y
Vault Password for 'cchq':
Sending email: lamp has initiated a CommCare HQ deploy to cchq
Ubuntu 18.04.6 LTS
Enter passphrase for key '/home/lamp/.ssh/id_rsa':
Connection to 192.169.233.128 closed.
commcare-cloud cchq fab deploy_commcare --set code_branch=master --branch master
fab -f /home/lamp/commcare-cloud/src/commcare_cloud/fabfile.py cchq deploy_commcare --set code_branch=master --disable-known-hosts --system-known-hosts /home/lamp/environments/cchq/known_hosts
[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details
Using commcare-hq branch master
[192.169.233.128] Executing task 'deploy_commcare'
[192.169.233.128] Executing task '_setup_release'
[192.169.233.128] Executing task 'create'
[192.169.233.128] sudo: mkdir -p /home/cchq/www/cchq/releases/2022-07-07_14.18
Fatal error: Needed to prompt for a connection or sudo password (host: 192.169.233.128), but input would be ambiguous in parallel mode
Aborting.
!!! Parallel execution exception under host '192.169.233.128':
Process 192.169.233.128:
Traceback (most recent call last):
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/network.py", line 449, in connect
sock=sock
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/paramiko/client.py", line 446, in connect
passphrase,
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/paramiko/client.py", line 764, in _auth
raise saved_exception
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/paramiko/client.py", line 735, in _auth
filename, pkey_class, passphrase
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/paramiko/client.py", line 586, in _key_from_filepath
key = klass.from_private_key_file(key_path, password)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/paramiko/pkey.py", line 235, in from_private_key_file
key = cls(filename=filename, password=password)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/paramiko/rsakey.py", line 55, in init
self._from_private_key_file(filename, password)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/paramiko/rsakey.py", line 175, in _from_private_key_file
data = self._read_private_key_file("RSA", filename, password)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/paramiko/pkey.py", line 308, in _read_private_key_file
data = self._read_private_key(tag, f, password)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/paramiko/pkey.py", line 334, in _read_private_key
data = self._read_private_key_pem(lines, end, password)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/paramiko/pkey.py", line 386, in _read_private_key_pem
raise PasswordRequiredException("Private key file is encrypted")
paramiko.ssh_exception.PasswordRequiredException: Private key file is encrypted
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/tasks.py", line 240, in inner
submit(task.run(*args, **kwargs))
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/tasks.py", line 172, in run
return self.wrapped(*args, **kwargs)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/decorators.py", line 52, in inner_decorator
return func(*args, **kwargs)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/decorators.py", line 180, in inner
return func(*args, **kwargs)
File "/home/lamp/commcare-cloud/src/commcare_cloud/fab/operations/release.py", line 203, in create
sudo('mkdir -p {}'.format(env.code_root))
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/network.py", line 654, in host_prompting_wrapper
return func(*args, **kwargs)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/operations.py", line 1121, in sudo
stderr=stderr, timeout=timeout, shell_escape=shell_escape,
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/operations.py", line 929, in _run_command
channel=default_channel(), command=wrapped_command, pty=pty,
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/state.py", line 397, in default_channel
chan = _open_session()
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/state.py", line 389, in _open_session
return connections[env.host_string].get_transport().open_session()
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/network.py", line 156, in getitem
self.connect(key)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/network.py", line 148, in connect
user, host, port, cache=self, seek_gateway=seek_gateway)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/network.py", line 528, in connect
password = prompt_for_password(text)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/network.py", line 605, in prompt_for_password
handle_prompt_abort("a connection or sudo password")
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/utils.py", line 184, in handle_prompt_abort
abort(reason % "input would be ambiguous in parallel mode")
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/utils.py", line 55, in abort
raise env.abort_exception(msg)
Exception: Needed to prompt for a connection or sudo password (host: 192.169.233.128), but input would be ambiguous in parallel mode
Fatal error: One or more hosts failed while executing task 'create'
Underlying exception:
Needed to prompt for a connection or sudo password (host: 192.169.233.128), but input would be ambiguous in parallel mode
Aborting.
[192.169.233.128] Executing task 'send_email'
[192.169.233.128] sudo: /home/cchq/www/cchq/releases/2022-07-07_14.18/python_env/bin/python manage.py send_email --to-admins --subject 'Deploy to cchq failed. Try resuming with fab cchq deploy:resume=yes.' 'Traceback:
File "/home/lamp/commcare-cloud/src/commcare_cloud/fab/fabfile.py", line 398, in _deploy_without_asking
deploy_checkpoint(index, command.name, execute_with_timing, command)
File "/home/lamp/commcare-cloud/src/commcare_cloud/fab/fabfile.py", line 391, in deploy_checkpoint
fn(*args, **kwargs)
File "/home/lamp/commcare-cloud/src/commcare_cloud/fab/utils.py", line 25, in execute_with_timing
execute(fn, *args, **kwargs)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/tasks.py", line 385, in execute
multiprocessing
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/tasks.py", line 275, in _execute
return task.run(*args, **kwargs)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/tasks.py", line 172, in run
return self.wrapped(*args, **kwargs)
File "/home/lamp/commcare-cloud/src/commcare_cloud/fab/fabfile.py", line 319, in _setup_release
execute_with_timing(release.create_code_dir(full_cluster))
File "/home/lamp/commcare-cloud/src/commcare_cloud/fab/utils.py", line 25, in execute_with_timing
execute(fn, *args, **kwargs)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/tasks.py", line 417, in execute
error(err, exception=d['"'"'results'"'"'])
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/utils.py", line 359, in error
return func(message)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/utils.py", line 55, in abort
raise env.abort_exception(msg)
Exception: One or more hosts failed while executing task '"'"'create'"'"'
Underlying exception:
Needed to prompt for a connection or sudo password (host: 192.169.233.128), but input would be ambiguous in parallel mode'
[192.169.233.128] Passphrase for private key:
[192.169.233.128] out: /bin/bash: line 0: cd: /home/cchq/www/cchq/releases/2022-07-07_14.18: No such file or directory
[192.169.233.128] out:
Fatal error: sudo() received nonzero return code 1 while executing!
Requested: /home/cchq/www/cchq/releases/2022-07-07_14.18/python_env/bin/python manage.py send_email --to-admins --subject 'Deploy to cchq failed. Try resuming with fab cchq deploy:resume=yes.' 'Traceback:
File "/home/lamp/commcare-cloud/src/commcare_cloud/fab/fabfile.py", line 398, in _deploy_without_asking
deploy_checkpoint(index, command.name, execute_with_timing, command)
File "/home/lamp/commcare-cloud/src/commcare_cloud/fab/fabfile.py", line 391, in deploy_checkpoint
fn(*args, **kwargs)
File "/home/lamp/commcare-cloud/src/commcare_cloud/fab/utils.py", line 25, in execute_with_timing
execute(fn, *args, **kwargs)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/tasks.py", line 385, in execute
multiprocessing
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/tasks.py", line 275, in _execute
return task.run(*args, **kwargs)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/tasks.py", line 172, in run
return self.wrapped(*args, **kwargs)
File "/home/lamp/commcare-cloud/src/commcare_cloud/fab/fabfile.py", line 319, in _setup_release
execute_with_timing(release.create_code_dir(full_cluster))
File "/home/lamp/commcare-cloud/src/commcare_cloud/fab/utils.py", line 25, in execute_with_timing
execute(fn, *args, **kwargs)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/tasks.py", line 417, in execute
error(err, exception=d['"'"'results'"'"'])
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/utils.py", line 359, in error
return func(message)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/utils.py", line 55, in abort
raise env.abort_exception(msg)
Exception: One or more hosts failed while executing task '"'"'create'"'"'
Underlying exception:
Needed to prompt for a connection or sudo password (host: 192.169.233.128), but input would be ambiguous in parallel mode'
Executed: sudo -S -p 'sudo password:' -H -u "cchq" /bin/bash -l -c "cd /home/cchq/www/cchq/releases/2022-07-07_14.18 >/dev/null && /home/cchq/www/cchq/releases/2022-07-07_14.18/python_env/bin/python manage.py send_email --to-admins --subject 'Deploy to cchq failed. Try resuming with fab cchq deploy:resume=yes.' 'Traceback:
File "/home/lamp/commcare-cloud/src/commcare_cloud/fab/fabfile.py", line 398, in _deploy_without_asking
deploy_checkpoint(index, command.name, execute_with_timing, command)
File "/home/lamp/commcare-cloud/src/commcare_cloud/fab/fabfile.py", line 391, in deploy_checkpoint
fn(*args, **kwargs)
File "/home/lamp/commcare-cloud/src/commcare_cloud/fab/utils.py", line 25, in execute_with_timing
execute(fn, *args, **kwargs)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/tasks.py", line 385, in execute
multiprocessing
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/tasks.py", line 275, in _execute
return task.run(*args, **kwargs)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/tasks.py", line 172, in run
return self.wrapped(*args, **kwargs)
File "/home/lamp/commcare-cloud/src/commcare_cloud/fab/fabfile.py", line 319, in _setup_release
execute_with_timing(release.create_code_dir(full_cluster))
File "/home/lamp/commcare-cloud/src/commcare_cloud/fab/utils.py", line 25, in execute_with_timing
execute(fn, *args, **kwargs)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/tasks.py", line 417, in execute
error(err, exception=d['"'"'results'"'"'])
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/utils.py", line 359, in error
return func(message)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/utils.py", line 55, in abort
raise env.abort_exception(msg)
Exception: One or more hosts failed while executing task '"'"'create'"'"'
Underlying exception:
Needed to prompt for a connection or sudo password (host: 192.169.233.128), but input would be ambiguous in parallel mode'"
Aborting.
Traceback (most recent call last):
File "/home/lamp/commcare-cloud/src/commcare_cloud/fab/fabfile.py", line 398, in _deploy_without_asking
deploy_checkpoint(index, command.name, execute_with_timing, command)
File "/home/lamp/commcare-cloud/src/commcare_cloud/fab/fabfile.py", line 391, in deploy_checkpoint
fn(*args, **kwargs)
File "/home/lamp/commcare-cloud/src/commcare_cloud/fab/utils.py", line 25, in execute_with_timing
execute(fn, *args, **kwargs)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/tasks.py", line 385, in execute
multiprocessing
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/tasks.py", line 275, in _execute
return task.run(*args, **kwargs)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/tasks.py", line 172, in run
return self.wrapped(*args, **kwargs)
File "/home/lamp/commcare-cloud/src/commcare_cloud/fab/fabfile.py", line 319, in _setup_release
execute_with_timing(release.create_code_dir(full_cluster))
File "/home/lamp/commcare-cloud/src/commcare_cloud/fab/utils.py", line 25, in execute_with_timing
execute(fn, *args, **kwargs)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/tasks.py", line 417, in execute
error(err, exception=d['results'])
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/utils.py", line 359, in error
return func(message)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/utils.py", line 55, in abort
raise env.abort_exception(msg)
Exception: One or more hosts failed while executing task 'create'
Underlying exception:
Needed to prompt for a connection or sudo password (host: 192.169.233.128), but input would be ambiguous in parallel mode
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/main.py", line 749, in main
*args, **kwargs
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/tasks.py", line 385, in execute
multiprocessing
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/tasks.py", line 275, in _execute
return task.run(*args, **kwargs)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/tasks.py", line 172, in run
return self.wrapped(*args, **kwargs)
File "/home/lamp/commcare-cloud/src/commcare_cloud/fab/fabfile.py", line 542, in deploy_commcare
_deploy_without_asking(skip_record)
File "/home/lamp/commcare-cloud/src/commcare_cloud/fab/fabfile.py", line 412, in _deploy_without_asking
traceback_string()
File "/home/lamp/commcare-cloud/src/commcare_cloud/fab/utils.py", line 25, in execute_with_timing
execute(fn, *args, **kwargs)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/tasks.py", line 385, in execute
multiprocessing
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/tasks.py", line 275, in _execute
return task.run(*args, **kwargs)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/tasks.py", line 172, in run
return self.wrapped(*args, **kwargs)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/decorators.py", line 52, in inner_decorator
return func(*args, **kwargs)
File "/home/lamp/commcare-cloud/src/commcare_cloud/fab/fabfile.py", line 242, in send_email
f'{virtualenv_dir}/bin/python manage.py '
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/network.py", line 654, in host_prompting_wrapper
return func(*args, **kwargs)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/operations.py", line 1121, in sudo
stderr=stderr, timeout=timeout, shell_escape=shell_escape,
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/operations.py", line 952, in _run_command
error(message=msg, stdout=out, stderr=err)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/utils.py", line 359, in error
return func(message)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/utils.py", line 55, in abort
raise env.abort_exception(msg)
Exception: sudo() received nonzero return code 1 while executing!
Requested: /home/cchq/www/cchq/releases/2022-07-07_14.18/python_env/bin/python manage.py send_email --to-admins --subject 'Deploy to cchq failed. Try resuming with fab cchq deploy:resume=yes.' 'Traceback:
File "/home/lamp/commcare-cloud/src/commcare_cloud/fab/fabfile.py", line 398, in _deploy_without_asking
deploy_checkpoint(index, command.name, execute_with_timing, command)
File "/home/lamp/commcare-cloud/src/commcare_cloud/fab/fabfile.py", line 391, in deploy_checkpoint
fn(*args, **kwargs)
File "/home/lamp/commcare-cloud/src/commcare_cloud/fab/utils.py", line 25, in execute_with_timing
execute(fn, *args, **kwargs)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/tasks.py", line 385, in execute
multiprocessing
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/tasks.py", line 275, in _execute
return task.run(*args, **kwargs)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/tasks.py", line 172, in run
return self.wrapped(*args, **kwargs)
File "/home/lamp/commcare-cloud/src/commcare_cloud/fab/fabfile.py", line 319, in _setup_release
execute_with_timing(release.create_code_dir(full_cluster))
File "/home/lamp/commcare-cloud/src/commcare_cloud/fab/utils.py", line 25, in execute_with_timing
execute(fn, *args, **kwargs)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/tasks.py", line 417, in execute
error(err, exception=d['"'"'results'"'"'])
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/utils.py", line 359, in error
return func(message)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/utils.py", line 55, in abort
raise env.abort_exception(msg)
Exception: One or more hosts failed while executing task '"'"'create'"'"'
Underlying exception:
Needed to prompt for a connection or sudo password (host: 192.169.233.128), but input would be ambiguous in parallel mode'
Executed: sudo -S -p 'sudo password:' -H -u "cchq" /bin/bash -l -c "cd /home/cchq/www/cchq/releases/2022-07-07_14.18 >/dev/null && /home/cchq/www/cchq/releases/2022-07-07_14.18/python_env/bin/python manage.py send_email --to-admins --subject 'Deploy to cchq failed. Try resuming with fab cchq deploy:resume=yes.' 'Traceback:
File "/home/lamp/commcare-cloud/src/commcare_cloud/fab/fabfile.py", line 398, in _deploy_without_asking
deploy_checkpoint(index, command.name, execute_with_timing, command)
File "/home/lamp/commcare-cloud/src/commcare_cloud/fab/fabfile.py", line 391, in deploy_checkpoint
fn(*args, **kwargs)
File "/home/lamp/commcare-cloud/src/commcare_cloud/fab/utils.py", line 25, in execute_with_timing
execute(fn, *args, **kwargs)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/tasks.py", line 385, in execute
multiprocessing
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/tasks.py", line 275, in _execute
return task.run(*args, **kwargs)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/tasks.py", line 172, in run
return self.wrapped(*args, **kwargs)
File "/home/lamp/commcare-cloud/src/commcare_cloud/fab/fabfile.py", line 319, in _setup_release
execute_with_timing(release.create_code_dir(full_cluster))
File "/home/lamp/commcare-cloud/src/commcare_cloud/fab/utils.py", line 25, in execute_with_timing
execute(fn, *args, **kwargs)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/tasks.py", line 417, in execute
error(err, exception=d['"'"'results'"'"'])
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/utils.py", line 359, in error
return func(message)
File "/home/lamp/.virtualenvs/cchq/lib/python3.6/site-packages/fabric/utils.py", line 55, in abort
raise env.abort_exception(msg)
Exception: One or more hosts failed while executing task '"'"'create'"'"'
Underlying exception:
Needed to prompt for a connection or sudo password (host: 192.169.233.128), but input would be ambiguous in parallel mode'"
Disconnecting from 192.169.233.128... done.
Sending email: CommCare HQ deploy to cchq failed
Ubuntu 18.04.6 LTS
Enter passphrase for key '/home/lamp/.ssh/id_rsa':
Connection to 192.169.233.128 closed.
Skipping formplayer because commcare failed
Any help would be appreciated.