ansible-collections / ansible.windows

Windows core collection for Ansible
https://galaxy.ansible.com/ansible/windows
GNU General Public License v3.0
233 stars 157 forks source link

ERROR DURING WINRM SEND INPUT - attempting to recover: WinRMTransportError Bad HTTP response returned from server. Code 413 #620

Open Denilson388 opened 2 weeks ago

Denilson388 commented 2 weeks ago

Hello community,

I hope you are very well.

I am currently connecting to a server from ansible but I am getting this error: [WARNING]: ERROR DURING WINRM SEND INPUT - attempting to recover: WinRMTransportError Bad HTTP response returned from server. Code 413.

I have the ansible configuration like this:

ansible_user: "{{ansible_user}}"
ansible_password: "{{ansible_password}}"
ansible_connection: "winrm"
ansible_port: 5986
ansible_winrm_scheme: https
ansible_winrm_server_cert_validation: ignore
ansible_winrm_transport: ntlm
ansible_python_interpreter: /usr/bin/python3

I think it's because of the WINRM configuration.

Actually I only enable HTTPS transport with port 5986. but not HTTP, this could be a reason why this error is generated?

I remain attentive to your comments, thank you very much.

jborean93 commented 2 weeks ago

HTTP 413 is content too large, potentially your server has a smaller value set than what Ansible is trying to use.

This has no bearing on HTTP or HTTPS, it's the WinRM service complaining the data it is given is too large.