cloudera-deploy icon indicating copy to clipboard operation
cloudera-deploy copied to clipboard

Running playbook in DEBUG fails on localhost ssh connection

Open jkovacs-hwx opened this issue 4 years ago • 2 comments

I tried to run the playbook in DEBUG mode and found that a local ssh connection failed: [email protected]: Permission denied (publickey,password)

Turned out that in cloudera-deploy ~/.ssh is mounted under /home/runner/.ssh and HOME is set to be /home/runner… but in debug mode some bits still depend on /root/.ssh/. Copying content from /home/runner/.ssh/ to /root/.ssh/ solved these issues.

TASK [cloudera.cluster.repometa : Download parcel manifest information url={{ repository | regex_replace('/?$','') + '/manifest.json' }}, status_code=200, body_format=json, retu
rn_content=True, url_username={{ parcel_repo_username | default(omit) }}, url_password={{ parcel_repo_password | default(omit) }}] ***
task path: /opt/cldr-runner/collections/ansible_collections/cloudera/cluster/roles/deployment/repometa/tasks/parcels.yml:17
Monday 31 May 2021  07:32:09 +0000 (0:00:00.111)       0:00:24.509 ************
 11741 1622446329.37654: sending task start callback
 11741 1622446329.37659: entering _queue_task() for localhost/uri
...
<127.0.0.1> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbas
ed,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/runner/.ansible/cp/21f0e6a9ae 127.0.0.1 '/bin/sh -c '"'"'echo ~root && sleep 0'"'"''
 12412 1622446329.49261: stderr chunk (state=2):
>>>OpenSSH_8.0p1, OpenSSL 1.1.1g FIPS  21 Apr 2020
...
 12412 1622446345.11344: stderr chunk (state=3):
>>>debug3: authmethod_lookup publickey
debug3: remaining preferred: ,gssapi-keyex,hostbased,publickey
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /root/.ssh/id_rsa
debug3: no such identity: /root/.ssh/id_rsa: No such file or directory
...
[email protected]: Permission denied (publickey,password).```

jkovacs-hwx avatar Jun 01 '21 09:06 jkovacs-hwx

How did you run "debug" mode?

wmudge avatar Aug 04 '21 14:08 wmudge

Can't remember if it was with ANSIBLE_DEBUG=true and/or with ANSIBLE_ENABLE_TASK_DEBUGGER=true

jkovacs-hwx avatar Aug 04 '21 14:08 jkovacs-hwx