suganoo / s3fs

Automatically exported from code.google.com/p/s3fs
0 stars 0 forks source link

s3fs mounts but won't list anything (only prints getattr[path=/]), and gives input/putput error in openWrt #122

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Build/install for openWrt (attached buildfile should work OK, but I messed 
around with DEPENDS, so you might have to adjust that part if you get errors)
2. Launch the openWrt system (i.e. through VirtualBox - .vdi image may be build 
directly. See http://downloads.openwrt.org/docs/buildroot-documentation.html 
and http://kamikaze.openwrt.org/docs/openwrt.html for info of building openWrt
3. In your openWrt system, mount an s3 bucket using s3fs, then try to read 
direcories or read or create files

What is the expected output? What do you see instead?

root@OpenWrt:~# ls -lth /mnt/s3
getattr[path=/]

Expected file list on the above command, not "getattr[path=/]"

root@OpenWrt:~# touch /mnt/s3/myfile
getattr[path=/myfile]
touch: /mnt/s3/myfile: Input/output error

Expected file to be craeted, not "Input/output error". 
echo something > /mnt/s3/myfile gives same ouput.

I found these lines in my log (using the 'logread' command in openWrt)
Nov  8 23:06:49 OpenWrt user.debug syslog: URL is 
https://s3.amazonaws.com/mybucket/myfile
Nov  8 23:06:49 OpenWrt user.debug syslog: URL changed is 
https://mybucket.s3.amazonaws.com/myfile
Nov  8 23:06:49 OpenWrt user.debug syslog: connecting to URL 
https://mybucket.s3.amazonaws.com/myfile
Nov  8 23:06:39 OpenWrt user.err syslog: ###Error
Nov  8 23:06:39 OpenWrt user.err syslog: ###retrying...
Nov  8 23:06:39 OpenWrt user.err syslog: ###Error
Nov  8 23:06:39 OpenWrt user.err syslog: ###retrying...
Nov  8 23:06:39 OpenWrt user.err syslog: ###Error
Nov  8 23:06:39 OpenWrt user.err syslog: ###retrying...
Nov  8 23:06:39 OpenWrt user.err syslog: ###giving up

What version of the product are you using? On what operating system?

s3fs version 1.0.2
openWrt - trunk (10.0.3) (through VirtualBox) and 8.09.2 (both through 
VirtualBox and on a real system, NSLU2) 

Please provide any additional information below.
I'm no make or openWrt expert, so the Makefile is probably not optimal. Anyway, 
I got s3fs to compile and be included in the openWrt system, and it seemingly 
mounts my s3 bucket with no error messages. Using the mounted file system fails 
as described above, though.

I'm using an EU bucket, but that should not be a problem. The exact same mount 
command mounts perfectly un ubuntu. Still, the log messages suggests that there 
is something wrong going on when communicating with the URL. THe URL in the 
example was https, but using http gives the same result.

I guess that this will not be a high priority issue, but any hunch on what 
might be wrong would be highly appreciated!

Anyway, very nice work! Mounting s3 as a file system is perfect. Only wish file 
transfer was a bit faster, but guess that's out of your control.

Original issue reported on code.google.com by torstein...@gmail.com on 8 Nov 2010 at 11:10

Attachments:

GoogleCodeExporter commented 8 years ago
s3fs gives a false sense of security sometimes by "appearing" to mount i.e. 
executing with no error messages, when in fact there are real issues only to be 
found when actually trying to use the mount. That's something that we'll be 
working on.

The newest code, 1.10 (and svn r229 (which is newer than 1.10)) has more error 
checking, but I suspect not what you need though.

Guesses?  kernel version, fuse version, curl version may not be compatable

You're right, we probably won't get to this anytime soon since we'll have to 
build a virtual openWrt system to first duplicate the error and then debug it.  
However, if you can get a packet sniffer going (like wireshark or tcpdump) you 
might be able to gleam some info.  

e.g.

tcpdump -i eth0 -s 1500 -A -v host <mybucket>s3.amazonaws.com

then do an ls on the mount

You should see a request go out like this:

GET /?delimiter=/&prefix=&max-keys=50 HTTP/1.1
Host: <mybucket>.s3.amazonaws.com
Accept: */*
Date: Tue, 09 Nov 2010 00:59:28 GMT
Authorization: AWS AKIAI2CMV7W6EF5JZNKA:xxxxxxxxxxxxxxxxxxxxxx

...and a response like this:

HTTP/1.1 200 OK
x-amz-id-2: 7Fi9Jax92EBEGty5iQCXhjYRWVrS0mSFmPdg3taxEKW+6n6Nxjk/8bH+4RUNiucx
x-amz-request-id: 623C52D709AE18FA
Date: Tue, 09 Nov 2010 00:59:29 GMT
Content-Type: application/xml
Transfer-Encoding: chunked
Server: AmazonS3

254
<?xml version="1.0" encoding="UTF-8"?>
<ListBucketResult 
xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Name>mybucket</Name><Prefix></P
refix><Marker></Marker><MaxKeys>50</MaxKeys><Delimiter>/</Delimiter><IsTruncated
>false</IsTruncated><Contents><Key>IMG_0033.jpg</Key><LastModified>2010-11-06T07
:11:17.000Z</LastModified><ETag>"6c820f7e8ca8fb125c7990754c2fc33a"</ETag><Size>2
72868</Size><Owner><ID>0f6cde9a15a15039d2b8a2725113a686ffd953380c5c555270a941f57
767cb34</ID><DisplayName>mooredan</DisplayName></Owner><StorageClass>STANDARD</S
torageClass></Contents></ListBucketResult>

Original comment by dmoore4...@gmail.com on 9 Nov 2010 at 1:05

GoogleCodeExporter commented 8 years ago

Original comment by dmoore4...@gmail.com on 19 Dec 2010 at 1:20

GoogleCodeExporter commented 8 years ago
This is from version 1.0.2, let us know if you're still having issues with the 
latest release.

Original comment by ben.lema...@gmail.com on 30 Aug 2011 at 3:46