WINRM Connection always ends up with "STDERR An error occurred while creating the pipeline"

Hi
Any task i run is followed by this WINRM error
I am not sure it’s an error since the task is done successfully, does someone knows about this?

`

TASK [Create KIT folder if missing] ****************************************************************************************************************************************************************************************************************************************************************************************
task path: /ansible/scripts/vs2012.yaml:5
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/windows/win_file.ps1
ESTABLISH WINRM CONNECTION FOR USER: ansible on PORT 5986 TO hasjrwts02
creating Kerberos CC at /tmp/tmpnaEGzD
calling kinit for principal ansible
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/windows/win_file.ps1
ESTABLISH WINRM CONNECTION FOR USER: ansible on PORT 5986 TO hasjrwts01
creating Kerberos CC at /tmp/tmpDGNECq
calling kinit for principal ansible
kinit succeeded for principal ansible
WINRM CONNECT: transport=kerberos endpoint=https://hasjrwts02:5986/wsman
kinit succeeded for principal ansible
WINRM CONNECT: transport=kerberos endpoint=https://hasjrwts01:5986/wsman
WINRM OPEN SHELL: F95EFA87-3A14-4F69-AC9B-2BD43120BC93
EXEC (via pipeline wrapper)
WINRM EXEC ‘PowerShell’ [‘-NoProfile’, ‘-NonInteractive’, ‘-ExecutionPolicy’, ‘Unrestricted’, ‘-’]
WINRM OPEN SHELL: 421A5D1E-4BC3-42C9-8E02-4B8F28EBDDD7
EXEC (via pipeline wrapper)
WINRM EXEC ‘PowerShell’ [‘-NoProfile’, ‘-NonInteractive’, ‘-ExecutionPolicy’, ‘Unrestricted’, ‘-’]
WINRM RESULT u’<Response code 0, out “{“changed”:true}\r\n”, err “An error occurred wh”>’
WINRM STDOUT {“changed”:true}

WINRM STDERR An error occurred while creating the pipeline.

  • CategoryInfo : NotSpecified: (:slight_smile: , ParentContainsErrorRecordException
  • FullyQualifiedErrorId : RuntimeException

WINRM CLOSE SHELL: F95EFA87-3A14-4F69-AC9B-2BD43120BC93
WINRM RESULT u’<Response code 0, out “{“changed”:true}\r\n”, err “An error occurred wh”>’
WINRM STDOUT {“changed”:true}

WINRM STDERR An error occurred while creating the pipeline.

  • CategoryInfo : NotSpecified: (:slight_smile: , ParentContainsErrorRecordException
  • FullyQualifiedErrorId : RuntimeException

WINRM CLOSE SHELL: 421A5D1E-4BC3-42C9-8E02-4B8F28EBDDD7
changed: [hasjrwts02] => {
“changed”: true
}
changed: [hasjrwts01] => {
“changed”: true
}

`

This is a known issue, technically an error did occur but it does not affect the actual module execution. It was fixed a while ago in the devel branch for the 2.5 release but was only recently back ported to 2.4 and will be available in the 2.4.4 release.

2.5 commit

https://github.com/ansible/ansible/commit/7fce636c2b250aa6ffd7322f03a0c982ecd802e3#diff-9b6915232549a7bcd00b8b8f142b7232

2.4.4 commit

https://github.com/ansible/ansible/commit/e27847eda8d1ea05da8a1b96e085f41134faff94

Thanks

Jordan

Thank you Jordan, really appreciate.
I am still not sure it doesn’t affect module execution, i have some issues executing win_package. Maybe not related.

It wouldn’t be, those issue seem to be unrelated. In most cases a fatal exception will return a return code that is not 0, in this case rc is still 0.

Thanks

You were right, my issue was in my code.
I’ve “patched” my ansible with the github version and i don’t have the error anymore.
Thanks a lot!