winrm send_input failed

1,102 views
Skip to first unread message

Tomas Hradecky

unread,
Apr 19, 2018, 10:35:59 AM4/19/18
to Ansible Project
Hello guys,

I work on Ansible playbook for automatic deployment of LogicMonitor Collector on Windows machine but unfortunately i'm stucked by WinRMOperation TimeoutError. I've configured Windows machine like is said in documentation by script and any other templates which i  tried works well, but here I do not know what next should I try. When I've tried it on Linux machine everything works well but I have to deploy on Windows machine cause of another application which I need there. Playbook, Trace and Group_vars are down bellow. I appreciate every help.

PLAYBOOK:
---
- hosts: opsmonitoring
  gather_facts: False
  tasks:
    - name: Deploy/verify LogicMonitor collectors
      logicmonitor:
        target: collector
        action: add
        displayname: "newCollector"
        company: mycompany
        user: myuser
        password: mypassword


TRACE:
 [WARNING]: FATAL ERROR DURING FILE TRANSFER: Traceback (most recent call last):   File "/home/opsadmin/.local/lib/python2.7
/site-packages/ansible/plugins/connection/winrm.py", line 276, in _winrm_exec     self._winrm_send_input(self.protocol,
self.shell_id, command_id, data, eof=is_last)   File "/home/opsadmin/.local/lib/python2.7/site-
packages/ansible/plugins/connection/winrm.py", line 256, in _winrm_send_input
protocol.send_message(xmltodict.unparse(rq))   File "/home/opsadmin/.local/lib/python2.7/site-packages/winrm/protocol.py",
line 256, in send_message     raise WinRMOperationTimeoutError() WinRMOperationTimeoutError

fatal: [omsmonitoring-us]: FAILED! => {"msg": "winrm send_input failed"}
        to retry, use: --limit @/etc/ansible/add_collector.retry

GROUP_VARS:
---
ansible_port: 5986
ansible_connection: winrm
ansible_winrm_server_cert_validation: ignore
ansible_winrm_transport: basic
ansible_winrm_operation_timeout_sec: 90
ansible_winrm_read_timeout_sec: 100



Jordan Borean

unread,
Apr 19, 2018, 4:07:23 PM4/19/18
to Ansible Project
You can't run Python modules on Windows, it is trying to run a basic wrapper and sending the Python module as input through stdin but that fails as the wrapper is not expecting that.

Thanks

Jordan

Tomas Hradecky

unread,
Apr 20, 2018, 3:17:50 AM4/20/18
to Ansible Project
Aha, should I able to solve it by installing Python on Windows ?

Tomas

Dne čtvrtek 19. dubna 2018 16:35:59 UTC+2 Tomas Hradecky napsal(a):

Jordan Borean

unread,
Apr 20, 2018, 7:39:33 AM4/20/18
to Ansible Project
Unfortunately no, even with Python installed it still won’t work right now on Windows. The WinRM/powershell plugin combo is a bit too hard coded and doesn’t support different module types apart from pure binary ones.

Thanks

Jordan

Pramod Thombare

unread,
Aug 12, 2019, 9:58:40 AM8/12/19
to Ansible Project

Pramod Thombare

unread,
Aug 12, 2019, 10:00:10 AM8/12/19
to Ansible Project
Hello TOmas ,

I am trying to connect windows through linux master ansible but it shows "winrm send_input failed when i try to ping widows host , will u guide me how u did these .


On Thursday, 19 April 2018 20:05:59 UTC+5:30, Tomas Hradecky wrote:
Reply all
Reply to author
Forward
0 new messages