# failed to transfer file; Read from socket failed

**URL:** <https://forum.ansible.com/t/failed-to-transfer-file-read-from-socket-failed/16962>\
**Category:** Ansible Project\
**Created:** [December 4, 2014, 4:38pm UTC](https://forum.ansible.com/t/failed-to-transfer-file-read-from-socket-failed/16962 "2014-12-04T16:38:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jim\_McMahon](https://avatars.discourse-cdn.com/v4/letter/j/e8c25b/32.png) [@Jim\_McMahon](https://forum.ansible.com/u/Jim_McMahon)\
**Post date:** [December 4, 2014, 4:38pm UTC](https://forum.ansible.com/t/failed-to-transfer-file-read-from-socket-failed/16962/1 "2014-12-04T16:38:51Z")

</div>

Not sure if my error is related to the control path (see link below) or not, but I got a error about not being able to transfer a file in my logs.

[http://docs.ansible.com/intro\_configuration.html#control-path](http://docs.ansible.com/intro_configuration.html#control-path)

2014-12-04 10:02:47,137 p=1602 u=jmcmahon | TASK: [census.deploy | Copy .ruby-gemset to releases] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
2014-12-04 10:07:21,740 p=1602 u=jmcmahon | fatal: [[mqa-cbeserver1.flatworldknowledge.com](http://mqa-cbeserver1.flatworldknowledge.com)] =\> failed to transfer file to /tmp/ansible-tmp-1417705367.85-253946577954926/copy:

Read from socket failed: Connection reset by peer^M  
Connection closed^M

2014-12-04 10:07:21,741 p=1602 u=jmcmahon | FATAL: all hosts have already failed – aborting  
2014-12-04 10:07:21,741 p=1602 u=jmcmahon | PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
2014-12-04 10:07:21,743 p=1602 u=jmcmahon | to retry, use: --limit @/Users/jmcmahon/deploy-census.retry

2014-12-04 10:07:21,744 p=1602 u=jmcmahon | [mqa-cbeserver1.flatworldknowledge.com](http://mqa-cbeserver1.flatworldknowledge.com) : ok=11 changed=7 unreachable=1 failed=0

Any ideas on what happened? I was able to manually run the script again and all worked fine.

---

<div class="post-metadata">

**Author:** ![James\_Cammarata](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@James\_Cammarata](https://forum.ansible.com/u/James_Cammarata)\
**Post date:** [December 4, 2014, 5:53pm UTC](https://forum.ansible.com/t/failed-to-transfer-file-read-from-socket-failed/16962/2 "2014-12-04T17:53:18Z")

</div>

Hi Jim,

Does this happen frequently or just the one time? If the task re-ran without issues, it’s probably not a control path issue. It could be a transient issue, for example if you just happened to catch the ControlPersist process when it was shutting down due to a timeout, or it could be a ulimit issue (too many open files, if a large number of forks are being used).

---

<div class="post-metadata">

**Author:** ![Jim\_McMahon](https://avatars.discourse-cdn.com/v4/letter/j/e8c25b/32.png) [@Jim\_McMahon](https://forum.ansible.com/u/Jim_McMahon)\
**Post date:** [December 4, 2014, 6:53pm UTC](https://forum.ansible.com/t/failed-to-transfer-file-read-from-socket-failed/16962/3 "2014-12-04T18:53:36Z")

</div>

It’s not a frequent thing. It happened today and perhaps a month ago. That’s why I thought it might not be the control path issue (I am deploying to EC2 from a Mac laptop, but changed the host names on the EC2 box to be shorter and more readable).

I’ve been running the cron job without verbose logging. I’ve change the job to include -v logging in case it happens again. It’s not a big issue, but just want to be sure it’s not a configuration issue I should be aware of.

Thanks,

Jim McMahon
