12-10-2023 01:09 AM
Hello,
When Ansible is trying to connect to host [Cisco Cat 6, the following error message appears:
[WARNING]: sftp transfer mechanism failed on [172.16.1.1]. Use ANSIBLE_DEBUG=1 to see detailed information
Below you will find an extract of debug log:
2084530 1702194010.51532: variable 'ansible_host' from source: host vars for cisco.switch@cisco.com'
2084530 1702194010.51624: Set connection var ansible_connection to ssh
2084530 1702194010.51628: Set connection var ansible_pipelining to False
2084530 1702194010.51630: Set connection var ansible_module_compression to ZIP_DEFLATED
2084530 1702194010.51632: Set connection var ansible_shell_executable to /bin/sh
2084530 1702194010.51633: Set connection var ansible_shell_type to sh
2084530 1702194010.51634: Set connection var ansible_user to cisco
2084530 1702194010.51637: Set connection var ansible_timeout to 10
2084530 1702194010.51652: variable 'ansible_shell_executable' from source: unknown
2084530 1702194010.51653: variable 'ansible_connection' from source: unknown
2084530 1702194010.51654: variable 'ansible_module_compression' from source: unknown
2084530 1702194010.51655: variable 'ansible_shell_type' from source: unknown
2084530 1702194010.51655: variable 'ansible_shell_executable' from source: unknow
:
[WARNING]: sftp transfer mechanism failed on [172.16.1.1]. Use ANSIBLE_DEBUG=1 to see detailed information
I would appreciate any help.
Thanks
12-10-2023 02:59 AM
Hello @Netmart
Do you do that as suggested ?
ANSIBLE_DEBUG=1 ansible-playbook your-playbook.yml
This will provide more detailed debugging information, and you may be able to identify the specific reason for the SFTP transfer failure.
12-10-2023 10:13 PM
Hello,
Attached you will find the debug file.
Here is some extract of it:
2084530 1702194010.51532: variable 'ansible_host' from source: host vars for 'CiscoCat6500.cisco.com '
2084530 1702194010.51624: Set connection var ansible_connection to ssh
2084530 1702194010.51628: Set connection var ansible_pipelining to False
2084530 1702194010.51630: Set connection var ansible_module_compression to ZIP_DEFLATED
2084530 1702194010.51632: Set connection var ansible_shell_executable to /bin/sh
2084530 1702194010.51633: Set connection var ansible_shell_type to sh
2084530 1702194010.51634: Set connection var ansible_user to cisco
2084530 1702194010.51637: Set connection var ansible_timeout to 10
2084530 1702194010.51652: variable 'ansible_shell_executable' from source: unknown
2084530 1702194010.51653: variable 'ansible_connection' from source: unknown
2084530 1702194010.51654: variable 'ansible_module_compression' from source: unknown
2084530 1702194010.51655: variable 'ansible_shell_type' from source: unknown
2084530 1702194010.51655: variable 'ansible_shell_executable' from source: unknow
:
[WARNING]: sftp transfer mechanism failed on [172.16.0.1]. Use ANSIBLE_DEBUG=1 to see detailed information
12-10-2023 10:53 PM
Thanks @Netmart for that output.
[WARNING]: scp transfer mechanism failed on [172.28.159.255].
What is this ip ?
Do you check if you can access by ssh the remote equipement from the host you execute this playbook ?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide