cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
618
Views
1
Helpful
3
Replies

Ansible - sftp transfer mechanism

Netmart
Level 1
Level 1

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 

3 Replies 3

M02@rt37
VIP
VIP

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.

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

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

 

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 ?

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.