Long running install task sometimes fails with ssh broken pipe issue

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

HI ,

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

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.