# Weird /tmp file issue

**URL:** <https://forum.ansible.com/t/weird-tmp-file-issue/16657>\
**Category:** Ansible Project\
**Created:** [October 31, 2014, 9:05pm UTC](https://forum.ansible.com/t/weird-tmp-file-issue/16657 "2014-10-31T21:05:04Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul\_Becker](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@Paul\_Becker](https://forum.ansible.com/u/Paul_Becker)\
**Post date:** [October 31, 2014, 9:05pm UTC](https://forum.ansible.com/t/weird-tmp-file-issue/16657/1 "2014-10-31T21:05:04Z")

</div>

Hello,  
I’m running ansible-playbook 1.7.2 on Centos 6 and after running ok for a couple of weeks, now I’m getting this:

[![](https://lh5.googleusercontent.com/-I6RPfiltD-o/VFP4D5X6e2I/AAAAAAAABYY/DAxhmNUlszc/s320/Screen%2BShot%2B2014-10-31%2Bat%2B3.48.28%2BPM.png)](https://lh5.googleusercontent.com/-I6RPfiltD-o/VFP4D5X6e2I/AAAAAAAABYY/DAxhmNUlszc/s1600/Screen%2BShot%2B2014-10-31%2Bat%2B3.48.28%2BPM.png)

Note that the /tmp full path is missing. I used to get this:

[![](https://lh5.googleusercontent.com/-rdS2kRUL1ws/VFP4Ncf8flI/AAAAAAAABYg/dAocJ3Q2KKk/s320/Screen%2BShot%2B2014-10-31%2Bat%2B3.48.58%2BPM.png)](https://lh5.googleusercontent.com/-rdS2kRUL1ws/VFP4Ncf8flI/AAAAAAAABYg/dAocJ3Q2KKk/s1600/Screen%2BShot%2B2014-10-31%2Bat%2B3.48.58%2BPM.png)

Same playbook, same command. The playbook has not changed, and the two examples you see above were run on the same day. The weird thing is that around half the time it now fails with the above symptom. The other half it continues to work just fine for the entire playbook. It is as if between the EXEC line and the PUT line that the path-to-be-appended is being lost.

I have tried reverting to 1.7.1 without success.  
Suggestions?

Thank you,  
Paul

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [November 3, 2014, 2:25pm UTC](https://forum.ansible.com/t/weird-tmp-file-issue/16657/2 "2014-11-03T14:25:17Z")

</div>

Can you please paste this as text so things aren’t in screenshots?

Thanks!

---

<div class="post-metadata">

**Author:** ![Paul\_Becker](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@Paul\_Becker](https://forum.ansible.com/u/Paul_Becker)\
**Post date:** [November 3, 2014, 8:43pm UTC](https://forum.ansible.com/t/weird-tmp-file-issue/16657/3 "2014-11-03T20:43:24Z")

</div>

Sorry, here goes again:

> Hello,  
> I’m running ansible-playbook 1.7.2 on Centos 6 and after running ok for a couple of weeks, now I’m getting this:

PLAY [all] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

TASK: [Get stats] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
\<10.250.1.55\> ESTABLISH CONNECTION FOR USER: root  
\<10.250.1.55\> REMOTE\_MODULE command cat /usr/src/ap/gateway.ini #USE\_SHELL  
\<10.250.1.55\> EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ControlMaster=auto’, ‘-o’, ‘ControlPersist=60s’, ‘-o’, ‘ControlPath=/root/.ansible/cp/%h-%r’, ‘-o’, ‘Port=22’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘ConnectTimeout=10’, ‘10.250.1.55’, “/bin/sh -c ‘mkdir -p /tmp/ansible-tmp-1414787762.25-20167395212794 && echo /tmp/ansible-tmp-1414787762.25-20167395212794’”]  
\<10.250.1.55\> PUT /tmp/tmpRAIc9O TO command  
\<10.250.1.55\> EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ControlMaster=auto’, ‘-o’, ‘ControlPersist=60s’, ‘-o’, ‘ControlPath=/root/.ansible/cp/%h-%r’, ‘-o’, ‘Port=22’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘ConnectTimeout=10’, ‘10.250.1.55’, u"/bin/sh -c ‘LANG=C LC\_CTYPE=C /usr/bin/python command’"]  
failed: [10.250.1.55] =\> {“failed”: true, “parsed”: false}  
invalid output was: /usr/bin/python: can’t open file ‘command’: [Errno 2] No such file or directory  
OpenSSH\_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013  
debug1: Reading configuration data /etc/ssh/ssh\_config  
debug1: Applying options for \*  
debug1: auto-mux: Trying existing master  
debug2: fd 3 setting O\_NONBLOCK  
debug2: mux\_client\_hello\_exchange: master version 4  
debug3: mux\_client\_request\_forwards: requesting forwardings: 0 local, 0 remote  
debug3: mux\_client\_request\_session: entering  
debug3: mux\_client\_request\_alive: entering  
debug3: mux\_client\_request\_alive: done pid = 1749  
debug3: mux\_client\_request\_session: session request sent  
debug1: mux\_client\_request\_session: master session id: 2  
debug1: mux\_client\_request\_session: master session id: 2  
debug3: mux\_client\_read\_packet: read header failed: Broken pipe  
debug2: Received exit status from master 2  
Shared connection to 10.250.1.55 closed.

FATAL: all hosts have already failed – aborting

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
to retry, use: --limit @/root/j\_gw\_stats.retry

10.250.1.55 : ok=0 changed=0 unreachable=0 failed=1

> Note that the /tmp full path is missing. I used to get this:

PLAY [all] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

TASK: [Get stats] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
\<10.250.1.55\> ESTABLISH CONNECTION FOR USER: root  
\<10.250.1.55\> REMOTE\_MODULE command cat /usr/src/ap/gateway.ini #USE\_SHELL  
\<10.250.1.55\> EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ControlMaster=auto’, ‘-o’, ‘ControlPersist=60s’, ‘-o’, ‘ControlPath=/root/.ansible/cp/%h-%r’, ‘-o’, ‘Port=22’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘ConnectTimeout=10’, ‘10.250.1.55’, “/bin/sh -c ‘mkdir -p /tmp/ansible-tmp-1414784342.55-92617073727981 && echo /tmp/ansible-tmp-1414784342.55-92617073727981’”]  
\<10.250.1.55\> PUT /tmp/tmpF\_msTP TO /tmp/ansible-tmp-1414784342.55-92617073727981/command  
\<10.250.1.55\> EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ControlMaster=auto’, ‘-o’, ‘ControlPersist=60s’, ‘-o’, ‘ControlPath=/root/.ansible/cp/%h-%r’, ‘-o’, ‘Port=22’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘ConnectTimeout=10’, ‘10.250.1.55’, u"/bin/sh -c ‘LANG=C LC\_CTYPE=C /usr/bin/python /tmp/ansible-tmp-1414784342.55-92617073727981/command; rm -rf /tmp/ansible-tmp-1414784342.55-92617073727981/ \>/dev/null 2\>&1’"]  
changed: [10.250.1.55] =\> {“changed”: true, “cmd”: “cat /usr/src/ap/gateway.ini”, “delta”: “0:00:00.072717”, “end”: “2014-10-31 19:39:07.888074”, “rc”: 0, “start”: “2014-10-31 19:39:07.815357”, “stderr”: “”, “stdout”: “[id]\r\ngatewayid = 1;\r\nhopseed = 1;\r\n\r\n[fw]\r\nfwname = "P01-0208.bin";\r\nfwlength = 79872;\r\nrecords = 2560;\r\n\r\n[noc]\r\nport = 23005;\r\n\r\n[debug]\r\ndebug=0;”}

…snip…

---

<div class="post-metadata">

**Author:** ![Paul\_Becker](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@Paul\_Becker](https://forum.ansible.com/u/Paul_Becker)\
**Post date:** [November 5, 2014, 3:58pm UTC](https://forum.ansible.com/t/weird-tmp-file-issue/16657/4 "2014-11-05T15:58:34Z")

</div>

Any thoughts at all why the /tmp folder on the PUT action is not always being defined?

Thank you,  
Paul

---

<div class="post-metadata">

**Author:** ![Toshio\_Kuratomi](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@Toshio\_Kuratomi](https://forum.ansible.com/u/Toshio_Kuratomi)\
**Post date:** [November 5, 2014, 6:32pm UTC](https://forum.ansible.com/t/weird-tmp-file-issue/16657/5 "2014-11-05T18:32:49Z")

</div>

Shot in the dark: How are you setting remote\_tmp? the default is  
$HOME/.ansible/tmp but your output is showing /tmp/ (in the places  
where it's being properly inserted).

-Toshio

---

<div class="post-metadata">

**Author:** ![Paul\_Becker](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@Paul\_Becker](https://forum.ansible.com/u/Paul_Becker)\
**Post date:** [November 5, 2014, 7:12pm UTC](https://forum.ansible.com/t/weird-tmp-file-issue/16657/6 "2014-11-05T19:12:49Z")

</div>

remote\_tmp = /tmp

---

<div class="post-metadata">

**Author:** ![Toshio\_Kuratomi](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@Toshio\_Kuratomi](https://forum.ansible.com/u/Toshio_Kuratomi)\
**Post date:** [November 5, 2014, 7:13pm UTC](https://forum.ansible.com/t/weird-tmp-file-issue/16657/7 "2014-11-05T19:13:53Z")

</div>

And you're setting that by modifying /etc/ansible/ansible.cfg?

---

<div class="post-metadata">

**Author:** ![Paul\_Becker](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@Paul\_Becker](https://forum.ansible.com/u/Paul_Becker)\
**Post date:** [November 5, 2014, 7:16pm UTC](https://forum.ansible.com/t/weird-tmp-file-issue/16657/8 "2014-11-05T19:16:18Z")

</div>

Yes, set by /etc/ansible/ansible.cfg

---

<div class="post-metadata">

**Author:** ![Toshio\_Kuratomi](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@Toshio\_Kuratomi](https://forum.ansible.com/u/Toshio_Kuratomi)\
**Post date:** [November 5, 2014, 7:49pm UTC](https://forum.ansible.com/t/weird-tmp-file-issue/16657/9 "2014-11-05T19:49:17Z")

</div>

Looking through the code nothing's jumping out at me. The symptom you  
describe where this sometimes works and sometimes doesn't screams race  
condition but I'm not seeing where that's happening. I think we'll  
need a reproducer in order to diagnose from our side.

Failing that, if you're comfortable with python code you might look at  
instrumenting \_execute\_module in ansible/runner/\_\_init\_\_.py to see if  
you can pin down where the value of tmp is being lost.

-Toshio

---

<div class="post-metadata">

**Author:** ![Paul\_Becker](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@Paul\_Becker](https://forum.ansible.com/u/Paul_Becker)\
**Post date:** [November 5, 2014, 8:10pm UTC](https://forum.ansible.com/t/weird-tmp-file-issue/16657/10 "2014-11-05T20:10:43Z")

</div>

Thank you, we’ll look at it over here.  
Paul

---

<div class="post-metadata">

**Author:** ![Paul\_Becker](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@Paul\_Becker](https://forum.ansible.com/u/Paul_Becker)\
**Post date:** [November 7, 2014, 7:32pm UTC](https://forum.ansible.com/t/weird-tmp-file-issue/16657/11 "2014-11-07T19:32:00Z")

</div>

Ok, here’s a followup. I added a statement to print the contents of the result variable in \_make\_tmp\_path (in /runner/ **init**.py) and then ran my playbook. The output is kind of long, but here it is:

\<10.250.1.55\> EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ControlMaster=auto’, ‘-o’, ‘ControlPersist=60s’, ‘-o’, ‘ControlPath=/root/.ansible/cp/ansible-ssh-%h-%p-%r’, ‘-o’, ‘Port=22’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘ConnectTimeout=10’, ‘10.250.1.55’, “/bin/sh -c ‘mkdir -p /tmp/ansible-tmp-1415379422.44-263362473697853 && echo /tmp/ansible-tmp-1415379422.44-263362473697853’”]  
result= {  
‘stdout’: ‘’,  
‘stderr’: 'OpenSSH\_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013\n  
debug1: Reading configuration data /etc/ssh/ssh\_config\r\n  
debug1: Applying options for _\r\n  
debug1: auto-mux: Trying existing master\r\n  
debug1: Control socket “/root/.ansible/cp/ansible-ssh-10.250.1.55-22-root” does not exist\r\n  
debug2: ssh\_connect: needpriv 0\r\n  
debug1: Connecting to 10.250.1.55 [10.250.1.55] port 22.\r\n  
debug2: fd 3 setting O\_NONBLOCK\r\n  
debug1: fd 3 clearing O\_NONBLOCK\r\n  
debug1: Connection established.\r\n  
debug3: timeout: 9665 ms remain after connect\r\n  
debug1: permanently\_set\_uid: 0/0\r\n  
debug1: identity file /root/.ssh/identity type -1\r\n  
debug1: identity file /root/.ssh/identity-cert type -1\r\n  
debug3: Not a RSA1 key file /root/.ssh/id\_rsa.\r\n  
debug2: key\_type\_from\_name: unknown key type '-----BEGIN'\r\n  
debug3: key\_read: missing keytype\r\n  
debug3: key\_read: missing whitespace\r\n  
debug3: key\_read: missing whitespace\r\n  
debug3: key\_read: missing whitespace\r\n  
debug3: key\_read: missing whitespace\r\n  
debug3: key\_read: missing whitespace\r\n  
debug3: key\_read: missing whitespace\r\n  
debug3: key\_read: missing whitespace\r\n  
debug3: key\_read: missing whitespace\r\n  
debug3: key\_read: missing whitespace\r\n  
debug3: key\_read: missing whitespace\r\n  
debug3: key\_read: missing whitespace\r\n  
debug3: key\_read: missing whitespace\r\n  
debug3: key\_read: missing whitespace\r\n  
debug3: key\_read: missing whitespace\r\n  
debug3: key\_read: missing whitespace\r\n  
debug3: key\_read: missing whitespace\r\n  
debug3: key\_read: missing whitespace\r\n  
debug3: key\_read: missing whitespace\r\n  
debug3: key\_read: missing whitespace\r\n  
debug3: key\_read: missing whitespace\r\n  
debug3: key\_read: missing whitespace\r\n  
debug3: key\_read: missing whitespace\r\n  
debug3: key\_read: missing whitespace\r\n  
debug3: key\_read: missing whitespace\r\n  
debug3: key\_read: missing whitespace\r\n  
debug2: key\_type\_from\_name: unknown key type '-----END'\r\n  
debug3: key\_read: missing keytype\r\n  
debug1: identity file /root/.ssh/id\_rsa type 1\r\n  
debug1: identity file /root/.ssh/id\_rsa-cert type -1\r\n  
debug1: identity file /root/.ssh/id\_dsa type -1\r\n  
debug1: identity file /root/.ssh/id\_dsa-cert type -1\r\n  
debug1: identity file /root/.ssh/id\_ecdsa type -1\r\n  
debug1: identity file /root/.ssh/id\_ecdsa-cert type -1\r\n  
debug1: Remote protocol version 2.0, remote software version OpenSSH\_6.0p1 Debian-4\r\n  
debug1: match: OpenSSH\_6.0p1 Debian-4 pat OpenSSH_\r\n  
debug1: Enabling compatibility mode for protocol 2.0\r\n  
debug1: Local version string SSH-2.0-OpenSSH\_5.3\r\n  
debug2: fd 3 setting O\_NONBLOCK\r\n  
debug1: SSH2\_MSG\_KEXINIT sent\r\n  
debug3: Wrote 960 bytes for a total of 981\r\n  
debug1: SSH2\_MSG\_KEXINIT received\r\n  
debug2: kex\_parse\_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1\r\n  
debug2: kex\_parse\_kexinit: [ssh-rsa-cert-v01@openssh.com](mailto:ssh-rsa-cert-v01@openssh.com),ssh-dss-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ssh-rsa,ssh-dss\r\n  
debug2: kex\_parse\_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se\r\n  
debug2: kex\_parse\_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se\r\n  
debug2: kex\_parse\_kexinit: [hmac-md5,hmac-sha1,umac-64@openssh.com](mailto:hmac-md5,hmac-sha1,umac-64@openssh.com),hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96\r\n  
debug2: kex\_parse\_kexinit: [hmac-md5,hmac-sha1,umac-64@openssh.com](mailto:hmac-md5,hmac-sha1,umac-64@openssh.com),hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96\r\n  
debug2: kex\_parse\_kexinit: [zlib@openssh.com](mailto:zlib@openssh.com),zlib,none\r\n  
debug2: kex\_parse\_kexinit: [zlib@openssh.com](mailto:zlib@openssh.com),zlib,none\r\n  
debug2: kex\_parse\_kexinit: \r\ndebug2: kex\_parse\_kexinit: \r\n  
debug2: kex\_parse\_kexinit: first\_kex\_follows 0 \r\n  
debug2: kex\_parse\_kexinit: reserved 0 \r\n  
debug2: kex\_parse\_kexinit: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1\r\n  
debug2: kex\_parse\_kexinit: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256\r\ndebug2: kex\_parse\_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se\r\n  
debug2: kex\_parse\_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se\r\n  
debug2: kex\_parse\_kexinit: [hmac-md5,hmac-sha1,umac-64@openssh.com](mailto:hmac-md5,hmac-sha1,umac-64@openssh.com),hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96\r\n  
debug2: kex\_parse\_kexinit: [hmac-md5,hmac-sha1,umac-64@openssh.com](mailto:hmac-md5,hmac-sha1,umac-64@openssh.com),hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96\r\n  
debug2: kex\_parse\_kexinit: [none,zlib@openssh.com](mailto:none,zlib@openssh.com)\r\n  
debug2: kex\_parse\_kexinit: [none,zlib@openssh.com](mailto:none,zlib@openssh.com)\r\n  
debug2: kex\_parse\_kexinit: \r\n  
debug2: kex\_parse\_kexinit: \r\n  
debug2: kex\_parse\_kexinit: first\_kex\_follows 0 \r\n  
debug2: kex\_parse\_kexinit: reserved 0 \r\n  
debug2: mac\_setup: found hmac-md5\r\n  
debug1: kex: server-\>client aes128-ctr hmac-md5 [zlib@openssh.com](mailto:zlib@openssh.com)\r\n  
debug2: mac\_setup: found hmac-md5\r\n  
debug1: kex: client-\>server aes128-ctr hmac-md5 [zlib@openssh.com](mailto:zlib@openssh.com)\r\n  
debug1: SSH2\_MSG\_KEX\_DH\_GEX\_REQUEST(1024\<1024\<8192) sent\r\n  
debug1: expecting SSH2\_MSG\_KEX\_DH\_GEX\_GROUP\r\n  
debug3: Wrote 24 bytes for a total of 1005\r\n  
debug2: dh\_gen\_key: priv key bits set: 125/256\r\n  
debug2: bits set: 480/1024\r\ndebug1: SSH2\_MSG\_KEX\_DH\_GEX\_INIT sent\r\n  
debug1: expecting SSH2\_MSG\_KEX\_DH\_GEX\_REPLY\r\n  
debug3: Wrote 144 bytes for a total of 1149\r\n  
debug3: check\_host\_in\_hostfile: host 10.250.1.55 filename /root/.ssh/known\_hosts\r\n  
debug3: check\_host\_in\_hostfile: host 10.250.1.55 filename /root/.ssh/known\_hosts\r\n  
debug3: check\_host\_in\_hostfile: match line 1\r\n  
debug1: Host '10.250.1.55' is known and matches the RSA host key.\r\n  
debug1: Found key in /root/.ssh/known\_hosts:1\r\n  
debug2: bits set: 509/1024\r\n  
debug1: ssh\_rsa\_verify: signature correct\r\n  
debug2: kex\_derive\_keys\r\n  
debug2: set\_newkeys: mode 1\r\n  
debug1: SSH2\_MSG\_NEWKEYS sent\r\n  
debug1: expecting SSH2\_MSG\_NEWKEYS\r\n  
debug3: Wrote 16 bytes for a total of 1165\r\n  
debug2: set\_newkeys: mode 0\r\n  
debug1: SSH2\_MSG\_NEWKEYS received\r\n  
debug1: SSH2\_MSG\_SERVICE\_REQUEST sent\r\n  
debug3: Wrote 48 bytes for a total of 1213\r\n  
debug2: service\_accept: ssh-userauth\r\n  
debug1: SSH2\_MSG\_SERVICE\_ACCEPT received\r\n  
debug2: key: /root/.ssh/identity ((nil))\r\n  
debug2: key: /root/.ssh/id\_rsa (0x7ff98d26d620)\r\n  
debug2: key: /root/.ssh/id\_dsa ((nil))\r\n  
debug2: key: /root/.ssh/id\_ecdsa ((nil))\r\n  
debug3: Wrote 64 bytes for a total of 1277\r\n  
debug1: Authentications that can continue: publickey,password\r\n  
debug3: start over, passed a different list publickey,password\r\n  
debug3: preferred publickey\r\ndebug3: authmethod\_lookup publickey\r\n  
debug3: remaining preferred: \r\n  
debug3: authmethod\_is\_enabled publickey\r\n  
debug1: Next authentication method: publickey\r\n  
debug1: Trying private key: /root/.ssh/identity\r\n  
debug3: no such identity: /root/.ssh/identity\r\n  
debug1: Offering public key: /root/.ssh/id\_rsa\r\n  
debug3: send\_pubkey\_test\r\n  
debug2: we sent a publickey packet, wait for reply\r\n  
debug3: Wrote 368 bytes for a total of 1645\r\n  
debug1: Server accepts key: pkalg ssh-rsa blen 277\r\n  
debug2: input\_userauth\_pk\_ok: SHA1 fp 69:be:9f:27:19:27:09:6a:bc:a6:d4:0c:2f:79:d0:58:6d:72:15:2e\r\n  
debug3: sign\_and\_send\_pubkey: RSA 69:be:9f:27:19:27:09:6a:bc:a6:d4:0c:2f:79:d0:58:6d:72:15:2e\r\n  
debug1: read PEM private key done: type RSA\r\ndebug3: Wrote 640 bytes for a total of 2285\r\n  
debug1: Enabling compression at level 6.\r\n  
debug1: Authentication succeeded (publickey).\r\n  
debug1: setting up multiplex master socket\r\n  
debug3: muxserver\_listen: temporary control path /root/.ansible/cp/ansible-ssh-10.250.1.55-22-root.b522MvBV0wTcYeIJ\r\n  
debug2: fd 4 setting O\_NONBLOCK\r\n  
debug3: fd 4 is O\_NONBLOCK\r\n  
debug3: fd 4 is O\_NONBLOCK\r\n  
debug1: channel 0: new [/root/.ansible/cp/ansible-ssh-10.250.1.55-22-root.b522MvBV0wTcYeIJ]\r\n  
debug3: muxserver\_listen: mux listener channel 0 fd 4\r\n  
debug1: Entering interactive session.\r\n  
debug2: set\_control\_persist\_exit\_time: schedule exit in 60 seconds\r\n  
', ‘rc’: 0}

The important part is that rc=0, and stdout = ‘’. Stdout being empty causes \_make\_tmp\_path() to return ‘’ because of this line:

rc = conn.shell.join\_path(utils.last\_non\_blank\_line(result[‘stdout’]).strip(), ‘’)

Apparently, something in my initial SSH connection is not entirely right, causing the tmp var to be empty, which then cascades to PUT having an incorrect output path, etc…

I found that if I change ControlMaster=no in my ssh\_args (in /etc/ansible.cfg) that it WORKS every time. I am hoping that there’s a clue here somewhere that someone will benefit from.

Thanks,  
Paul

---

<div class="post-metadata">

**Author:** ![Toshio\_Kuratomi](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@Toshio\_Kuratomi](https://forum.ansible.com/u/Toshio_Kuratomi)\
**Post date:** [November 7, 2014, 7:58pm UTC](https://forum.ansible.com/t/weird-tmp-file-issue/16657/12 "2014-11-07T19:58:23Z")

</div>

Ah, mention of ControlMaster makes me think of this:  
[https://groups.google.com/forum/#!searchin/ansible-project/controlpersist/ansible-project/QUdxNK1zEH0/rQKnO827FUgJ](https://groups.google.com/forum/#!searchin/ansible-project/controlpersist/ansible-project/QUdxNK1zEH0/rQKnO827FUgJ)

Do you have pipelining enabled? If so, you might be running into the  
combination of updated CentOS6 openssh + pipelining bug that others  
are reporting.

-Toshio

---

<div class="post-metadata">

**Author:** ![Paul\_Becker](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@Paul\_Becker](https://forum.ansible.com/u/Paul_Becker)\
**Post date:** [November 7, 2014, 8:50pm UTC](https://forum.ansible.com/t/weird-tmp-file-issue/16657/13 "2014-11-07T20:50:09Z")

</div>

I’m not running pipelining, but I am running on CentOS.

In any case, I’m up and running now.

Thanks,  
Paul
