# seeking help with problem when using gather\_facts

**URL:** <https://forum.ansible.com/t/seeking-help-with-problem-when-using-gather-facts/36240>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [January 21, 2022, 8:56pm UTC](https://forum.ansible.com/t/seeking-help-with-problem-when-using-gather-facts/36240 "2022-01-21T20:56:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zack\_May](https://avatars.discourse-cdn.com/v4/letter/z/3ab097/32.png) [@Zack\_May](https://forum.ansible.com/u/Zack_May)\
**Post date:** [January 21, 2022, 8:56pm UTC](https://forum.ansible.com/t/seeking-help-with-problem-when-using-gather-facts/36240/1 "2022-01-21T20:56:28Z")

</div>

I’m hoping someone can help me figure out what is going on within my ansible environment. When I try and use gather\_facts inside a playbook I get a failure to connect over ssh to that system. However, if I do not gather\_facts the playbook will run. The error I am getting is below. Has anyone dealt with this in the past, and if so could you help me figure out what is going on?

Thanks

Zack

fatal: [server]: UNREACHABLE! =\> {  
“changed”: false,  
“msg”: “Failed to connect to the host via ssh: OpenSSH\_8.2p1 Ubuntu-4ubuntu0.4, OpenSSL 1.1.1f 31 Mar 2020\r\ndebug1: Reading configuration data /home/me/.ssh/config\r\ndebug1: Reading configuration data /etc/ssh/ssh\_config\r\ndebug1: /etc/ssh/ssh\_config line 21: Applying options for \*\r\ndebug2: resolve\_canonicalize: hostname 2.2.2.2 is address\r\ndebug2: ssh\_connect\_direct\r\ndebug1: Connecting to 2.2.2.2 [2.2.2.2] port 22.\r\ndebug2: fd 3 setting O\_NONBLOCK\r\ndebug1: connect to address 2.2.2.2 port 22: Connection timed out\r\nssh: connect to host 2.2.2.2 port 22: Connection timed out”,  
“unreachable”: true  
}

version details:  
ansible [core 2.12.1]  
config file = /home/me/ansible/ansible.cfg  
configured module search path = [‘/home/me/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’]  
ansible python module location = /usr/local/lib/python3.8/dist-packages/ansible  
ansible collection location = /home/me/.ansible/collections:/usr/share/ansible/collections  
executable location = /usr/local/bin/ansible  
python version = 3.8.10 (default, Nov 26 2021, 20:14:08) [GCC 9.3.0]  
jinja version = 3.0.3  
libyaml = True

---

<div class="post-metadata">

**Author:** ![Oleg\_Galushko](https://avatars.discourse-cdn.com/v4/letter/o/e274bd/32.png) [@Oleg\_Galushko](https://forum.ansible.com/u/Oleg_Galushko)\
**Post date:** [January 21, 2022, 9:11pm UTC](https://forum.ansible.com/t/seeking-help-with-problem-when-using-gather-facts/36240/2 "2022-01-21T21:11:41Z")

</div>

Do you tried add/increase timeout or gather timeout value in your ansible.cfg?

[https://docs.ansible.com/ansible/latest/reference\_appendices/config.html#default-timeout](https://docs.ansible.com/ansible/latest/reference_appendices/config.html#default-timeout)  
[https://docs.ansible.com/ansible/latest/reference\_appendices/config.html#default-gather-timeout](https://docs.ansible.com/ansible/latest/reference_appendices/config.html#default-gather-timeout)

пятница, 21 января 2022 г. в 23:57:27 UTC+3, [za...@varnish-software.com](mailto:za...@varnish-software.com):

---

<div class="post-metadata">

**Author:** ![Evan\_Hisey](https://avatars.discourse-cdn.com/v4/letter/e/ce73a5/32.png) [@Evan\_Hisey](https://forum.ansible.com/u/Evan_Hisey)\
**Post date:** [January 22, 2022, 5:47pm UTC](https://forum.ansible.com/t/seeking-help-with-problem-when-using-gather-facts/36240/3 "2022-01-22T17:47:12Z")

</div>

IS the address really 2.2.2.2? and can you show a the playbook?
