Hi,

I am getting following error when i am trying to run a playbook to config a 
windows machine,

Msg: basic: Bad HTTP response returned from server . code 404.

actually the error getting at gathering facts: i have given my windows host 
name 

On Tuesday, May 2, 2017 at 2:33:36 PM UTC-4, Allen Fisher wrote:
>
> Hi All--
>
> I'm running into an issue connecting from an Ubuntu 16.04 system to a 
> Windows 2012 Server on a domain:
>
> afisher@ubuntu:~/Projects/build-utils/ansible-playbooks$ ansible windows 
>> -i inventory.yml -m win_ping -vvvv
>> Using /etc/ansible/ansible.cfg as config file
>> Loading callback plugin minimal of type stdout, v2.0 from 
>> /usr/lib/python2.7/dist-packages/ansible/plugins/callback/__init__.pyc
>>  [WARNING]: ansible_winrm_cert_validation unsupported by pywinrm (is an 
>> up-to-date version of pywinrm installed?)
>> Using module file 
>> /usr/lib/python2.7/dist-packages/ansible/modules/core/windows/win_ping.ps1
>> <edprjenslave03.DOMAIN.COM> ESTABLISH WINRM CONNECTION FOR USER: 
>> afi...@domain.com <javascript:> on PORT 5985 TO edprjenslave03.DOMAIN.COM
>> edprjenslave03.DOMAIN.COM | UNREACHABLE! => {
>>     "changed": false, 
>>     "msg": "kerberos: (u'http', u'Bad HTTP response returned from server. 
>> Code 500'), plaintext: the specified credentials were rejected by the 
>> server", 
>>     "unreachable": true
>> }
>
>
> At first it was just refusing without the kerberos part of the error. 
> Realized I didn't have Kerberos installed. Remedied that:
>
> Ticket cache: FILE:/tmp/krb5cc_1000
>> Default principal: afi...@domain.com <javascript:>
>> Valid starting       Expires              Service principal
>> 05/02/2017 09:23:47  05/02/2017 19:23:47  krbtgt/domai...@domain.com 
>> <javascript:>
>> renew until 05/03/2017 09:23:41
>> 05/02/2017 09:49:54  05/02/2017 19:23:47  HTTP/edprjenslave03.domain.com@
>> renew until 05/03/2017 09:23:41
>> 05/02/2017 09:49:54  05/02/2017 19:23:47  HTTP/
>> edprjenslave03.domain....@domain.com <javascript:>
>> renew until 05/03/2017 09:23:41
>
>
> Tried adding the user to the local administrators, no dice.
>
> Confirmed that I indeed do have the latest version of pywinrm installed:
>
> afisher@ubuntu:~/Projects/build-utils/ansible-playbooks$ sudo -H pip 
>> install --upgrade pywinrm
>> Requirement already up-to-date: pywinrm in 
>> /usr/local/lib/python2.7/dist-packages
>> Requirement already up-to-date: xmltodict in 
>> /usr/local/lib/python2.7/dist-packages (from pywinrm)
>> Requirement already up-to-date: requests-ntlm>=0.3.0 in 
>> /usr/local/lib/python2.7/dist-packages (from pywinrm)
>> Requirement already up-to-date: six in /usr/lib/python2.7/dist-packages 
>> (from pywinrm)
>> Requirement already up-to-date: requests>=2.9.1 in 
>> /usr/local/lib/python2.7/dist-packages (from pywinrm)
>> Requirement already up-to-date: ntlm-auth>=1.0.2 in 
>> /usr/local/lib/python2.7/dist-packages (from requests-ntlm>=0.3.0->pywinrm)
>
>
> Here's my inventory file:
>
> ---
>> [windows]
>> edprjenslave03.DOMAIN.COM
>
>
> Here's my group_vars/windows.yml
>
> ---
>> ansible_user: afi...@domain.com <javascript:>
>> ansible_password: the_pass
>> ansible_port: 5985
>> ansible_connection: winrm
>> ansible_winrm_cert_validation: ignore
>
>
> Any ideas? I'm starting to run out of tricks.
>
> Thanks!
>
> Allen
>

-- 
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/4bf066b4-8229-4985-8f14-f93f31b2356d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to