# Error while trying to ping a WIN 2016

**URL:** <https://forum.ansible.com/t/error-while-trying-to-ping-a-win-2016/27343>\
**Category:** Ansible Project\
**Tags:** windows, ubuntu\
**Created:** [April 23, 2018, 2:23am UTC](https://forum.ansible.com/t/error-while-trying-to-ping-a-win-2016/27343 "2018-04-23T02:23:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Selva\_Kumar](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/selva_kumar/32/5613_2.png) [@Selva\_Kumar](https://forum.ansible.com/u/Selva_Kumar)\
**Post date:** [April 23, 2018, 2:23am UTC](https://forum.ansible.com/t/error-while-trying-to-ping-a-win-2016/27343/1 "2018-04-23T02:23:46Z")

</div>

Hi Team,

I’m running Ansible 2.4.3.0 on a Ubuntu server. While trying to access a Windows 2016 server, getting below error. The DNS is working fine. Can someone help me in fixing this?

ansible\_host=XXX.XXX.XX | UNREACHABLE! =\> {  
“changed”: false,  
“msg”: “ssl: HTTPSConnectionPool(host=‘ansible\_host= XXX.XXX.XX ‘, port=5986): Max retries exceeded with url: /wsman (Caused by NewConnectionError(’\<urllib3.connection.VerifiedHTTPSConnection object at 0x7f0f3e5d5c50\>: Failed to establish a new connection: [Errno -2] Name or service not known’,))”,  
“unreachable”: true

---

<div class="post-metadata">

**Author:** ![jborean](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jborean/32/1525_2.png) [@jborean](https://forum.ansible.com/u/jborean)\
**Post date:** [April 23, 2018, 2:34am UTC](https://forum.ansible.com/t/error-while-trying-to-ping-a-win-2016/27343/2 "2018-04-23T02:34:20Z")

</div>

It really does sound like DNS is the issue, the problem is due to an underlying library not being able to establish the connection. You can try and just setup a raw connection with openssl to verify the host is resolvable and the HTTPS stack is working on the Windows side. To do this run,

`openssl s_client -host hostname -port 5986`

Thanks

Jordan

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [April 30, 2018, 9:32am UTC](https://forum.ansible.com/t/error-while-trying-to-ping-a-win-2016/27343/3 "2018-04-30T09:32:32Z")

</div>

I’d add ‘use hostnames, not ip addresses’ as well, HTTPS (and kerberos/Active Directory) really need hostnames, not ip addresses to work (you may be, I can’t tell from your example though).  
Hope this helps,  
Jon
