# Remote system never exits issuing 'untar' command

**URL:** <https://forum.ansible.com/t/remote-system-never-exits-issuing-untar-command/11491>\
**Category:** Ansible Project\
**Created:** [May 2, 2012, 4:51pm UTC](https://forum.ansible.com/t/remote-system-never-exits-issuing-untar-command/11491 "2012-05-02T16:51:20Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike\_Willekes](https://avatars.discourse-cdn.com/v4/letter/m/3da27b/32.png) [@Mike\_Willekes](https://forum.ansible.com/u/Mike_Willekes)\
**Post date:** [May 2, 2012, 4:51pm UTC](https://forum.ansible.com/t/remote-system-never-exits-issuing-untar-command/11491/1 "2012-05-02T16:51:20Z")

</div>

I'm trying to use Ansible to copy then untar software to a group of  
'worker' machines. The Playbook is like this:

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [May 2, 2012, 4:59pm UTC](https://forum.ansible.com/t/remote-system-never-exits-issuing-untar-command/11491/2 "2012-05-02T16:59:16Z")

</div>

Devel or master branch? Try devel if you’re on master… let us know regardless.

Also, what OS are you running Ansible from?

---

<div class="post-metadata">

**Author:** ![Mike\_Willekes](https://avatars.discourse-cdn.com/v4/letter/m/3da27b/32.png) [@Mike\_Willekes](https://forum.ansible.com/u/Mike_Willekes)\
**Post date:** [May 2, 2012, 5:41pm UTC](https://forum.ansible.com/t/remote-system-never-exits-issuing-untar-command/11491/3 "2012-05-02T17:41:06Z")

</div>

This was on master, I just tried it on devel with the same effect -  
although now it's failing with a socket.timout() (even with the  
timeout on the 'ansible-playbook' command line increased to 30  
seconds).

Hmmm. I'm running Ansible from a CentOS 5.7 machine - the 'worker'  
machine is CentOS 6.2. I wonder if that's part of the problem... Will  
try running Ansible from a newer machine.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [May 2, 2012, 5:52pm UTC](https://forum.ansible.com/t/remote-system-never-exits-issuing-untar-command/11491/4 "2012-05-02T17:52:11Z")

</div>

There is some timeout code in execution that attempted to reuse the SSH timeout. This code is obviously undesirable on devel. master shouldn’t have hung though, first I’ve heard of that.

(possibly related – but curious anyway – python2.6 is pretty much required now, did you get py26 from EPEL?)

---

<div class="post-metadata">

**Author:** ![Matthew\_Williams](https://avatars.discourse-cdn.com/v4/letter/m/a3d4f5/32.png) [@Matthew\_Williams](https://forum.ansible.com/u/Matthew_Williams)\
**Post date:** [May 2, 2012, 6:13pm UTC](https://forum.ansible.com/t/remote-system-never-exits-issuing-untar-command/11491/5 "2012-05-02T18:13:31Z")

</div>

I discovered untar can throw some errors if your clocks are out of sync. I fixed it by redirecting stderr & stdout to /dev/null. But the timeout is a more likely cause…

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [May 2, 2012, 6:15pm UTC](https://forum.ansible.com/t/remote-system-never-exits-issuing-untar-command/11491/6 "2012-05-02T18:15:16Z")

</div>

command module eats out/err though, so it should never mess with the module returning or cause it to time out.

right?

---

<div class="post-metadata">

**Author:** ![Matthew\_Williams](https://avatars.discourse-cdn.com/v4/letter/m/a3d4f5/32.png) [@Matthew\_Williams](https://forum.ansible.com/u/Matthew_Williams)\
**Post date:** [May 2, 2012, 6:16pm UTC](https://forum.ansible.com/t/remote-system-never-exits-issuing-untar-command/11491/7 "2012-05-02T18:16:45Z")

</div>

Yes, you’re right… I was thinking of the work I did on the tar/untar work which was not using the command module and I hadn’t originally eaten the output.

---

<div class="post-metadata">

**Author:** ![Mike\_Willekes](https://avatars.discourse-cdn.com/v4/letter/m/3da27b/32.png) [@Mike\_Willekes](https://forum.ansible.com/u/Mike_Willekes)\
**Post date:** [May 2, 2012, 6:52pm UTC](https://forum.ansible.com/t/remote-system-never-exits-issuing-untar-command/11491/8 "2012-05-02T18:52:43Z")

</div>

> \> I discovered untar can throw some errors if your clocks are out of sync. I  
> \> fixed it by redirecting stderr & stdout to /dev/null. But the timeout is a  
> \> more likely cause..

That's interesting. I changed the action from this:

&nbsp;&nbsp;&nbsp;&nbsp;action: command tar -zxvf $worker/$java -C $worker

to this:

&nbsp;&nbsp;&nbsp;&nbsp;action: shell tar -zxvf $worker/$java -C $worker &\> /dev/null

And it completes successfully. Is this just an issue when calling  
'tar'? (note: I am using python 2.6 and the required dependencies from  
EPEL).

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [May 2, 2012, 6:58pm UTC](https://forum.ansible.com/t/remote-system-never-exits-issuing-untar-command/11491/9 "2012-05-02T18:58:11Z")

</div>

Should not be the case.
