# Long running install task sometimes fails with ssh broken pipe issue

**URL:** <https://forum.ansible.com/t/long-running-install-task-sometimes-fails-with-ssh-broken-pipe-issue/22940>\
**Category:** Ansible Project\
**Created:** [November 2, 2016, 11:32am UTC](https://forum.ansible.com/t/long-running-install-task-sometimes-fails-with-ssh-broken-pipe-issue/22940 "2016-11-02T11:32:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deepa\_Yr](https://avatars.discourse-cdn.com/v4/letter/d/b77776/32.png) [@Deepa\_Yr](https://forum.ansible.com/u/Deepa_Yr)\
**Post date:** [November 2, 2016, 11:32am UTC](https://forum.ansible.com/t/long-running-install-task-sometimes-fails-with-ssh-broken-pipe-issue/22940/1 "2016-11-02T11:32:47Z")

</div>

Hi

I have a task which installs my product. Installation takes couple of hours to complete. Sometimes the task completes fine. Sometimes it fails with broken pipe issue.

{“failed”: true, “msg”: “SSH encountered an unknown error. The output was:\nOpenSSH\_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013\r\ndebug1: Reading configuration data /etc/ssh/ssh\_config\r\ndebug1: /etc/ssh/ssh\_config line 56: Applying options for \*\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O\_NONBLOCK\r\nmux\_client\_hello\_exchange: write packet: Broken pipe\r\n”}

Anyone has suggestions to resolve this intermittent issue ?

Thanks

Deepa

---

<div class="post-metadata">

**Author:** ![prathyush\_r](https://avatars.discourse-cdn.com/v4/letter/p/d2c977/32.png) [@prathyush\_r](https://forum.ansible.com/u/prathyush_r)\
**Post date:** [November 2, 2016, 12:54pm UTC](https://forum.ansible.com/t/long-running-install-task-sometimes-fails-with-ssh-broken-pipe-issue/22940/2 "2016-11-02T12:54:11Z")

</div>

HI ,

Please check if you have any firewall or selinux enabled on the target

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [November 2, 2016, 1:10pm UTC](https://forum.ansible.com/t/long-running-install-task-sometimes-fails-with-ssh-broken-pipe-issue/22940/3 "2016-11-02T13:10:52Z")

</div>

To me it looks like your ssh connection died, you could try setting  
ServerAliveInterval 60 in you ssh\_config.

I use that in my configuration to prevent firewalls to drop the session.
