Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to connect to windows host at handlers section #13526

Closed
ynaka81 opened this issue Dec 12, 2015 · 1 comment
Closed

Failed to connect to windows host at handlers section #13526

ynaka81 opened this issue Dec 12, 2015 · 1 comment
Assignees
Labels
bug This issue/PR relates to a bug. windows Windows community
Milestone

Comments

@ynaka81
Copy link

ynaka81 commented Dec 12, 2015

Issue Type:

Bug Report

Ansible Version:
$ ansible --version
ansible 2.1.0 (devel 14f3739260)
Environment:

ubuntu 14.04

Summary:

Failed to connect windows host at handlers section.
The connection at handlers section seems to be ssh, although the target host is windows.

Steps To Reproduce:

The playbook is below.


---
- hosts: windows
  remote_user: vagrant
  handlers:
          - name: handlers test
            win_ping:
  tasks:
          - name: ping
            win_ping:
            changed_when: True
            notify: handlers test

and the inventory is,

[windows]
192.168.33.100

[windows:vars]
ansible_user=vagrant
ansible_password=vagrant
ansible_port=5986
ansible_connection=winrm
Actual Results:
PLAY ***************************************************************************

TASK [setup] *******************************************************************
ok: [192.168.33.100]

TASK [ping] ********************************************************************
changed: [192.168.33.100]

RUNNING HANDLER [handlers test] ************************************************
fatal: [192.168.33.100]: UNREACHABLE! => {"changed": false, "msg": "ERROR! SSH encountered an unknown error during the connection. We recommend you re-run the command using -vvvv, which will enable SSH debugging output to help diagnose the issue", "unreachable": true}

PLAY RECAP *********************************************************************
192.168.33.100             : ok=2    changed=1    unreachable=1    failed=0

with debug option,

RUNNING HANDLER [handlers test] ************************************************
<192.168.33.100> ESTABLISH SSH CONNECTION FOR USER: vagrant
<192.168.33.100> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=vagrant -o ConnectTimeout=10 -o ControlPath=/home/nakagawa/.ansible/cp/ansible-ssh-%h-%p-%r -tt 192.168.33.100 '( umask 22 && mkdir -p "$( echo $HOME/.ansible/tmp/ansible-tmp-1449930524.88-211750385473219 )" && echo "$( echo $HOME/.ansible/tmp/ansible-tmp-1449930524.88-211750385473219 )" )'
fatal: [192.168.33.100]: UNREACHABLE! => {"changed": false, "msg": "ERROR! SSH encountered an unknown error. The output was:\nOpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug1: Control socket \"/home/nakagawa/.ansible/cp/ansible-ssh-192.168.33.100-22-vagrant\" does not exist\r\ndebug2: ssh_connect: needpriv 0\r\ndebug1: Connecting to 192.168.33.100 [192.168.33.100] port 22.\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: connect to address 192.168.33.100 port 22: Connection timed out\r\nssh: connect to host 192.168.33.100 port 22: Connection timed out\r\n", "unreachable": true}
@jimi-c
Copy link
Member

jimi-c commented Dec 16, 2015

Closing This Ticket

Hi!

We believe the above commit should resolve this problem for you. This will also be included in the next major release.

If you continue seeing any problems related to this issue, or if you have any further questions, please let us know by stopping by one of the two mailing lists, as appropriate:

Because this project is very active, we're unlikely to see comments made on closed tickets, but the mailing list is a great way to ask questions, or post if you don't think this particular issue is resolved.

Thank you!

@ansibot ansibot added bug This issue/PR relates to a bug. and removed bug_report labels Mar 7, 2018
@dagwieers dagwieers added the windows Windows community label Feb 8, 2019
@ansible ansible locked and limited conversation to collaborators Apr 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue/PR relates to a bug. windows Windows community
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants