I have the same issue that I rolled back to 2.4.1.
I have updated the packer.py for the connection_plugsins from github and
updated win_udpates from the github, both didn't worked at all.
However, 2.4.1, I was able to create ami without having the winrm timeout
along with packer v1.2.3.
Good luck.

John.

On Tue, Aug 7, 2018 at 10:37 AM, Scott Garcia <scott.garcia...@gmail.com>
wrote:

> Trying to ping a windows machine, and I'm running into an ambiguous error
> from one of the python modules.  Any suggestion on how to fix this?
>
> ------------------
>
> # ansible windows -i inventory -vvvv -m win_ping
>
>
> ansible 2.6.2
>
>   config file = /home/ec2-user/ansible.cfg
>
>   configured module search path = [u'/usr/share/my_modules']
>
>   ansible python module location = /home/ec2-user/venv/local/lib/
> python2.7/site-packages/ansible
>
>   executable location = /home/ec2-user/venv/bin/ansible
>
>   python version = 2.7.14 (default, May  2 2018, 18:31:34) [GCC 4.8.5
> 20150623 (Red Hat 4.8.5-11)]
>
> Using /home/ec2-user/ansible.cfg as config file
>
> setting up inventory plugins
>
> Parsed /home/ec2-user/inventory inventory source with yaml plugin
>
> Loading callback plugin minimal of type stdout, v2.0 from
> /home/ec2-user/venv/local/lib/python2.7/site-packages/
> ansible/plugins/callback/minimal.pyc
>
> META: ran handlers
>
> Using module file /home/ec2-user/venv/local/lib/python2.7/site-packages/
> ansible/modules/windows/win_ping.ps1
>
> <10.206.46.246> ESTABLISH WINRM CONNECTION FOR USER: lanadmin on PORT 5985
> TO 10.206.46.246
>
> checking if winrm_host 10.206.46.246 is an IPv6 address
>
> <10.206.46.246> WINRM CONNECT: transport=ntlm endpoint=
> http://10.206.46.246:5985/wsman
>
> <10.206.46.246> WINRM CONNECTION ERROR: Parse() argument 1 must be string
> or read-only buffer, not None
>
> Traceback (most recent call last):
>
>   File "/home/ec2-user/venv/local/lib/python2.7/site-packages/
> ansible/plugins/connection/winrm.py", line 386, in _winrm_connect
>
>     self.shell_id = protocol.open_shell(codepage=65001)  # UTF-8
>
>   File 
> "/home/ec2-user/venv/local/lib/python2.7/site-packages/winrm/protocol.py",
> line 161, in open_shell
>
>     root = ET.fromstring(res)
>
>   File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1311, in XML
>
>     parser.feed(text)
>
>   File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1657, in feed
>
>     self._parser.Parse(data, 0)
>
> TypeError: Parse() argument 1 must be string or read-only buffer, not None
>
> windows | UNREACHABLE! => {
>
>     "changed": false,
>
>     "msg": "ntlm: Parse() argument 1 must be string or read-only buffer,
> not None",
>
>     "unreachable": true
>
> }
>
> ----------------------
>
>
> # Inventory settings
>
>
> ansible_host: 10.206.46.246
>
> ansible_user: lanadmin
>
> ansible_password: xxxxxx
>
> ansible_port: 5985
>
> ansible_connection: winrm
>
> ansible_winrm_transport: ntlm
>
> ansible_winrm_server_cert_validation: ignore
>
>
> Attempts at a fix
>
> 1. I've tried changing the authentication type, but it just shows the same
> error message with that authentication type prepended.
>
> 2. I've ran the ConfigureRemotingForAnsible.ps1 script on my windows
> machine
>
> 3. I've tested the windows machine according to https://docs.ansible.com/
> ansible/2.5/user_guide/windows_setup.html#common-winrm-issues
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ansible-project+unsubscr...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/ansible-project/376a58de-64a9-4f38-96f1-09de04539358%40googlegroups.
> com
> <https://groups.google.com/d/msgid/ansible-project/376a58de-64a9-4f38-96f1-09de04539358%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAPxBRp7rKwob1wHV9T-d35uHEvaaDxOk0GDN7rnFV%3Ds%2BqqOEdA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to