filesize is zero after upload via sshfs/sftp #1925

Open
opened 2013-02-27 04:21:24 +00:00 by cehteh · 2 comments
cehteh commented 2013-02-27 04:21:24 +00:00
Owner

When mounting tahoe via sshfs files copied into the directory will first uppload (tried with cp and rsync) be added and visible in the parent directory and then be empty with size 0.

This only happens on one node (client+storage) here, coincidentally an older debian/squeeze box.

After some investigation this happens when using the sftp client:

Retrieving works:

sftp> get Rose.for.a.day.2007.Xvid-VODO.avi 
Fetching /Rose.for.a.day.2007.Xvid-VODO.avi to Rose.for.a.day.2007.Xvid-VODO.avi
/Rose.for.a.day.2007.Xvid-VODO.avi                                                                                                     100%  343MB   2.9MB/s   01:57    
sftp> ^D
$ ls Rose.for.a.day.2007.Xvid-VODO.avi -lh
-rw-r--r-- 1 ct ct 343M Feb 27 04:54 Rose.for.a.day.2007.Xvid-VODO.avi

Storing something exits:

sftp> put Elephants_Dream_HD.avi 
Uploading Elephants_Dream_HD.avi to /Elephants_Dream_HD.avi
Elephants_Dream_HD.avi                                                                                                                 100%   33MB   4.7MB/s   00:07    
Couldn't close file: Failure
sftp> ^D

Trying with sftp -vvvv reveals the following log

sftp> put bench.c 
debug3: Looking up bench.c
Uploading bench.c to /bench.c
debug3: Sent message SSH2_FXP_OPEN I:2 P:/bench.c
bench.c                                                                                                                                  0%    0     0.0KB/s   --:-- ETAdebug3: Sent message SSH2_FXP_WRITE I:3 O:0 S:5711
debug3: SSH2_FXP_STATUS 0
debug3: In write loop, ack for 3 5711 bytes at 0
bench.c                                                                                                                                100% 5711     5.6KB/s   00:00    
debug3: Sent message SSH2_FXP_CLOSE I:3
debug3: SSH2_FXP_STATUS 4
Couldn't close file: Failure
sftp> 

Version information:

# cat /etc/debian_version ; ssh -V
6.0.6
OpenSSH_5.5p1 Debian-6+squeeze2, OpenSSL 0.9.8o 01 Jun 2010

Tahoe is run from source (trial-test passed) as unprivileged user

$ ./allmydata-tahoe-1.9.2/bin/tahoe --version-and-path
allmydata-tahoe: 1.9.2 (/home/tahoe/allmydata-tahoe-1.9.2/src),
foolscap: 0.6.4 (/home/tahoe/allmydata-tahoe-1.9.2/support/lib/python2.6/site-packages/foolscap-0.6.4-py2.6.egg),
pycryptopp: 0.6.0.1206569328141510525648634803928199668821045408958 (/home/tahoe/allmydata-tahoe-1.9.2/support/lib/python2.6/site-packages/pycryptopp-0.6.0.1206569328141510525648634803928199668821045408958-py2.6-linux-x86_64.egg),
zfec: 1.4.7 (/home/tahoe/allmydata-tahoe-1.9.2/support/lib/python2.6/site-packages/zfec-1.4.7-py2.6-linux-x86_64.egg),
Twisted: 10.1.0 (/usr/lib/python2.6/dist-packages),
Nevow: 0.10.0 (/usr/lib/python2.6/dist-packages),
zope.interface: unknown (/usr/lib/python2.6/dist-packages/zope),
python: 2.6.6 (/usr/bin/python),
platform: Linux-debian_6.0.6-x86_64-64bit_ELF (None),
pyOpenSSL: 0.10 (/usr/lib/pymodules/python2.6),
simplejson: 2.1.0rc3 (/home/tahoe/allmydata-tahoe-1.9.2/support/lib/python2.6/site-packages/simplejson-2.1.0-py2.6-linux-x86_64.egg),
pycrypto: 2.1.0 (/usr/lib/python2.6/dist-packages),
pyasn1: unknown (/usr/lib/pymodules/python2.6),
mock: 1.0.1 (/home/tahoe/allmydata-tahoe-1.9.2/support/lib/python2.6/site-packages),
sqlite3: 2.4.1 [sqlite 3.7.3] (/usr/lib/python2.6),
setuptools: 0.6c16dev3 (/home/tahoe/allmydata-tahoe-1.9.2/support/lib/python2.6/site-packages/setuptools-0.6c16dev3.egg)
When mounting tahoe via sshfs files copied into the directory will first uppload (tried with cp and rsync) be added and visible in the parent directory and then be empty with size 0. This only happens on one node (client+storage) here, coincidentally an older debian/squeeze box. After some investigation this happens when using the sftp client: Retrieving works: ``` sftp> get Rose.for.a.day.2007.Xvid-VODO.avi Fetching /Rose.for.a.day.2007.Xvid-VODO.avi to Rose.for.a.day.2007.Xvid-VODO.avi /Rose.for.a.day.2007.Xvid-VODO.avi 100% 343MB 2.9MB/s 01:57 sftp> ^D $ ls Rose.for.a.day.2007.Xvid-VODO.avi -lh -rw-r--r-- 1 ct ct 343M Feb 27 04:54 Rose.for.a.day.2007.Xvid-VODO.avi ``` Storing something exits: ``` sftp> put Elephants_Dream_HD.avi Uploading Elephants_Dream_HD.avi to /Elephants_Dream_HD.avi Elephants_Dream_HD.avi 100% 33MB 4.7MB/s 00:07 Couldn't close file: Failure sftp> ^D ``` Trying with sftp -vvvv reveals the following log ``` sftp> put bench.c debug3: Looking up bench.c Uploading bench.c to /bench.c debug3: Sent message SSH2_FXP_OPEN I:2 P:/bench.c bench.c 0% 0 0.0KB/s --:-- ETAdebug3: Sent message SSH2_FXP_WRITE I:3 O:0 S:5711 debug3: SSH2_FXP_STATUS 0 debug3: In write loop, ack for 3 5711 bytes at 0 bench.c 100% 5711 5.6KB/s 00:00 debug3: Sent message SSH2_FXP_CLOSE I:3 debug3: SSH2_FXP_STATUS 4 Couldn't close file: Failure sftp> ``` Version information: ``` # cat /etc/debian_version ; ssh -V 6.0.6 OpenSSH_5.5p1 Debian-6+squeeze2, OpenSSL 0.9.8o 01 Jun 2010 ``` Tahoe is run from source (trial-test passed) as unprivileged user ``` $ ./allmydata-tahoe-1.9.2/bin/tahoe --version-and-path allmydata-tahoe: 1.9.2 (/home/tahoe/allmydata-tahoe-1.9.2/src), foolscap: 0.6.4 (/home/tahoe/allmydata-tahoe-1.9.2/support/lib/python2.6/site-packages/foolscap-0.6.4-py2.6.egg), pycryptopp: 0.6.0.1206569328141510525648634803928199668821045408958 (/home/tahoe/allmydata-tahoe-1.9.2/support/lib/python2.6/site-packages/pycryptopp-0.6.0.1206569328141510525648634803928199668821045408958-py2.6-linux-x86_64.egg), zfec: 1.4.7 (/home/tahoe/allmydata-tahoe-1.9.2/support/lib/python2.6/site-packages/zfec-1.4.7-py2.6-linux-x86_64.egg), Twisted: 10.1.0 (/usr/lib/python2.6/dist-packages), Nevow: 0.10.0 (/usr/lib/python2.6/dist-packages), zope.interface: unknown (/usr/lib/python2.6/dist-packages/zope), python: 2.6.6 (/usr/bin/python), platform: Linux-debian_6.0.6-x86_64-64bit_ELF (None), pyOpenSSL: 0.10 (/usr/lib/pymodules/python2.6), simplejson: 2.1.0rc3 (/home/tahoe/allmydata-tahoe-1.9.2/support/lib/python2.6/site-packages/simplejson-2.1.0-py2.6-linux-x86_64.egg), pycrypto: 2.1.0 (/usr/lib/python2.6/dist-packages), pyasn1: unknown (/usr/lib/pymodules/python2.6), mock: 1.0.1 (/home/tahoe/allmydata-tahoe-1.9.2/support/lib/python2.6/site-packages), sqlite3: 2.4.1 [sqlite 3.7.3] (/usr/lib/python2.6), setuptools: 0.6c16dev3 (/home/tahoe/allmydata-tahoe-1.9.2/support/lib/python2.6/site-packages/setuptools-0.6c16dev3.egg) ```
tahoe-lafs added the
unknown
normal
defect
1.9.2
labels 2013-02-27 04:21:24 +00:00
tahoe-lafs added this to the undecided milestone 2013-02-27 04:21:24 +00:00
cehteh commented 2013-02-27 05:46:22 +00:00
Author
Owner

turns out this was my fault, shares.happy was higher than available nodes.

turns out this was my fault, shares.happy was higher than available nodes.
davidsarah commented 2013-02-28 04:12:13 +00:00
Author
Owner

Ah, that explains it. Unfortunately the SFTP protocol doesn't have any way to provide a detailed error message to the client. Did the Recent and Active Operations page in the gateway WUI show the error?

Ah, that explains it. Unfortunately the SFTP protocol doesn't have any way to provide a detailed error message to the client. Did the Recent and Active Operations page in the gateway WUI show the error?
tahoe-lafs added
code-frontend
and removed
unknown
labels 2013-02-28 04:13:08 +00:00
warner added
code-frontend-ftp-sftp
and removed
code-frontend
labels 2014-12-02 19:49:45 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: tahoe-lafs/trac-2024-07-25#1925
No description provided.