# \[Errno 110\] Connection timed out with multiple ssh in router

**URL:** <https://forum.ansible.com/t/errno-110-connection-timed-out-with-multiple-ssh-in-router/35467>\
**Category:** Ansible Project\
**Created:** [July 6, 2021, 12:39pm UTC](https://forum.ansible.com/t/errno-110-connection-timed-out-with-multiple-ssh-in-router/35467 "2021-07-06T12:39:39Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vincent\_Nambatac](https://avatars.discourse-cdn.com/v4/letter/v/d07c76/32.png) [@Vincent\_Nambatac](https://forum.ansible.com/u/Vincent_Nambatac)\
**Post date:** [July 6, 2021, 12:39pm UTC](https://forum.ansible.com/t/errno-110-connection-timed-out-with-multiple-ssh-in-router/35467/1 "2021-07-06T12:39:39Z")

</div>

Im having a trouble in getting config with 30 plus routers . I can ssh and get configs but the problem is , it is limited only with 7 ssh connections . how can I fix this issue ? i added already command time out and persistent connection but still problem persist. how can I solve this issue? Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Vincent\_Nambatac](https://avatars.discourse-cdn.com/v4/letter/v/d07c76/32.png) [@Vincent\_Nambatac](https://forum.ansible.com/u/Vincent_Nambatac)\
**Post date:** [July 6, 2021, 1:00pm UTC](https://forum.ansible.com/t/errno-110-connection-timed-out-with-multiple-ssh-in-router/35467/2 "2021-07-06T13:00:12Z")

</div>

Here is my Ansible.cfg file, I did set the command time out but then only the maximmum ssh I get is 7 ssh connections only . Im wondering if this is something to deal with forks. please help about this issue .

# config file for ansible – [https://ansible.com/](https://ansible.com/)

# ===============================================

# nearly all parameters can be overridden in ansible-playbook

# or with command line flags. ansible will read ANSIBLE\_CONFIG,

# ansible.cfg in the current working directory, .ansible.cfg in

# the home directory or /etc/ansible/ansible.cfg, whichever it

# finds first

[defaults]

# some basic default values…

inventory = ./hosts

# set 7 forks for successful first 7

forks = 30

interpreter\_python = /usr/bin/python3

# uncomment this to disable SSH key host checking

host\_key\_checking = False

# retry files

# When a playbook fails a .retry file can be created that will be placed in ~/

# You can enable this feature by setting retry\_files\_enabled to True

# and you can change the location of the files by setting retry\_files\_save\_path

deprecation\_warnings = False  
retry\_files\_enabled = False

[persistent\_connection]  
command\_timeout = 1200  
#connect\_retry\_timeout = 300

---

<div class="post-metadata">

**Author:** ![Vincent\_Nambatac](https://avatars.discourse-cdn.com/v4/letter/v/d07c76/32.png) [@Vincent\_Nambatac](https://forum.ansible.com/u/Vincent_Nambatac)\
**Post date:** [July 6, 2021, 1:01pm UTC](https://forum.ansible.com/t/errno-110-connection-timed-out-with-multiple-ssh-in-router/35467/3 "2021-07-06T13:01:24Z")

</div>

Here is my backup.yml for my device[mikrotik]

---

<div class="post-metadata">

**Author:** ![Vincent\_Nambatac](https://avatars.discourse-cdn.com/v4/letter/v/d07c76/32.png) [@Vincent\_Nambatac](https://forum.ansible.com/u/Vincent_Nambatac)\
**Post date:** [July 6, 2021, 1:05pm UTC](https://forum.ansible.com/t/errno-110-connection-timed-out-with-multiple-ssh-in-router/35467/4 "2021-07-06T13:05:24Z")

</div>

Here, there are 8 devices I set for the initial ssh. but then only 7 ssh connections are successful. the rest are failed.note that all the devices are accessible via ssh I tested my 30 devices manually to ensure they are all accessible but when running in ansible it only reaches to 7 connections. please help

 ![Screenshot from 2021-07-06 21-02-32.png](https://us1.discourse-cdn.com/ansible/original/2X/c/c8107a236cfea589d1e95787732df01c779cddcd.png)

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [July 6, 2021, 1:23pm UTC](https://forum.ansible.com/t/errno-110-connection-timed-out-with-multiple-ssh-in-router/35467/5 "2021-07-06T13:23:58Z")

</div>

Does the order matter?  
I.e. if you shuffle them around does it consistently break after the 7th host?

> **(attachments)**
>
> ![Screenshot from 2021-07-06 21-02-32.png](https://us1.discourse-cdn.com/ansible/original/2X/c/c8107a236cfea589d1e95787732df01c779cddcd.png)

---

<div class="post-metadata">

**Author:** ![Vincent\_Nambatac](https://avatars.discourse-cdn.com/v4/letter/v/d07c76/32.png) [@Vincent\_Nambatac](https://forum.ansible.com/u/Vincent_Nambatac)\
**Post date:** [July 6, 2021, 1:27pm UTC](https://forum.ansible.com/t/errno-110-connection-timed-out-with-multiple-ssh-in-router/35467/6 "2021-07-06T13:27:53Z")

</div>

Thanks for your response , Yes I tried to shuffle them . but then one of those will get error connection time out . is there something I can tweak in the ansible.cfg side?

---

<div class="post-metadata">

**Author:** ![Vincent\_Nambatac](https://avatars.discourse-cdn.com/v4/letter/v/d07c76/32.png) [@Vincent\_Nambatac](https://forum.ansible.com/u/Vincent_Nambatac)\
**Post date:** [July 6, 2021, 1:28pm UTC](https://forum.ansible.com/t/errno-110-connection-timed-out-with-multiple-ssh-in-router/35467/7 "2021-07-06T13:28:38Z")

</div>

regardless of shuffling . as long as it reaches to 7 host the rest will get error connection time out.

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [July 6, 2021, 1:39pm UTC](https://forum.ansible.com/t/errno-110-connection-timed-out-with-multiple-ssh-in-router/35467/8 "2021-07-06T13:39:21Z")

</div>

This doesn't really answer my question.  
Can you confirm that the order does NOT matter, and that the 8th  
system will ALWAYS timeout - no matter what system it is?

---

<div class="post-metadata">

**Author:** ![Vincent\_Nambatac](https://avatars.discourse-cdn.com/v4/letter/v/d07c76/32.png) [@Vincent\_Nambatac](https://forum.ansible.com/u/Vincent_Nambatac)\
**Post date:** [July 6, 2021, 1:43pm UTC](https://forum.ansible.com/t/errno-110-connection-timed-out-with-multiple-ssh-in-router/35467/9 "2021-07-06T13:43:59Z")

</div>

alright i get it . the connection time out is not consistent only from the last system[8th] . any of those 8 are getting the error connection time out .

---

<div class="post-metadata">

**Author:** ![Vincent\_Nambatac](https://avatars.discourse-cdn.com/v4/letter/v/d07c76/32.png) [@Vincent\_Nambatac](https://forum.ansible.com/u/Vincent_Nambatac)\
**Post date:** [July 6, 2021, 1:46pm UTC](https://forum.ansible.com/t/errno-110-connection-timed-out-with-multiple-ssh-in-router/35467/10 "2021-07-06T13:46:16Z")

</div>

The order that doesn’t matter at all . and yeah the 8th system will ALWAYS time out no matter what system it is .

---

<div class="post-metadata">

**Author:** ![Antony\_Stone](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@Antony\_Stone](https://forum.ansible.com/u/Antony_Stone)\
**Post date:** [July 6, 2021, 1:53pm UTC](https://forum.ansible.com/t/errno-110-connection-timed-out-with-multiple-ssh-in-router/35467/11 "2021-07-06T13:53:35Z")

</div>

Are you able to create 8 simultaneous SSH sessions \_manually\_ (so, just using  
the standard command-line SSH client, not ansible) from the machine you are  
running ansible on:

a) to these specific routers

b) to anywhere else at all?

Antony.

---

<div class="post-metadata">

**Author:** ![Vincent\_Nambatac](https://avatars.discourse-cdn.com/v4/letter/v/d07c76/32.png) [@Vincent\_Nambatac](https://forum.ansible.com/u/Vincent_Nambatac)\
**Post date:** [July 6, 2021, 2:02pm UTC](https://forum.ansible.com/t/errno-110-connection-timed-out-with-multiple-ssh-in-router/35467/12 "2021-07-06T14:02:12Z")

</div>

Yes, I got 30 routers and I’ve done having SSH all of them, all are accessible via manual SSH .

a. to these specific routers  
– yes all routers are accessible via manual ssh  
b. to anywhere else at all  
– the error is not only consistent with 1 system it is anywhere else at all as long the system reach 8th it will fail . for example router1 fails at first run , and then the second run router 3 will fail but router 2 is ok . it is not consistent .

---

<div class="post-metadata">

**Author:** ![Antony\_Stone](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@Antony\_Stone](https://forum.ansible.com/u/Antony_Stone)\
**Post date:** [July 6, 2021, 2:12pm UTC](https://forum.ansible.com/t/errno-110-connection-timed-out-with-multiple-ssh-in-router/35467/13 "2021-07-06T14:12:32Z")

</div>

So, if I understand you correctly, you can only make 7 simultaneous SSH  
connections from the ansible server to anything at all (these routers, or to  
other systems), and the 8th attempt will fail.

Please can you tell us more about the machine you are running ansible on?

What operating system and version?

How much memory?

Is it running any other significant applications (apache, exim, icinga, etc)?

Anything else you think might be helpful for us to know about it?

Antony.

---

<div class="post-metadata">

**Author:** ![Vincent\_Nambatac](https://avatars.discourse-cdn.com/v4/letter/v/d07c76/32.png) [@Vincent\_Nambatac](https://forum.ansible.com/u/Vincent_Nambatac)\
**Post date:** [July 6, 2021, 2:23pm UTC](https://forum.ansible.com/t/errno-110-connection-timed-out-with-multiple-ssh-in-router/35467/14 "2021-07-06T14:23:12Z")

</div>

here is the system Im using on running with ansible. and no such applications are running in my machine.

 ![Screenshot from 2021-07-06 22-20-33.png](https://us1.discourse-cdn.com/ansible/original/2X/5/5a0cd9955f992e49099e254952f28af2a0137a1b.png)

and here is all the applications running in my machine

 ![Screenshot from 2021-07-06 22-22-44.png](https://us1.discourse-cdn.com/ansible/original/2X/f/f9683634dcdc49aad7468f4542694d552d8eea0c.png)

---

<div class="post-metadata">

**Author:** ![Vincent\_Nambatac](https://avatars.discourse-cdn.com/v4/letter/v/d07c76/32.png) [@Vincent\_Nambatac](https://forum.ansible.com/u/Vincent_Nambatac)\
**Post date:** [July 6, 2021, 2:25pm UTC](https://forum.ansible.com/t/errno-110-connection-timed-out-with-multiple-ssh-in-router/35467/15 "2021-07-06T14:25:03Z")

</div>

and also Im running at an ubuntu OS, here is the ram on my machine as well.

 ![Screenshot from 2021-07-06 22-24-27.png](https://us1.discourse-cdn.com/ansible/original/2X/6/69ff2620923a598bfd1b6de7ebb0ac42adcf8d8c.png)

---

<div class="post-metadata">

**Author:** ![Vincent\_Nambatac](https://avatars.discourse-cdn.com/v4/letter/v/d07c76/32.png) [@Vincent\_Nambatac](https://forum.ansible.com/u/Vincent_Nambatac)\
**Post date:** [July 8, 2021, 12:42am UTC](https://forum.ansible.com/t/errno-110-connection-timed-out-with-multiple-ssh-in-router/35467/16 "2021-07-08T00:42:11Z")

</div>

Is there no solution for this guys?

---

<div class="post-metadata">

**Author:** ![Pushparaj\_Gothandam](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/pushparaj_gothandam/32/5538_2.png) [@Pushparaj\_Gothandam](https://forum.ansible.com/u/Pushparaj_Gothandam)\
**Post date:** [July 8, 2021, 1:37am UTC](https://forum.ansible.com/t/errno-110-connection-timed-out-with-multiple-ssh-in-router/35467/17 "2021-07-08T01:37:40Z")

</div>

Are you using tacas for authentication?

---

<div class="post-metadata">

**Author:** ![Vincent\_Nambatac](https://avatars.discourse-cdn.com/v4/letter/v/d07c76/32.png) [@Vincent\_Nambatac](https://forum.ansible.com/u/Vincent_Nambatac)\
**Post date:** [July 8, 2021, 1:58am UTC](https://forum.ansible.com/t/errno-110-connection-timed-out-with-multiple-ssh-in-router/35467/18 "2021-07-08T01:58:19Z")

</div>

Hi rajthecomputerguy, what do you mean by tacas? I got no problem with authentication. only with connection time out. I got 10 routers . only 7 devices can ssh successfully. and that 7 devices are not constant devices. any of the 10 devices can be ssh using manually. but in ansible I can ssh only 7. please please I am having trouble about this week ago till now no solution.

---

<div class="post-metadata">

**Author:** ![Pushparaj\_Gothandam](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/pushparaj_gothandam/32/5538_2.png) [@Pushparaj\_Gothandam](https://forum.ansible.com/u/Pushparaj_Gothandam)\
**Post date:** [July 8, 2021, 6:39am UTC](https://forum.ansible.com/t/errno-110-connection-timed-out-with-multiple-ssh-in-router/35467/19 "2021-07-08T06:39:07Z")

</div>

Can you try this in ansible.cfg?

[persistent\_connection]  
network\_cli\_retries = 5
